* [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
* Re: [PATCH 2.6.1] Allow pcnet_cs to work with shared irq
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
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2004-02-19 0:40 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Paul Gortmaker, netdev
Patch looks OK, but doesn't apply anymore. Please resend...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.1] Allow pcnet_cs to work with shared irq
2004-02-19 0:40 ` Jeff Garzik
@ 2004-02-19 18:30 ` Stephen Hemminger
2004-02-25 1:01 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2004-02-19 18:30 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Paul Gortmaker, netdev
Here is a rediff'd version of the patch to fix shared irq handling in pcnet_cs
and generic 8390 drivers.
--- linux-2.6/drivers/net/pcmcia/pcnet_cs.c 2004-02-09 10:06:49.000000000 -0800
+++ laptop-2.6/drivers/net/pcmcia/pcnet_cs.c 2004-02-09 16:54:48.000000000 -0800
@@ -1163,10 +1163,11 @@ static irqreturn_t ei_irq_wrapper(int ir
{
struct net_device *dev = dev_id;
pcnet_dev_t *info = PRIV(dev);
- 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)
--- linux-2.6/drivers/net/8390.c 2004-02-09 10:06:49.000000000 -0800
+++ laptop-2.6/drivers/net/8390.c 2004-02-09 16:54:47.000000000 -0800
@@ -513,7 +513,7 @@ irqreturn_t ei_interrupt(int irq, void *
}
}
spin_unlock(&ei_local->page_lock);
- return IRQ_HANDLED;
+ return IRQ_RETVAL(nr_serviced > 0);
}
/**
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.1] Allow pcnet_cs to work with shared irq
2004-02-19 18:30 ` Stephen Hemminger
@ 2004-02-25 1:01 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-02-25 1:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Paul Gortmaker, netdev
Stephen Hemminger wrote:
> Here is a rediff'd version of the patch to fix shared irq handling in pcnet_cs
> and generic 8390 drivers.
applied
^ 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 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).