netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH 2/3] tg3 netpoll hook
@ 2003-10-03  1:45 Matt Mackall
  2003-10-05  2:44 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Mackall @ 2003-10-03  1:45 UTC (permalink / raw)
  To: netdev; +Cc: Andrew Morton, Jeff Garzik

 l-mpm/drivers/net/tg3.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

diff -puN drivers/net/tg3.c~tg3-poll drivers/net/tg3.c
--- l/drivers/net/tg3.c~tg3-poll	2003-09-25 11:47:30.000000000 -0500
+++ l-mpm/drivers/net/tg3.c	2003-09-25 11:56:37.000000000 -0500
@@ -2475,6 +2475,15 @@ static irqreturn_t tg3_interrupt(int irq
 static int tg3_init_hw(struct tg3 *);
 static int tg3_halt(struct tg3 *);
 
+#ifdef HAVE_POLL_CONTROLLER
+static void tg3_poll_controller(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	tg3_interrupt (dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
+
 static void tg3_reset_task(void *_data)
 {
 	struct tg3 *tp = _data;
@@ -7482,6 +7491,10 @@ static struct pci_dev * __devinit tg3_fi
 	return peer;
 }
 
+#ifdef HAVE_POLL_CONTROLLER
+static void tg3_poll_controller(struct net_device *dev);
+#endif
+
 static int __devinit tg3_init_one(struct pci_dev *pdev,
 				  const struct pci_device_id *ent)
 {
@@ -7632,6 +7645,9 @@ static int __devinit tg3_init_one(struct
 	dev->watchdog_timeo = TG3_TX_TIMEOUT;
 	dev->change_mtu = tg3_change_mtu;
 	dev->irq = pdev->irq;
+#ifdef HAVE_POLL_CONTROLLER
+	dev->poll_controller = tg3_poll_controller;
+#endif
 
 	err = tg3_get_invariants(tp);
 	if (err) {

_


-- 
Matt Mackall : http://www.selenic.com : of or relating to the moon

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

end of thread, other threads:[~2003-10-05  3:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-03  1:45 [RFC] [PATCH 2/3] tg3 netpoll hook Matt Mackall
2003-10-05  2:44 ` Jeff Garzik
2003-10-05  2:55   ` Matt Mackall
2003-10-05  3:11     ` Jeff Garzik
2003-10-05  3:16       ` Keith Owens
2003-10-05  3:21         ` 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).