netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] flexcan: Acknowledge all interrupt sources in the IRQ handler
@ 2011-12-09 13:47 Lothar Waßmann
  2011-12-09 13:52 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Lothar Waßmann @ 2011-12-09 13:47 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linux-can, netdev, linux-kernel, Lothar Waßmann

Otherwise the handler will get stuck in an endless IRQ loop when an
interrupt condition occurs that is not being acked (e.g. TWRN)

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/net/can/flexcan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index e023379..ea8f04d 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -577,7 +577,7 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
 
 	reg_iflag1 = flexcan_read(&regs->iflag1);
 	reg_esr = flexcan_read(&regs->esr);
-	flexcan_write(FLEXCAN_ESR_ERR_INT, &regs->esr);	/* ACK err IRQ */
+	flexcan_write(reg_esr, &regs->esr);	/* ACK all IRQs */
 
 	/*
 	 * schedule NAPI in case of:
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-10 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 13:47 [PATCH] flexcan: Acknowledge all interrupt sources in the IRQ handler Lothar Waßmann
2011-12-09 13:52 ` Marc Kleine-Budde
2011-12-09 13:59   ` Lothar Waßmann
2011-12-09 14:35     ` Wolfgang Grandegger
2011-12-10 20:10       ` Wolfgang Grandegger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).