aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-09-09 16:02:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:32 -0400
commit6f519165a97924ab3eeb99f388718d12ff97f1f4 (patch)
tree2b54ecf2cf187eea04a5233f7503ff8eb84c0f24
parentfac92becdaecff64dd91daab0292c5131de92f0d (diff)
[PATCH] cs89x0: add netpoll support
Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Cc: Matt Mackall <mpm@selenic.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/net/cs89x0.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index b780307093eb..cdc07ccd7332 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -247,6 +247,9 @@ static int get_eeprom_data(struct net_device *dev, int off, int len, int *buffer
247static int get_eeprom_cksum(int off, int len, int *buffer); 247static int get_eeprom_cksum(int off, int len, int *buffer);
248static int set_mac_address(struct net_device *dev, void *addr); 248static int set_mac_address(struct net_device *dev, void *addr);
249static void count_rx_errors(int status, struct net_local *lp); 249static void count_rx_errors(int status, struct net_local *lp);
250#ifdef CONFIG_NET_POLL_CONTROLLER
251static void net_poll_controller(struct net_device *dev);
252#endif
250#if ALLOW_DMA 253#if ALLOW_DMA
251static void get_dma_channel(struct net_device *dev); 254static void get_dma_channel(struct net_device *dev);
252static void release_dma_buff(struct net_local *lp); 255static void release_dma_buff(struct net_local *lp);
@@ -405,6 +408,19 @@ get_eeprom_cksum(int off, int len, int *buffer)
405 return -1; 408 return -1;
406} 409}
407 410
411#ifdef CONFIG_NET_POLL_CONTROLLER
412/*
413 * Polling receive - used by netconsole and other diagnostic tools
414 * to allow network i/o with interrupts disabled.
415 */
416static void net_poll_controller(struct net_device *dev)
417{
418 disable_irq(dev->irq);
419 net_interrupt(dev->irq, dev, NULL);
420 enable_irq(dev->irq);
421}
422#endif
423
408/* This is the real probe routine. Linux has a history of friendly device 424/* This is the real probe routine. Linux has a history of friendly device
409 probes on the ISA bus. A good device probes avoids doing writes, and 425 probes on the ISA bus. A good device probes avoids doing writes, and
410 verifies that the correct device exists and functions. 426 verifies that the correct device exists and functions.
@@ -760,6 +776,9 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
760 dev->get_stats = net_get_stats; 776 dev->get_stats = net_get_stats;
761 dev->set_multicast_list = set_multicast_list; 777 dev->set_multicast_list = set_multicast_list;
762 dev->set_mac_address = set_mac_address; 778 dev->set_mac_address = set_mac_address;
779#ifdef CONFIG_NET_POLL_CONTROLLER
780 dev->poll_controller = net_poll_controller;
781#endif
763 782
764 printk("\n"); 783 printk("\n");
765 if (net_debug) 784 if (net_debug)