aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/net_kern.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2011-07-25 20:12:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 23:57:12 -0400
commitdd71dc4c335a8957d269ce063b3e80933f3482fc (patch)
tree5656fc75eae80cff60faeb6487432d1289eafcc8 /arch/um/drivers/net_kern.c
parentf956b3e40ad7b9f7c0d33b80fe78f57fedb74f49 (diff)
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>
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-rw-r--r--arch/um/drivers/net_kern.c12
1 files changed, 12 insertions, 0 deletions
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)
262 return 0; 262 return 0;
263} 263}
264 264
265#ifdef CONFIG_NET_POLL_CONTROLLER
266static void uml_net_poll_controller(struct net_device *dev)
267{
268 disable_irq(dev->irq);
269 uml_net_interrupt(dev->irq, dev);
270 enable_irq(dev->irq);
271}
272#endif
273
265static void uml_net_get_drvinfo(struct net_device *dev, 274static void uml_net_get_drvinfo(struct net_device *dev,
266 struct ethtool_drvinfo *info) 275 struct ethtool_drvinfo *info)
267{ 276{
@@ -364,6 +373,9 @@ static const struct net_device_ops uml_netdev_ops = {
364 .ndo_set_mac_address = eth_mac_addr, 373 .ndo_set_mac_address = eth_mac_addr,
365 .ndo_change_mtu = uml_net_change_mtu, 374 .ndo_change_mtu = uml_net_change_mtu,
366 .ndo_validate_addr = eth_validate_addr, 375 .ndo_validate_addr = eth_validate_addr,
376#ifdef CONFIG_NET_POLL_CONTROLLER
377 .ndo_poll_controller = uml_net_poll_controller,
378#endif
367}; 379};
368 380
369/* 381/*