Skip to content

Commit

Permalink
sundance: Add netpoll support
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Aug 20, 2013
1 parent df8372c commit cb74e27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/ethernet/dlink/sundance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit cb74e27

Please sign in to comment.