On Thu, 15 Dec 2005, Franck wrote: > Hi, > > I'm looking at the USB suspend code of kernel 2.6.15-rc5. It seems > that it has changed a lot since 2.6.14, and I'm quite confused on how > to implement the suspend feature for a HCD. > > Actually the hcd can be suspended itself (driver suspend) or it can be > asked to suspend the bus through its root hub. For the first case > (driver suspend), does the HCD need to suspend the bus ?
No, the bus should already be suspended. In fact, you should fail the driver-suspend request if the bus isn't already suspended. Likewise, you should fail a bus-resume request if the driver is suspended. > Another question regarding root hub. Does it need to support > SET_FEATURE PORT_SUSPEND request ? I don't think so because usb core > seems to call hcd->bus_suspend to achieve that... No, you're confused. The root hub _does_ need to support that request, because that's how you suspend a device plugged into the root hub. To "suspend" the root hub itself, you would need to send this request to the root hub's "parent" -- which doesn't exist. On the other hand, the root hub _is_ allowed to ignore the DEVICE_REMOTE_WAKEUP feature. It never gets sent to the root hub; instead remote wakeup is assumed to be enabled and can be disabled through sysfs. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel