USB: isp1760-hcd: move imask clear after pending work is done
authorRichard Retanubun <RichardRetanubun@ruggedcom.com>
Thu, 17 Mar 2011 21:39:28 +0000 (17:39 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Apr 2011 22:57:19 +0000 (15:57 -0700)
This patch moves the HcInterrupt register write to clear the
pending interrupt to after the isr work is done, doing this removes
glitches in the irq line.

Signed-off-by: Richard Retanubun <richardretanubun@ruggedcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp1760-hcd.c

index 795345a..564b033 100644 (file)
@@ -1676,13 +1676,15 @@ static irqreturn_t isp1760_irq(struct usb_hcd *hcd)
        if (unlikely(!imask))
                goto leave;
 
-       reg_write32(hcd->regs, HC_INTERRUPT_REG, imask);
        if (imask & (HC_ATL_INT | HC_SOT_INT))
                do_atl_int(hcd);
 
        if (imask & HC_INTL_INT)
                do_intl_int(hcd);
 
+       /* Clear interrupt mask on device after the work is done */
+       reg_write32(hcd->regs, HC_INTERRUPT_REG, imask);
+
        irqret = IRQ_HANDLED;
 leave:
        spin_unlock(&priv->lock);