sundance: Add netpoll support
authorDenis Kirjanov <kda@linux-powerpc.org>
Sat, 17 Aug 2013 05:08:48 +0000 (09:08 +0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Aug 2013 22:05:03 +0000 (15:05 -0700)
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dlink/sundance.c

index 50d9c631593090e8d2b335fcb4d947346091fa42..bf3bf6f22c998b7c7ef2563be2041737a15959fe 100644 (file)
@@ -469,6 +469,17 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
        }
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void sundance_poll_controller(struct net_device *dev)
+{
+       struct netdev_private *np = netdev_priv(dev);
+
+       disable_irq(np->pci_dev->irq);
+       intr_handler(np->pci_dev->irq, dev);
+       enable_irq(np->pci_dev->irq);
+}
+#endif
+
 static const struct net_device_ops netdev_ops = {
        .ndo_open               = netdev_open,
        .ndo_stop               = netdev_close,
@@ -480,6 +491,9 @@ static const struct net_device_ops netdev_ops = {
        .ndo_change_mtu         = change_mtu,
        .ndo_set_mac_address    = sundance_set_mac_addr,
        .ndo_validate_addr      = eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = sundance_poll_controller,
+#endif
 };
 
 static int sundance_probe1(struct pci_dev *pdev,
This page took 0.028156 seconds and 5 git commands to generate.