Skip to contentSkip to conversation

AT91RM9200 Ethernet: Add netpoll / netconsole support

PATCH New Andrew Victor 1 participant 1 message Dec 5, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 AT91RM9200 Ethernet: Add netpoll / netconsole support

Adds netpoll / netconsole support.

Original patch from Bill Gatliff.

drivers/net/arm/at91_ether.c +14 -0
diff -urN linux-2.6.19-final.orig/drivers/net/arm/at91_ether.c linux-2.6.19-final/drivers/net/arm/at91_ether.c
@@ -923,6 +923,17 @@
 	return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void at91ether_poll_controller(struct net_device *dev)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	at91ether_interrupt(dev->irq, dev);
+	local_irq_restore(flags);
+}
+#endif
+
 /*
  * Initialize the ethernet interface
  */
@@ -972,6 +983,9 @@
 	dev->set_mac_address = set_mac_address;
 	dev->ethtool_ops = &at91ether_ethtool_ops;
 	dev->do_ioctl = at91ether_ioctl;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = at91ether_poll_controller;
+#endif
 
 	SET_NETDEV_DEV(dev, &pdev->dev);