On Friday 25 May 2007, Engelmayer Christian wrote: > Hi all, > > If I am not mistaken the current policy is to leave port power > enabled at all times during over-current situations and let > the power provider handle current limitation.
More accurately: let the hub handle it. And ISTR that the hub is supposed to automatically power off (or at least current limit) ports observing overcurrent conditions. Overcurrent has been a problem recently with EHCI; I'm not entirely sure why. It'd be no surprise to find that there's something the driver should do differently for some silicon. In particular, we want root hubs to follow chapter 11 of the USB spec ("hubs"). The hub driver in usbcore expects that. But the details of that expectation have changed a lot over the 2.6 cycle, and I suspect some root hubs have fallen a bit behind ... not acting enough like a "real" hub. > I experienced problems with the EHCI on an MPC8343E, which > after some over-current situations no longer asserts the > Connect Change Status Bit in the Port Status and Control Register, > leading to the result that USB would be fully functional, but > is no longer effectively serviced... > > The solution to this problem according to Freescale support > would be to disable and re-enable port power after the over-current > situation. Trying this with a hardware debugger gets us back in service. Is this an erratum, or are they saying that's how they read the EHCI spec? Does this EHCI report that it supports per-port power switching? (Probe messages with USB_DEBUG enabled will report that, as will current versions of "lsusb -v".) I'd have to check, but I think that Linux won't currently turn off per-port power unless the host controller reports that it actually supports per-port power switching. And most EHCI implementations don't report that in the hardware, so Linux won't power it off ... > As I am no big fan of work-arounds and rather new to the > USB-subsystem, might I ask what would be an accaptable way > to patch this behaviour? One thing to try would be to make the root hub descriptor report that it supports per-port power switching ... assuming that the hardware says otherwise. ehci_hub_descriptor() is the thing; or maybe HCS_PPC(). I'd have to look at usbcore's hub driver again to verify, but I think that might be sufficient to change its behavior. If not, you might also have to modify ehci_hub_status() to power off ports when OCC is detected ... some silicon will do that automatically, some won't, Linux could always do so. In general what we'd like to have is one code path which can work on all hardware. If you read the EHCI spec you'll see it allows some implementation flexibility in this area; if this isn't an erratum, I'd expect that what makes your case work better would not hurt other EHCI implementations. - Dave ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel