Skip to content

Commit

Permalink
xilinx_emaclite: netpoll support
Browse files Browse the repository at this point in the history
Netconsole requires poll support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michal Simek authored and David S. Miller committed Aug 19, 2010
1 parent 6f0bee1 commit 357e8b5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/net/xilinx_emaclite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,13 +1269,26 @@ static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
return 0;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void
xemaclite_poll_controller(struct net_device *ndev)
{
disable_irq(ndev->irq);
xemaclite_interrupt(ndev->irq, ndev);
enable_irq(ndev->irq);
}
#endif

static struct net_device_ops xemaclite_netdev_ops = {
.ndo_open = xemaclite_open,
.ndo_stop = xemaclite_close,
.ndo_start_xmit = xemaclite_send,
.ndo_set_mac_address = xemaclite_set_mac_address,
.ndo_tx_timeout = xemaclite_tx_timeout,
.ndo_get_stats = xemaclite_get_stats,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = xemaclite_poll_controller,
#endif
};

/* Match table for OF platform binding */
Expand Down

0 comments on commit 357e8b5

Please sign in to comment.