[PATCH] (6/23) sk98: add netpoll console support
From: Stephen Hemminger <hidden>
Date: 2004-11-11 23:54:40
Add netpoll console support From: Michal Schmidt <redacted> Signed-off-by: Stephen Hemminger <redacted> diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
--- a/drivers/net/sk98lin/skge.c 2004-11-03 14:08:32 -08:00
+++ b/drivers/net/sk98lin/skge.c 2004-11-03 14:08:32 -08:00@@ -1125,6 +1125,24 @@ return SkIsrRetHandled; } /* SkGeIsrOnePort */ +#ifdef CONFIG_NET_POLL_CONTROLLER +/**************************************************************************** + * + * SkGePollController - polling receive, for netconsole + * + * Description: + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + * + * Returns: N/A + */ +static void SkGePollController(struct net_device *dev) +{ + disable_irq(dev->irq); + SkGeIsr(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif /**************************************************************************** *
@@ -4928,6 +4946,9 @@ dev->set_mac_address = &SkGeSetMacAddr; dev->do_ioctl = &SkGeIoctl; dev->change_mtu = &SkGeChangeMtu; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &SkGePollController; +#endif dev->flags &= ~IFF_RUNNING; SET_NETDEV_DEV(dev, &pdev->dev);