diff options
author | Beniamino Galvani <b.galvani@gmail.com> | 2014-05-11 12:11:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-13 18:02:24 -0400 |
commit | 5a45e57a96dd0e42f1615630c26b4217e78a8908 (patch) | |
tree | 3e8575e2c828f437ac0fbf9e65555218dee9e3c9 | |
parent | 775dd682e2b0ec79fa346152c00870d4a3832a47 (diff) |
arc_emac: add netpoll support
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/arc/emac_main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index be090e68e1d1..18e2faccebb0 100644 --- a/drivers/net/ethernet/arc/emac_main.c +++ b/drivers/net/ethernet/arc/emac_main.c | |||
@@ -363,6 +363,15 @@ static irqreturn_t arc_emac_intr(int irq, void *dev_instance) | |||
363 | return IRQ_HANDLED; | 363 | return IRQ_HANDLED; |
364 | } | 364 | } |
365 | 365 | ||
366 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
367 | static void arc_emac_poll_controller(struct net_device *dev) | ||
368 | { | ||
369 | disable_irq(dev->irq); | ||
370 | arc_emac_intr(dev->irq, dev); | ||
371 | enable_irq(dev->irq); | ||
372 | } | ||
373 | #endif | ||
374 | |||
366 | /** | 375 | /** |
367 | * arc_emac_open - Open the network device. | 376 | * arc_emac_open - Open the network device. |
368 | * @ndev: Pointer to the network device. | 377 | * @ndev: Pointer to the network device. |
@@ -657,6 +666,9 @@ static const struct net_device_ops arc_emac_netdev_ops = { | |||
657 | .ndo_set_mac_address = arc_emac_set_address, | 666 | .ndo_set_mac_address = arc_emac_set_address, |
658 | .ndo_get_stats = arc_emac_stats, | 667 | .ndo_get_stats = arc_emac_stats, |
659 | .ndo_set_rx_mode = arc_emac_set_rx_mode, | 668 | .ndo_set_rx_mode = arc_emac_set_rx_mode, |
669 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
670 | .ndo_poll_controller = arc_emac_poll_controller, | ||
671 | #endif | ||
660 | }; | 672 | }; |
661 | 673 | ||
662 | static int arc_emac_probe(struct platform_device *pdev) | 674 | static int arc_emac_probe(struct platform_device *pdev) |