On Mon, 13 Feb 2006, David Brownell wrote:

> On Monday 13 February 2006 8:02 pm, Alan Stern wrote:
> > > 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; 
> 
> Current kernels can't do that though, right?  If so I'd just say
> that's old code that could safely be deleted.  UHCI could do the
> same, relying only on pci-quirks.c and eliminating one copy of that
> bios-quirky code.

There is only one copy.  It gets called multiple times.

> > 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). 
> 
> Same:  how could a current kernel do that?

Resume from standby or from RAM.  The BIOS then has a chance to grab back
control of the HCs, or they may have lost power in the interim.  The
quirks code doesn't run because the kernel doesn't restart (the way the
boot kernel does in resume-from-disk), but uhci-hcd still needs to
reinitialize/re-handoff the controller.

> > > > 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.
> 
> What's the mechanism to delay it?
> 
> Last I knew, there was no such mechanism.

http://bugzilla.kernel.org/show_bug.cgi?id=4791#c19

No doubt something like will get merged before long unless we can find a
better fix.

> > 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.
> 
> Doing that cleanly can just export the ehci handoff from the single copy
> of that code living in pci-quirks, yes.  UHCI could work the same.

It already does.

> At this point OHCI is the only HCD that needs handoff code but can't
> tie it to the pci-quirks.c source code.  It might be good to rename
> that to hcd-handoff.c so it'd be fair to link on non-PCI boxes, then
> export the OHCI handoff code from there.

If you want to change OHCI that way, I don't mind.

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