DORMANTno replies

[PATCH] SMC91x: poll_controller(): check for interrupts before calling handler

From: Kevin Hilman <hidden>
Date: 2008-01-25 05:38:24
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

When using polling, smc_poll_controller() can call smc_interrupt()
when there are likely to be no real interrups.  This will trigger the
"spurious interrupt" printk whenever the driver is being polled.

Instead, check for actual interrupts before calling smc_interrupt()

Signed-off-by: Kevin Hilman <redacted>
Signed-off-by: Nicolas Pitre <redacted>
---
 drivers/net/smc91x.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 7da7589..64ef6c1 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1350,8 +1350,12 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
  */
 static void smc_poll_controller(struct net_device *dev)
 {
+	struct smc_local *lp = netdev_priv(dev);
+	void __iomem *ioaddr = lp->base;
+
 	disable_irq(dev->irq);
-	smc_interrupt(dev->irq, dev);
+	if (SMC_GET_INT() & SMC_GET_INT_MASK())
+		smc_interrupt(dev->irq, dev);
 	enable_irq(dev->irq);
 }
 #endif
-- 
1.5.3.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help