USB: xhci: Check if the host controller died in IRQ handler.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 27 Jul 2009 19:04:01 +0000 (12:04 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jul 2009 21:31:12 +0000 (14:31 -0700)
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-hcd.c

index 8c3a074a95cdf6f14e4d0427c27d16384ed46031..008326d5bc52e077c2ed029bce1f4ca6e429e06e 100644 (file)
@@ -277,6 +277,9 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
        /* Check if the xHC generated the interrupt, or the irq is shared */
        temp = xhci_readl(xhci, &xhci->op_regs->status);
        temp2 = xhci_readl(xhci, &xhci->ir_set->irq_pending);
+       if (temp == 0xffffffff && temp2 == 0xffffffff)
+               goto hw_died;
+
        if (!(temp & STS_EINT) && !ER_IRQ_PENDING(temp2)) {
                spin_unlock(&xhci->lock);
                return IRQ_NONE;
@@ -294,6 +297,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
        if (temp & STS_FATAL) {
                xhci_warn(xhci, "WARNING: Host System Error\n");
                xhci_halt(xhci);
+hw_died:
                xhci_to_hcd(xhci)->state = HC_STATE_HALT;
                spin_unlock(&xhci->lock);
                return -ESHUTDOWN;