Skip to content

Commit

Permalink
net: pxa168_eth: add netconsole support
Browse files Browse the repository at this point in the history
This implements ndo_poll_controller callback which is necessary to
enable netconsole.

Signed-off-by: Alexander Monakov <[email protected]>
Cc: Russell King <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
amonakov authored and davem330 committed Feb 1, 2018
1 parent e7aadb2 commit 743ffff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/net/ethernet/marvell/pxa168_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,15 @@ static int pxa168_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr,
return -EOPNOTSUPP;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void pxa168_eth_netpoll(struct net_device *dev)
{
disable_irq(dev->irq);
pxa168_eth_int_handler(dev->irq, dev);
enable_irq(dev->irq);
}
#endif

static void pxa168_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
Expand Down Expand Up @@ -1390,6 +1399,9 @@ static const struct net_device_ops pxa168_eth_netdev_ops = {
.ndo_do_ioctl = pxa168_eth_do_ioctl,
.ndo_change_mtu = pxa168_eth_change_mtu,
.ndo_tx_timeout = pxa168_eth_tx_timeout,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = pxa168_eth_netpoll,
#endif
};

static int pxa168_eth_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 743ffff

Please sign in to comment.