xhci: clear root port wake on bits if controller isn't wake-up capable
[pandora-kernel.git] / drivers / usb / host / xhci-hub.c
index 107e6b4..517cadb 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <linux/gfp.h>
+#include <linux/device.h>
 #include <asm/unaligned.h>
 
 #include "xhci.h"
@@ -993,7 +994,9 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
                        t2 |= PORT_LINK_STROBE | XDEV_U3;
                        set_bit(port_index, &bus_state->bus_suspended);
                }
-               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;