Skip to content

Commit

Permalink
arc_emac: add netpoll support
Browse files Browse the repository at this point in the history
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Beniamino Galvani authored and David S. Miller committed May 13, 2014
1 parent 775dd68 commit 5a45e57
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/net/ethernet/arc/emac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ static irqreturn_t arc_emac_intr(int irq, void *dev_instance)
return IRQ_HANDLED;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void arc_emac_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
arc_emac_intr(dev->irq, dev);
enable_irq(dev->irq);
}
#endif

/**
* arc_emac_open - Open the network device.
* @ndev: Pointer to the network device.
Expand Down Expand Up @@ -657,6 +666,9 @@ static const struct net_device_ops arc_emac_netdev_ops = {
.ndo_set_mac_address = arc_emac_set_address,
.ndo_get_stats = arc_emac_stats,
.ndo_set_rx_mode = arc_emac_set_rx_mode,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = arc_emac_poll_controller,
#endif
};

static int arc_emac_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 5a45e57

Please sign in to comment.