netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] natsemi netpoll support
@ 2004-07-26 15:54 Kalev Lember
  2004-07-27 17:59 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Kalev Lember @ 2004-07-26 15:54 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, manfred

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

Hi,

I have implemented netpoll support in natsemi.c. I am sending you the 
patch, it is against linux-2.6.8-rc2.
It has not recieved a lot of testing, I can only tell that netconsole 
now works for me.

-- 
Best regards,
Kalev Lember

[-- Attachment #2: natsemi_netconsole.diff --]
[-- Type: text/x-patch, Size: 1263 bytes --]

--- linux-2.6.8-rc2/drivers/net/natsemi.c.orig	2004-07-25 23:37:05.000000000 +0300
+++ linux-2.6.8-rc2/drivers/net/natsemi.c	2004-07-26 00:02:32.000000000 +0300
@@ -750,6 +750,7 @@ static void netdev_error(struct net_devi
 static void netdev_rx(struct net_device *dev);
 static void netdev_tx_done(struct net_device *dev);
 static int natsemi_change_mtu(struct net_device *dev, int new_mtu);
+static void natsemi_poll_controller(struct net_device *dev);
 static void __set_rx_mode(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
 static void __get_stats(struct net_device *dev);
@@ -920,6 +921,9 @@ static int __devinit natsemi_probe1 (str
 	dev->do_ioctl = &netdev_ioctl;
 	dev->tx_timeout = &tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = &natsemi_poll_controller;
+#endif
 
 	if (mtu)
 		dev->mtu = mtu;
@@ -2364,6 +2368,15 @@ static struct net_device_stats *get_stat
 	return &np->stats;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void natsemi_poll_controller(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	intr_handler(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
+
 #define HASH_TABLE	0x200
 static void __set_rx_mode(struct net_device *dev)
 {

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

end of thread, other threads:[~2004-07-28 17:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-26 15:54 [PATCH] natsemi netpoll support Kalev Lember
2004-07-27 17:59 ` Jeff Garzik
2004-07-27 18:22   ` Kalev Lember
2004-07-28 17:08     ` 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).