diff options
author | Richard Weinberger <richard@nod.at> | 2011-07-25 17:12:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 20:57:12 -0700 |
commit | dd71dc4c335a8957d269ce063b3e80933f3482fc (patch) | |
tree | 5656fc75eae80cff60faeb6487432d1289eafcc8 | |
parent | f956b3e40ad7b9f7c0d33b80fe78f57fedb74f49 (diff) | |
download | linux-3.10-dd71dc4c335a8957d269ce063b3e80933f3482fc.tar.gz linux-3.10-dd71dc4c335a8957d269ce063b3e80933f3482fc.tar.bz2 linux-3.10-dd71dc4c335a8957d269ce063b3e80933f3482fc.zip |
um: add netpoll support
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>
-rw-r--r-- | arch/um/drivers/net_kern.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 47d0c37897d..22745b47c82 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -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) { @@ -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 }; /* |