瀏覽代碼

USB: isp1760-hcd: move imask clear after pending work is done

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>
Richard Retanubun 14 年之前
父節點
當前提交
5808544690
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/usb/host/isp1760-hcd.c

+ 3 - 1
drivers/usb/host/isp1760-hcd.c

@@ -1676,13 +1676,15 @@ static irqreturn_t isp1760_irq(struct usb_hcd *hcd)
 	if (unlikely(!imask))
 	if (unlikely(!imask))
 		goto leave;
 		goto leave;
 
 
-	reg_write32(hcd->regs, HC_INTERRUPT_REG, imask);
 	if (imask & (HC_ATL_INT | HC_SOT_INT))
 	if (imask & (HC_ATL_INT | HC_SOT_INT))
 		do_atl_int(hcd);
 		do_atl_int(hcd);
 
 
 	if (imask & HC_INTL_INT)
 	if (imask & HC_INTL_INT)
 		do_intl_int(hcd);
 		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;
 	irqret = IRQ_HANDLED;
 leave:
 leave:
 	spin_unlock(&priv->lock);
 	spin_unlock(&priv->lock);