[PATCH] isp1760-hcd: move imask clear after pending work is done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
Hi Sebastian,

I found that moving the imask write after the work removes a 50ns
'glitch' that I saw on the INT line of the switch. 

Just wondering if you have specific reasons to clear it right away.

Thanks for your time
Richard

 drivers/usb/host/isp1760-hcd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index f50e84a..ee75b38 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -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);
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux