All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.1] Allow pcnet_cs to work with shared irq
@ 2004-01-21  0:22 Stephen Hemminger
  2004-02-19  0:40 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2004-01-21  0:22 UTC (permalink / raw)
  To: Jeff Garzik, Paul Gortmaker; +Cc: netdev

On some laptops, the pcmcia card shares an irq with other things
like the serial or irda ports.  The pcnet_cs driver did not correctly
handle shared interrupts, this fixes it for me.

ei_interrupt now returns IRQ_HANDLED if some frames have been serviced,
and the wrapper routine propagates the error code.

diff -Nru a/drivers/net/8390.c b/drivers/net/8390.c
--- a/drivers/net/8390.c	Tue Jan 20 16:21:00 2004
+++ b/drivers/net/8390.c	Tue Jan 20 16:21:00 2004
@@ -520,7 +520,7 @@
 		}
 	}
 	spin_unlock(&ei_local->page_lock);
-	return IRQ_HANDLED;
+	return IRQ_RETVAL(nr_serviced > 0);
 }
 
 /**
diff -Nru a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
--- a/drivers/net/pcmcia/pcnet_cs.c	Tue Jan 20 16:21:00 2004
+++ b/drivers/net/pcmcia/pcnet_cs.c	Tue Jan 20 16:21:00 2004
@@ -1193,10 +1193,11 @@
 static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs)
 {
     pcnet_dev_t *info = dev_id;
-    info->stale = 0;
-    ei_interrupt(irq, dev_id, regs);
-    /* FIXME! Was it really ours? */
-    return IRQ_HANDLED;
+    irqreturn_t ret = ei_interrupt(irq, dev_id, regs);
+
+    if (ret == IRQ_HANDLED)
+	    info->stale = 0;
+    return ret;
 }
 
 static void ei_watchdog(u_long arg)

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

end of thread, other threads:[~2004-02-25  1:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-21  0:22 [PATCH 2.6.1] Allow pcnet_cs to work with shared irq Stephen Hemminger
2004-02-19  0:40 ` Jeff Garzik
2004-02-19 18:30   ` Stephen Hemminger
2004-02-25  1:01     ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.