From: Thomas Elsen This patch adds poll-controller functionality to the 8139too driver. It has been tested with kgdb-over-ethernet. drivers/net/8139too.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) diff -puN drivers/net/8139too.c~8139too-poll_controller drivers/net/8139too.c --- 25/drivers/net/8139too.c~8139too-poll_controller 2003-10-29 19:30:06.000000000 -0800 +++ 25-akpm/drivers/net/8139too.c 2003-10-29 19:30:06.000000000 -0800 @@ -620,6 +620,10 @@ static void __set_rx_mode (struct net_de static void rtl8139_hw_start (struct net_device *dev); static struct ethtool_ops rtl8139_ethtool_ops; +#ifdef CONFIG_NET_POLL_CONTROLLER +static void rtl8139_rx_poll (struct net_device *dev); +#endif + #ifdef USE_IO_OPS #define RTL_R8(reg) inb (((unsigned long)ioaddr) + (reg)) @@ -972,6 +976,10 @@ static int __devinit rtl8139_init_one (s dev->tx_timeout = rtl8139_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = rtl8139_rx_poll; +#endif + /* note: the hardware is not capable of sg/csum/highdma, however * through the use of skb_copy_and_csum_dev we enable these * features @@ -2390,6 +2398,15 @@ static struct net_device_stats *rtl8139_ return &tp->stats; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void rtl8139_rx_poll (struct net_device *dev) +{ + disable_irq(dev->irq); + rtl8139_interrupt(dev->irq, (void *)dev, 0); + enable_irq(dev->irq); +} +#endif + /* Set or clear the multicast filter for this adaptor. This routine is not state sensitive and need not be SMP locked. */ _