aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2006-12-05 15:33:05 +0200
committerJeff Garzik <jeff@garzik.org>2006-12-07 04:58:32 -0500
commit51cc21045714cc9f48eb6901d95eb4e552ef2ca4 (patch)
treee815f17801576a8bc5def9608e910423014d3822 /drivers/net
parentcf42553ab43e102bc98eca05523d2390a1eedde9 (diff)
[PATCH] AT91RM9200 Ethernet: Add netpoll / netconsole support
Adds netpoll / netconsole support. Original patch from Bill Gatliff. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arm/at91_ether.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 918368cdb76..f33d957adc7 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -923,6 +923,17 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id)
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 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
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);