Re: [regression?] usb: new errors during device detection

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Stern
Date: Wednesday, August 6, 2008 - 3:27 pm

On Wed, 6 Aug 2008, Frans Pop wrote:


Here's how it works.  An EHCI controller contains a bank of switches,
one for each port.  By default, the switches are set so that each port
connects to the companion UHCI (or OHCI) controller; that way you get
USB-1.1 functionality even if ehci-hcd isn't loaded.

But when the driver loads, it resets the switches so that the ports
connect to the EHCI controller.  There is no way for the driver to tell
which ports have devices attached and which don't, so it has to reset
all the switches.  Thus, any device which was connected to the UHCI
controller is now connected to the EHCI controller.  As far as uhci-hcd 
is concerned, it appears that all the devices were suddenly plugged.

As each device is enumerated, ehci-hcd determines whether it can run at 
high speed.  If not, the corresponding switch is set so the device 
connects back to the UHCI controller and it runs at full/low speed.


It follows directly from the description above.  If ehci-hcd is loaded
first then all the switches will be reset before any device has a
chance to register the UHCI driver.  Hence uhci-hcd will never see them
suddenly disconnect and will not generate those error messages.


It's somewhat difficult to synchronize activities between two different
drivers, especially when they can be in separate modules (so that one
might be present in memory and the other not).

As for whether these messages really _should_ be suppressed...  That 
depends on the circumstances.  In your case, yes.  But suppose for some 
reason ehci-hcd was loaded much later, at a time when the devices 
connected to the UHCI controller were already in use.  In that case it 
seems reasonable to log some error messages when the devices stop 
working.


That didn't involve cooperation between ehci-hcd and uhci-hcd.

Alan Stern

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [regression?] usb: new errors during device detection, Alan Stern, (Wed Aug 6, 3:27 pm)