Re: [PATCH] usb: hcd: allow wakeups while suspended for Moorestown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux