Skip to content

Commit

Permalink
um: add netpoll support
Browse files Browse the repository at this point in the history
To make netconsole usable on UML, its ethernet driver needs netpoll
support.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Richard Weinberger authored and Linus Torvalds committed Jul 26, 2011
1 parent f956b3e commit dd71dc4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ static int uml_net_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}

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

static void uml_net_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
Expand Down Expand Up @@ -364,6 +373,9 @@ static const struct net_device_ops uml_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = uml_net_change_mtu,
.ndo_validate_addr = eth_validate_addr,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = uml_net_poll_controller,
#endif
};

/*
Expand Down

0 comments on commit dd71dc4

Please sign in to comment.