Skip to content

Commit

Permalink
jme: netpoll support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Wu authored and David S. Miller committed Jul 18, 2012
1 parent 02756ed commit ed36d7b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/ethernet/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ed36d7b

Please sign in to comment.