]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/host/ehci-hub.c
Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
[~andy/linux] / drivers / usb / host / ehci-hub.c
index d05ea03cfb4d4d8aeae6a8db0db7559cebed6b82..ea6184bf48d05d2730e899b901201bec985e11b3 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 /*-------------------------------------------------------------------------*/
+#include <linux/usb/otg.h>
 
 #define        PORT_WAKE_BITS  (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
 
@@ -127,7 +128,7 @@ static int ehci_port_change(struct ehci_hcd *ehci)
        return 0;
 }
 
-static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
+static __maybe_unused void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
                bool suspending, bool do_wakeup)
 {
        int             port;
@@ -801,6 +802,13 @@ static int ehci_hub_control (
                                goto error;
                        if (ehci->no_selective_suspend)
                                break;
+#ifdef CONFIG_USB_OTG
+                       if ((hcd->self.otg_port == (wIndex + 1))
+                           && hcd->self.b_hnp_enable) {
+                               otg_start_hnp(ehci->transceiver);
+                               break;
+                       }
+#endif
                        if (!(temp & PORT_SUSPEND))
                                break;
                        if ((temp & PORT_PE) == 0)