On Wednesday 25 August 2004 8:38 am, Alan Stern wrote: > On Tue, 24 Aug 2004, David Brownell wrote: > > > > +/* > > > + * Disable a port and mark a logical connnect-change event, so that some > > > + * time later khubd will disconnect() any existing usb_device on the port > > > + * and will re-enumerate if there actually is a device attached. > > > + */ > > > > What would you think about making that also power down the port, > > and having khubd power it back up as part of that re-enumeration? > > Or at least having a logical disconnect mode where that's done. > > ... > > Clearly we don't want to do it always -- that would defeat the device > reset following a firmware update. But I don't object to making it an > option.
When to power back up is an interesting issue, and it sounded like you had a procedure in mind that could handle that well in certain common cases. > How would you handle hubs with ganged power control? (Or even no power > control?) Just skip the power-off step, with a log message? Ganged power switches should have power turned off at least during initialization, in the best of all worlds. They'll run for a long time ... so at most one init-time message. I don't think there would be cases where power-off is "needed" and not possible, except (a) devices craving VBUS cycles, which we may not even be able to detect without cycling it!, and (b) requests from users [power/state set to ACPI D3], where the Linux PM model says ISTR that to suspend as deeply as possible and report no error [D2 not D3]. You're right that if per-port switching isn't available (restricted to root hubs, I think) that's potential trouble. I guess I'd think the answer is to use it where it's available (making devices that need VBUS cycled, or links which use SRP, happier), but not rely on it in all cases. - Dave ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel