On Wed, 2010-03-03 at 14:41 -0800, Sarah Sharp wrote: > On Wed, Mar 03, 2010 at 03:34:09PM -0500, Alan Stern wrote: > > On Wed, 3 Mar 2010, Sarah Sharp wrote: > > > > > On Wed, Mar 03, 2010 at 06:07:55PM +0800, Libin wrote: > > > > >From d3055401927f70e4de7717138b4c8ecad8b8223a Mon Sep 17 00:00:00 2001 > > > > From: Libin Yang <libin.yang@xxxxxxx> > > > > Date: Wed, 3 Mar 2010 13:50:41 +0800 > > > > Subject: [PATCH 3/5] xHCI: bus power management implementation > > > > > > > > This patch implements xHCI bus suspend/resume function hook. > > > > > > > > In the patch it goes through all the ports and suspend/resume > > > > the ports if needed. > > > > > > I thought the USB core ensured that all devices were suspended before > > > suspending the root hub. Alan, can you confirm? > > > > It does not ensure this if CONFIG_USB_SUSPEND isn't enabled. In such > > cases it never suspends any ports, but it still calls the HCDs' > > bus_suspend routines if CONFIG_PM is set. > > It's a requirement that all endpoints be stopped before you > suspend/hibernate an xHCI host, but it's not a requirement that the > devices be suspended. Now I'm very confused as to why the xHCI > bus_suspend patch suspends all unsuspended devices, but doesn't stop > their endpoint rings. Libin, Andiry, or Crane, do you have an answer? As I understand, before bus_suspend is invoked, port has been suspended. And only the device with no correct driver will be still in active statue, whose endpoints do not work. So I just suspend the port if needed. But based on Stan's email, it seems that endpoints still need be stopped because ports may not be suspended. I will check the USB driver and do the modification on the bus_suspend code if needed. > > Also, the core doesn't suspend ports that aren't enabled. This may or > > may not matter for your purposes. > > > P.S.: Maybe this is the ranting of a grouchy old stick-in-the-mud, but > > I do wish that people would trim their email replies. Is it really > > necessary to post a 270-line message in order to send a 2-line question > > plus 14 lines of context and signature? > > I'm never sure how much people read their mailing list email, and thus > how much context they need when they're CC'd on an email. For you, > of course you can dig the mail thread out. For other people, perhaps > they've been dumping all but the interesting USB mailing list messages > to /dev/null. But I will try to trim my messages for you, and other > sticks in the mud like you. ;) > > Sarah Sharp > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html