From 80a2d123c617e5b974b87dfb67814eb12e3110b8 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Sat, 16 Jul 2011 23:31:09 +1000 Subject: [PATCH] To make netconsole usable on UML, its ethernet driver needs netpoll support. Signed-off-by: Richard Weinberger Signed-off-by: Andrew Morton --- arch/um/drivers/net_kern.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 47d0c37897d5..22745b47c829 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 }; /* -- 2.39.5