On 8/9/05, Alan Stern <[EMAIL PROTECTED]> wrote:
> Right now the kernel has very minimal support for hub port power changes.
> IIRC, the code for automatically turning port power back on was added in
> order to cope with peculiarities of various host controllers or with the
> USB OTG requirements.  It probably would be safe to change it so that it
> only applies to root hub ports -- but that won't help you very much.

For the time being I just modified hub_irq not to react on -EPROTO
errors. I know this is quite a bad thing to do, but our system is
customized so this is acceptable for us.

> In principle, we could add an interface to the hub driver allowing
> userspace to ask that certain ports be left powered off (and also that
> ports be powered back on).  This could be done using sysfs or ioctl; it
> doesn't fit all that well into the usbfs framework.  ioctl would probably
> be simpler.

Yes, this would be an option. But the possibility of a user going
around the hub driver (as we do) and being "surprised" by the
self-healing logic remains. In these cases, using the hardware as
storage of the state might be the best. If the hub is properly
configured (valid descriptor, etc.) _and_ some of the port power
status bits are cleared, this should be clear evidence of intent on
the side of the user to power down this port so the healing should not
be applied. So the hub code can just test the state of the hardware
and make this decision.

> I don't have time to work on such a change now, but you certainly may.
> You would need to add to struct usb_hub a bit-vector of ports that are
> supposed to be powered off.  Also, the hub_port_logical_disconnect routine
> has long needed an extra argument specifying whether port power should be
> turned off -- this would be an ideal time to add it.

I would be glad to help with providing input and testing/debugging,
but I am afraid that I'm not as good a programmer to mess with the
driver code. Maybe I'll have more time to look at this after we get
the testbed off the ground.

Vlado


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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