diff options
author | Peter Wu <lekensteyn@gmail.com> | 2012-07-17 06:29:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-18 09:40:54 -0700 |
commit | ed36d7b2578e4235d7c281304c14e4085f286236 (patch) | |
tree | 46cfc645ff57e32978c4f76b5bc9c169a1e0db7c /drivers | |
parent | 02756ed4a79f15e4f265c1f6fbc634ce9966f153 (diff) | |
download | linux-stable-ed36d7b2578e4235d7c281304c14e4085f286236.tar.gz linux-stable-ed36d7b2578e4235d7c281304c14e4085f286236.tar.bz2 linux-stable-ed36d7b2578e4235d7c281304c14e4085f286236.zip |
jme: netpoll support
This patch adds the netpoll function to support netconsole. Tested and works
fine on my "JMC250 PCI Express Gigabit Ethernet Controller" (PCI ID 0250).
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/jme.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 4ea6580d3ae8..c911d883c27e 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c @@ -2743,6 +2743,17 @@ jme_set_features(struct net_device *netdev, netdev_features_t features) return 0; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void jme_netpoll(struct net_device *dev) +{ + unsigned long flags; + + local_irq_save(flags); + jme_intr(dev->irq, dev); + local_irq_restore(flags); +} +#endif + static int jme_nway_reset(struct net_device *netdev) { @@ -2944,6 +2955,9 @@ static const struct net_device_ops jme_netdev_ops = { .ndo_tx_timeout = jme_tx_timeout, .ndo_fix_features = jme_fix_features, .ndo_set_features = jme_set_features, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = jme_netpoll, +#endif }; static int __devinit |