[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-current
Subject: Re: sb600/sb700 ohci experimental patch
From: Andriy Gapon <avg () freebsd ! org>
Date: 2009-09-28 14:28:21
Message-ID: 4AC0C805.6070909 () freebsd ! org
[Download RAW message or body]
on 28/09/2009 17:10 John Baldwin said the following:
> On Monday 28 September 2009 9:55:44 am Andriy Gapon wrote:
>> on 28/09/2009 14:48 John Baldwin said the following:
>>> I don't think you can do this because it is a "feature" to not disable SMM if
>>> ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't
>>> loaded via PS/2 emulation, even when the OS is running.
>> Very good point.
>>
>>> I am curious if we
>>> really need to do the handover for each controller or if disabling it for
>>> ohci0 effectively disables it for all controllers? What do other OS's do?
>>>
>> Don't have an answer about other OSes.
>> But OHCI controllers have individual "used by SMM" bits and taking over one
>> controller doesn't affect the bits of the other controllers - they remain set.
>> Not that it means that SMM code actually keeps on controlling them.
>>
>> Actually, just checked - Linux also does it per controller:
>> http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/ohci-hcd.c#L495
>
> Hmm, it seems Linux now disables SMM for USB controllers (ohci, ehci, and uhci)
> via PCI quirks rather than doing it in the device drivers themselves, which
> matches your original suggestion. I'm not sure how best to fix that while also
> allowing USB to work w/o drivers loaded.
>
I looked at the quirk code (for OHCI only) and they don't disable SMI - they do
exactly the same takeover dance, only earlier:
http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/pci-quirks.c#L169
I.e. this actually matches what Hans suggested before - first early takeover of
all controllers, then probe/attach pass.
Not sure how to implement this best in our architecture - also using quirks or
perhaps something along the lines of multi-pass? :-)
--
Andriy Gapon
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic