]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] AT91RM9200 Ethernet: Add netpoll / netconsole support
authorAndrew Victor <andrew@sanpeople.com>
Tue, 5 Dec 2006 13:33:05 +0000 (15:33 +0200)
committerJeff Garzik <jeff@garzik.org>
Thu, 7 Dec 2006 09:58:32 +0000 (04:58 -0500)
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>
drivers/net/arm/at91_ether.c

index 918368cdb766c71f168dd9087c123c4b7a364d65..f33d957adc7a10c13e6c063b2a23a66d37d132b1 100644 (file)
@@ -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);