All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] xhci: clear root port wake on bits if controller isn't wake-up capable
@ 2014-06-10 22:25 Lu Baolu
  2014-06-11 15:26 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Lu Baolu @ 2014-06-10 22:25 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Lu Baolu

When the xHCI PCI host is suspended, if do_wakeup is false in xhci_pci_suspend,
xhci_bus_suspend needs to clear all root port wake on bits. Otherwise some Intel
platform may get a spurious wakeup, even if PCI PME# is disabled.

http://marc.info/?l=linux-usb&m=138194006009255&w=2

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/host/xhci-hub.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 6231ce6..fb771bd 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -22,6 +22,7 @@
 
 
 #include <linux/slab.h>
+#include <linux/device.h>
 #include <asm/unaligned.h>
 
 #include "xhci.h"
@@ -1139,7 +1140,9 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
 		 * including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME
 		 * is enabled, so also enable remote wake here.
 		 */
-		if (hcd->self.root_hub->do_remote_wakeup) {
+		if (hcd->self.root_hub->do_remote_wakeup
+				&& device_may_wakeup(hcd->self.controller)) {
+
 			if (t1 & PORT_CONNECT) {
 				t2 |= PORT_WKOC_E | PORT_WKDISC_E;
 				t2 &= ~PORT_WKCONN_E;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] xhci: clear root port wake on bits if controller isn't wake-up capable
  2014-06-10 22:25 [PATCH 1/1] xhci: clear root port wake on bits if controller isn't wake-up capable Lu Baolu
@ 2014-06-11 15:26 ` Greg Kroah-Hartman
  2014-06-12  1:18   ` baolu
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-11 15:26 UTC (permalink / raw)
  To: Lu Baolu; +Cc: Mathias Nyman, linux-usb, linux-kernel

On Wed, Jun 11, 2014 at 06:25:20AM +0800, Lu Baolu wrote:
> When the xHCI PCI host is suspended, if do_wakeup is false in xhci_pci_suspend,
> xhci_bus_suspend needs to clear all root port wake on bits. Otherwise some Intel
> platform may get a spurious wakeup, even if PCI PME# is disabled.
> 
> http://marc.info/?l=linux-usb&m=138194006009255&w=2
> 
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
>  drivers/usb/host/xhci-hub.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Should this also be a stable kernel patch?  If so, how far back?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] xhci: clear root port wake on bits if controller isn't wake-up capable
  2014-06-11 15:26 ` Greg Kroah-Hartman
@ 2014-06-12  1:18   ` baolu
  0 siblings, 0 replies; 3+ messages in thread
From: baolu @ 2014-06-12  1:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mathias Nyman, linux-usb, linux-kernel


On 06/11/2014 11:26 PM, Greg Kroah-Hartman wrote:
> On Wed, Jun 11, 2014 at 06:25:20AM +0800, Lu Baolu wrote:
>> When the xHCI PCI host is suspended, if do_wakeup is false in xhci_pci_suspend,
>> xhci_bus_suspend needs to clear all root port wake on bits. Otherwise some Intel
>> platform may get a spurious wakeup, even if PCI PME# is disabled.
>>
>> http://marc.info/?l=linux-usb&m=138194006009255&w=2
>>
>> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
>> ---
>>   drivers/usb/host/xhci-hub.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
> Should this also be a stable kernel patch?  If so, how far back?
Yes.

This patch should be back-ported to kernels as old as 2.6.37, that
contains the commit 9777e3ce907d4cb5a513902a87ecd03b52499569
"USB: xHCI: bus power management implementation".

Thanks,
-baolu
>
> thanks,
>
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-12  1:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 22:25 [PATCH 1/1] xhci: clear root port wake on bits if controller isn't wake-up capable Lu Baolu
2014-06-11 15:26 ` Greg Kroah-Hartman
2014-06-12  1:18   ` baolu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.