Netdev List
 help / color / mirror / Atom feed
* [PATCH] SMC91x: poll_controller(): check for interrupts before calling handler
@ 2008-01-25  5:38 Kevin Hilman
  0 siblings, 0 replies; only message in thread
From: Kevin Hilman @ 2008-01-25  5:38 UTC (permalink / raw)
  To: netdev; +Cc: Nicolas Pitre, Kevin Hilman

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 <khilman@mvista.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-25  5:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-25  5:38 [PATCH] SMC91x: poll_controller(): check for interrupts before calling handler Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox