]> err.no Git - linux-2.6/commitdiff
[PATCH] ixp2000: add netpoll support
authorLennert Buytenhek <buytenh@wantstofly.org>
Wed, 23 Nov 2005 11:50:04 +0000 (12:50 +0100)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Dec 2005 07:25:27 +0000 (02:25 -0500)
Add netpoll support to the ixp2000 driver.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/ixp2000/ixpdev.c

index 2ef8f8fa6c4a6b2013dfc2681e3ac51d944aedde..0f7b8ab62d78d8a707c4a74d8c8376b43669cf27 100644 (file)
@@ -218,6 +218,15 @@ static irqreturn_t ixpdev_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void ixpdev_poll_controller(struct net_device *dev)
+{
+       disable_irq(IRQ_IXP2000_THDA0);
+       ixpdev_interrupt(IRQ_IXP2000_THDA0, dev, NULL);
+       enable_irq(IRQ_IXP2000_THDA0);
+}
+#endif
+
 static int ixpdev_open(struct net_device *dev)
 {
        struct ixpdev_priv *ip = netdev_priv(dev);
@@ -268,6 +277,9 @@ struct net_device *ixpdev_alloc(int channel, int sizeof_priv)
        dev->poll = ixpdev_poll;
        dev->open = ixpdev_open;
        dev->stop = ixpdev_close;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller = ixpdev_poll_controller;
+#endif
 
        dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
        dev->weight = 64;