aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 057cdda7a489..4a3bc5b7a06f 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -347,6 +347,8 @@ static int ehci_reset (struct ehci_hcd *ehci)
347 if (ehci->debug) 347 if (ehci->debug)
348 dbgp_external_startup(); 348 dbgp_external_startup();
349 349
350 ehci->port_c_suspend = ehci->suspended_ports =
351 ehci->resuming_ports = 0;
350 return retval; 352 return retval;
351} 353}
352 354
@@ -856,8 +858,13 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
856 goto dead; 858 goto dead;
857 } 859 }
858 860
861 /*
862 * We don't use STS_FLR, but some controllers don't like it to
863 * remain on, so mask it out along with the other status bits.
864 */
865 masked_status = status & (INTR_MASK | STS_FLR);
866
859 /* Shared IRQ? */ 867 /* Shared IRQ? */
860 masked_status = status & INTR_MASK;
861 if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) { 868 if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
862 spin_unlock(&ehci->lock); 869 spin_unlock(&ehci->lock);
863 return IRQ_NONE; 870 return IRQ_NONE;
@@ -908,7 +915,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
908 pcd_status = status; 915 pcd_status = status;
909 916
910 /* resume root hub? */ 917 /* resume root hub? */
911 if (!(cmd & CMD_RUN)) 918 if (ehci->rh_state == EHCI_RH_SUSPENDED)
912 usb_hcd_resume_root_hub(hcd); 919 usb_hcd_resume_root_hub(hcd);
913 920
914 /* get per-port change detect bits */ 921 /* get per-port change detect bits */
@@ -939,6 +946,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
939 * like usb_port_resume() does. 946 * like usb_port_resume() does.
940 */ 947 */
941 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); 948 ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
949 set_bit(i, &ehci->resuming_ports);
942 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); 950 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
943 mod_timer(&hcd->rh_timer, ehci->reset_done[i]); 951 mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
944 } 952 }