On Mon, 13 Feb 2006, David Brownell wrote:

> On Monday 13 February 2006 2:19 pm, Alan Stern wrote:
> > 
> > In pci-quirks.c, the UHCI handoff code is called by uhci-hcd when the 
> > controller is initialized, regardless of whether it has already run as 
> > part of the PCI initialization.  Similarly, the OHCI handoff code is 
> > duplicated in ohci_init(), so it runs even if the pci-quirks code gets 
> > skipped.
> 
> I don't know why you do that for UHCI, but for OHCI the reason for the
> code duplication is:  just in case some non-PCI system needs the handoff.
> That seems to be a purely theoretical case just now.

There are two reasons why I did it that way in uhci-hcd.  First, the
possibility that the early handoff didn't take place; second, the need to
reinitialize the controller if power was lost during a suspend (since the
quirks routine might not get called during a resume).  It's an artifact of 
the driver's design that the same code does both hardware initialization 
and BIOS handoff.

> > However the EHCI handoff is not called anywhere in ehci-hcd.  If the 
> > quirks code doesn't run then the handoff will never take place.
> 
> Right; EHCI handoff (unlike OHCI) is specified as PCI-specific; those
> registers sit in PCI config space.

BTW, the OHCI driver does the extra handoff even when it is built as a PCI 
driver.  A minor point... but it shows that PCI-specificity isn't really 
the issue.

> > Some systems require that the OHCI handoff not take place at the time the
> > quirk_usb_early_handoff routine runs, but only later (after the i8042 has
> > been initialized).  It's possible that other systems may end up having a
> > similar requirement for the EHCI handoff.
> 
> Or UHCI.  But the input system isn't ready to handle such stuff yet, right?

I'm not sure what you mean.  The input system should work just fine.  In 
fact, on the systems where we've been getting the bug reports, the input 
system doesn't work _unless_ the handoff is delayed.

> > Do you think it's a good idea to have ehci-hcd essentially call 
> > quirk_usb_disable_ehci() as part of its controller initialization?
> 
> Only with a paired update of the input subsystem.  Remember that
> the reason we moved that "early" handoff to become the standard
> model -- and haven't changed it, even though it turned up bugs on
> some boards for _all_ the PCI based USB host controller drivers -- is
> that the input folks needed it...

Yes.  And now it turns out that on some OHCI systems with buggy BIOSes
they need it not to be there.  The only answer seems to be a boot 
parameter like we used to have, except that now the parameter _prevents_ 
the early handoff since the default is to do it.  That parameter could 
prevent all the USB handoffs, or it could prevent just the OHCI handoff.  
I'm not sure yet which way is best.

On the chance that preventing all the handoffs is the way we go, I think
it would be good to have all the HCDs written to do a redundant handoff
during controller initialization, as uhci-hcd and ohci-hcd do now.  No
changes to the input layer should be needed.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to