On Wednesday 27 April 2005 8:17 am, Alan Stern wrote: > On Wed, 27 Apr 2005, David Brownell wrote: > > > > Why should USB core's auto-suspend depend on CONFIG_PM? In > > > particular, if this results in (at least partial) > > > duplication of the auto-suspend functionality in HCDs. > > > > It could be argued two different ways: that "hub autosuspend" > > should exist in usbcore, and cover root hubs; or alternatively > > that drivers should handle their own suspend logic, and so root > > hub autosuspend should continue to driven by the HCDs. > > Um, I would interpret that second argument differently. To me, the part > of an HCD that drives the root hub is more akin to the firmware in an > external hub. It's an "emulator", if you like. The actual "driver" (in > the conventional sense of software that tells the device what to do and > interprets the results) is the regular hub driver. By this way of > thinking, HCDs shouldn't implement autosuspend any more than external hubs > do.
Hmm, but external hubs DO autosuspend: as soon as SOFs stop flowing from the parent, they suspend themselves (and their children). That's analagous to what a root hub does when the HC itself gets suspended. The root hub autosuspend is different though; it turns off the flow of SOF packets, just like setting the suspend bit on the parent port of an external hub. Thing is, there's no parent hub for the root, so there's no way the driver for such a hub could set that suspend bit... the parent is the HCD. Ergo, controlling root hub suspend is most naturally part of that HCD. ;) > Pragmatically, HCDs do need to autosuspend their root hubs because > otherwise the controller causes a large and unnecessary drain on system > resources -- and also because the hub driver doesn't do autosuspend yet. > > > It'd also be easy to argue that without CONFIG_PM there's no > > need for any autosuspend ... > > Yes, although host controllers may be a particularly egregious case. Not > only do they consume power, they use up plenty of PCI bus cycles. (Maybe > not too many though, if no devices are plugged in.) What resources they use on the parent bus is specific to the controller and its driver. At this point I think none of the standard PCI based HCDs need PCI accesses when there's no USB device attached. I think it's only UHCI that needs to access PCI when there are no transactions scheduled. (Since that's more or less how it knows to send SOFs.) - Dave ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel