net: Add netconsole support to cs89x0 driver
PATCH 1/1 net: Add netconsole support to cs89x0 driver
Greetings,
I've compile tested this on linux-2.6.12-rc4-git8 and tested kgdboe on "Some Random (ARM) V6 Processor" using a linux-2.6.10 based kernel. Please apply. TIA!
--
Regards,
George
Add netconsole support to cs89x0 driver
Signed-off-by George G. Davis <[email protected]>
cs89x0.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+)
drivers/net/cs89x0.c +16 -0
@@ -404,6 +404,19 @@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 cs89x0_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.
@@ -731,6 +744,9 @@ 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 = cs89x0_poll_controller; +#endif printk ("\n" );if (net_debug)