On Wed, 6 Apr 2011 15:08:47 -0400 (EDT) Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Wed, 6 Apr 2011, Greg KH wrote: > > > On Wed, Apr 06, 2011 at 11:23:29AM -0700, Kristen Carlson Accardi wrote: > > > Moorestown does not support PME, so wakeups come as regular > > > device interrupts. This means that we can receive an interrupt > > > while we are runtime suspended, and we need to synchronously > > > resume our controller in order to handle the irq. Since this > > > operation can sleep, the usb_hcd_irq needs to be switched to > > > a threaded irq. No quick check irq was implemented because > > > we cannot do a synchronous resume from a quick check handler. > > > > Ick, switching to a threaded irq for USB is a major change, that we > > need to test a lot and can not go into this point in the release cycle. > > Indeed, this is not necessarily the best approach. Without using > threaded interrupts you could call pm_runtime_get() and > pm_runtime_put() in hcd_irq(), and also add a call to usb_hcd_irq() in > hcd-pci.c:resume_common() after the ->pci_resume call. > > For that matter, it's not clear that all platforms should be > unconditionally forced to call pm_runtime_get/put in the interrupt > handler. With shared interrupts, this could amount to a lot of useless > suspend/resume activity. Can those calls be made specific to > Moorestown? Maybe even moved down into ehci-hcd? > > You might even find that a quick check irq (whatever that is) becomes > feasible. > > Alan Stern > I have done zero testing with other controllers. I was hoping to just kick off a discussion about the best way to handle non-PME wakeups. If I call pm_runtime_get() in the irq, obviously I can't be sure the HW is available right away, so I could not mask the interrupt until after resume was called. Wouldn't that lead to a lot of interrupts being generated while we wait for resume to complete? We could, I'm sure figure out a way to make this platform specific - but I'm wondering if there may be other platforms besides Moorestown that may wakeup during suspend w/o PME, and if we should consider a general purpose solution. Thanks, Kristen -- 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