diff options
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9030994aba98..025d33313681 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -126,6 +126,11 @@ static unsigned park = 0; | |||
126 | module_param (park, uint, S_IRUGO); | 126 | module_param (park, uint, S_IRUGO); |
127 | MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets"); | 127 | MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets"); |
128 | 128 | ||
129 | /* for flakey hardware, ignore overcurrent indicators */ | ||
130 | static int ignore_oc = 0; | ||
131 | module_param (ignore_oc, bool, S_IRUGO); | ||
132 | MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications"); | ||
133 | |||
129 | #define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) | 134 | #define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) |
130 | 135 | ||
131 | /*-------------------------------------------------------------------------*/ | 136 | /*-------------------------------------------------------------------------*/ |
@@ -541,9 +546,10 @@ static int ehci_run (struct usb_hcd *hcd) | |||
541 | 546 | ||
542 | temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); | 547 | temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); |
543 | ehci_info (ehci, | 548 | ehci_info (ehci, |
544 | "USB %x.%x started, EHCI %x.%02x, driver %s\n", | 549 | "USB %x.%x started, EHCI %x.%02x, driver %s%s\n", |
545 | ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), | 550 | ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), |
546 | temp >> 8, temp & 0xff, DRIVER_VERSION); | 551 | temp >> 8, temp & 0xff, DRIVER_VERSION, |
552 | ignore_oc ? ", overcurrent ignored" : ""); | ||
547 | 553 | ||
548 | writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ | 554 | writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ |
549 | 555 | ||
@@ -613,9 +619,8 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
613 | unsigned i = HCS_N_PORTS (ehci->hcs_params); | 619 | unsigned i = HCS_N_PORTS (ehci->hcs_params); |
614 | 620 | ||
615 | /* resume root hub? */ | 621 | /* resume root hub? */ |
616 | status = readl (&ehci->regs->command); | 622 | if (!(readl(&ehci->regs->command) & CMD_RUN)) |
617 | if (!(status & CMD_RUN)) | 623 | usb_hcd_resume_root_hub(hcd); |
618 | writel (status | CMD_RUN, &ehci->regs->command); | ||
619 | 624 | ||
620 | while (i--) { | 625 | while (i--) { |
621 | int pstatus = readl (&ehci->regs->port_status [i]); | 626 | int pstatus = readl (&ehci->regs->port_status [i]); |
@@ -632,7 +637,6 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
632 | */ | 637 | */ |
633 | ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); | 638 | ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); |
634 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); | 639 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); |
635 | usb_hcd_resume_root_hub(hcd); | ||
636 | } | 640 | } |
637 | } | 641 | } |
638 | 642 | ||