Commit ed36d7b2 authored by Peter Wu's avatar Peter Wu Committed by David S. Miller

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: default avatarPeter Wu <lekensteyn@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 02756ed4
...@@ -2743,6 +2743,17 @@ jme_set_features(struct net_device *netdev, netdev_features_t features) ...@@ -2743,6 +2743,17 @@ jme_set_features(struct net_device *netdev, netdev_features_t features)
return 0; 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 static int
jme_nway_reset(struct net_device *netdev) jme_nway_reset(struct net_device *netdev)
{ {
...@@ -2944,6 +2955,9 @@ static const struct net_device_ops jme_netdev_ops = { ...@@ -2944,6 +2955,9 @@ static const struct net_device_ops jme_netdev_ops = {
.ndo_tx_timeout = jme_tx_timeout, .ndo_tx_timeout = jme_tx_timeout,
.ndo_fix_features = jme_fix_features, .ndo_fix_features = jme_fix_features,
.ndo_set_features = jme_set_features, .ndo_set_features = jme_set_features,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = jme_netpoll,
#endif
}; };
static int __devinit static int __devinit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment