Trivial patch adding netpoll support to cs89x0 driver.

Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]>

Please apply,
~Deepak


diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -86,6 +86,7 @@
 
   Deepak Saxena     : [EMAIL PROTECTED]
                     : Intel IXDP2x01 (XScale ixp2x00 NPU) platform support
+                    : Netpoll support
 
 */
 
@@ -247,6 +248,9 @@ static int get_eeprom_data(struct net_de
 static int get_eeprom_cksum(int off, int len, int *buffer);
 static int set_mac_address(struct net_device *dev, void *addr);
 static void count_rx_errors(int status, struct net_local *lp);
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void net_poll_controller(struct net_device *dev);
+#endif
 #if ALLOW_DMA
 static void get_dma_channel(struct net_device *dev);
 static void release_dma_buff(struct net_local *lp);
@@ -405,6 +409,19 @@ get_eeprom_cksum(int off, int len, int *
        return -1;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void net_poll_controller(struct net_device *dev)
+{
+       disable_irq(dev->irq);
+       net_interrupt(dev->irq, dev, NULL);
+       enable_irq(dev->irq);
+}
+#endif
+
 /* This is the real probe routine.  Linux has a history of friendly device
    probes on the ISA bus.  A good device probes avoids doing writes, and
    verifies that the correct device exists and functions.
@@ -756,6 +773,9 @@ printk("PP_addr=0x%x\n", inw(ioaddr + AD
        dev->get_stats          = net_get_stats;
        dev->set_multicast_list = set_multicast_list;
        dev->set_mac_address    = set_mac_address;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller    = net_poll_controller;
+#endif
 
        printk("\n");
        if (net_debug)


-- 
Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net

Even a stopped clock gives the right time twice a day.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to