aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-03-27 13:05:17 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-03-27 13:05:17 +0000
commit1f415dbfe9a8c4b6666e2531ccce568c62d9a276 (patch)
treed20131f801e87910b4e1a3404f4951af03e8724f /target
parent44f0ed5efb042774548c38fbca7ad09bbc3aa3b9 (diff)
downloadupstream-1f415dbfe9a8c4b6666e2531ccce568c62d9a276.tar.gz
upstream-1f415dbfe9a8c4b6666e2531ccce568c62d9a276.tar.bz2
upstream-1f415dbfe9a8c4b6666e2531ccce568c62d9a276.zip
ar71xx: ag71xx: Add netpoll support
This patch adds support for polling interrupts, used by netconsole and the likes. Tested on d-link dir-615 C1 using netconsole. Signed-off-by: Pat Erley <pat-lkml@erley.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20503 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index 4519ec8dca..8244239663 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -926,6 +926,20 @@ static void ag71xx_set_multicast_list(struct net_device *dev)
/* TODO */
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void ag71xx_netpoll(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ ag71xx_interrupt(dev->irq, dev);
+ enable_irq(dev->irq);
+}
+#endif
+
static const struct net_device_ops ag71xx_netdev_ops = {
.ndo_open = ag71xx_open,
.ndo_stop = ag71xx_stop,
@@ -936,6 +950,9 @@ static const struct net_device_ops ag71xx_netdev_ops = {
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = ag71xx_netpoll,
+#endif
};
static int __init ag71xx_probe(struct platform_device *pdev)