aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dlink
diff options
context:
space:
mode:
authorDenis Kirjanov <kda@linux-powerpc.org>2013-08-17 01:08:48 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-20 18:05:03 -0400
commitcb74e27356db43e3dca70ff4b915a488b5ad5545 (patch)
tree9dd0be0a538c468a1befd6c05745aab21d5101a6 /drivers/net/ethernet/dlink
parentdf8372ca747f6da9e8590775721d9363c1dfc87e (diff)
sundance: Add netpoll support
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dlink')
-rw-r--r--drivers/net/ethernet/dlink/sundance.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c
index 50d9c6315930..bf3bf6f22c99 100644
--- a/drivers/net/ethernet/dlink/sundance.c
+++ b/drivers/net/ethernet/dlink/sundance.c
@@ -469,6 +469,17 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
469 } 469 }
470} 470}
471 471
472#ifdef CONFIG_NET_POLL_CONTROLLER
473static void sundance_poll_controller(struct net_device *dev)
474{
475 struct netdev_private *np = netdev_priv(dev);
476
477 disable_irq(np->pci_dev->irq);
478 intr_handler(np->pci_dev->irq, dev);
479 enable_irq(np->pci_dev->irq);
480}
481#endif
482
472static const struct net_device_ops netdev_ops = { 483static const struct net_device_ops netdev_ops = {
473 .ndo_open = netdev_open, 484 .ndo_open = netdev_open,
474 .ndo_stop = netdev_close, 485 .ndo_stop = netdev_close,
@@ -480,6 +491,9 @@ static const struct net_device_ops netdev_ops = {
480 .ndo_change_mtu = change_mtu, 491 .ndo_change_mtu = change_mtu,
481 .ndo_set_mac_address = sundance_set_mac_addr, 492 .ndo_set_mac_address = sundance_set_mac_addr,
482 .ndo_validate_addr = eth_validate_addr, 493 .ndo_validate_addr = eth_validate_addr,
494#ifdef CONFIG_NET_POLL_CONTROLLER
495 .ndo_poll_controller = sundance_poll_controller,
496#endif
483}; 497};
484 498
485static int sundance_probe1(struct pci_dev *pdev, 499static int sundance_probe1(struct pci_dev *pdev,