]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/host/oxu210hp-hcd.c
Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
[~andy/linux] / drivers / usb / host / oxu210hp-hcd.c
index 4a771f6cc822306ae5708aa8f3ceec36aae72e44..5fbe997dc6dfbf91989056ef93f29cc9dd72e571 100644 (file)
@@ -1884,6 +1884,7 @@ static int enable_periodic(struct oxu_hcd *oxu)
        status = handshake(oxu, &oxu->regs->status, STS_PSS, 0, 9 * 125);
        if (status != 0) {
                oxu_to_hcd(oxu)->state = HC_STATE_HALT;
+               usb_hc_died(oxu_to_hcd(oxu));
                return status;
        }
 
@@ -1909,6 +1910,7 @@ static int disable_periodic(struct oxu_hcd *oxu)
        status = handshake(oxu, &oxu->regs->status, STS_PSS, STS_PSS, 9 * 125);
        if (status != 0) {
                oxu_to_hcd(oxu)->state = HC_STATE_HALT;
+               usb_hc_died(oxu_to_hcd(oxu));
                return status;
        }
 
@@ -2449,8 +2451,9 @@ static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd)
                goto dead;
        }
 
+       /* Shared IRQ? */
        status &= INTR_MASK;
-       if (!status) {                  /* irq sharing? */
+       if (!status || unlikely(hcd->state == HC_STATE_HALT)) {
                spin_unlock(&oxu->lock);
                return IRQ_NONE;
        }
@@ -2516,6 +2519,7 @@ static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd)
 dead:
                        ehci_reset(oxu);
                        writel(0, &oxu->regs->configured_flag);
+                       usb_hc_died(hcd);
                        /* generic layer kills/unlinks all urbs, then
                         * uses oxu_stop to clean up the rest
                         */