[PATCH] net: Add netconsole support to cs89x0 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(+)

Index: linux-2.6.12-rc4-git8/drivers/net/cs89x0.c
===================================================================
--- linux-2.6.12-rc4-git8.orig/drivers/net/cs89x0.c
+++ linux-2.6.12-rc4-git8/drivers/net/cs89x0.c
@@ -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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux