25-akpm/drivers/net/tulip/tulip_core.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+) diff -puN drivers/net/tulip/tulip_core.c~tulip-poll_controller drivers/net/tulip/tulip_core.c --- 25/drivers/net/tulip/tulip_core.c~tulip-poll_controller Wed Oct 15 13:18:11 2003 +++ 25-akpm/drivers/net/tulip/tulip_core.c Wed Oct 15 13:18:11 2003 @@ -247,6 +247,9 @@ static void tulip_down(struct net_device static struct net_device_stats *tulip_get_stats(struct net_device *dev); static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void set_rx_mode(struct net_device *dev); +#ifdef CONFIG_NET_POLL_CONTROLLER +static void poll_tulip(struct net_device *dev); +#endif @@ -1632,6 +1635,9 @@ static int __devinit tulip_init_one (str dev->get_stats = tulip_get_stats; dev->do_ioctl = private_ioctl; dev->set_multicast_list = set_rx_mode; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &poll_tulip; +#endif if (register_netdev(dev)) goto err_out_free_ring; @@ -1789,6 +1795,24 @@ static void __devexit tulip_remove_one ( } +#ifdef CONFIG_NET_POLL_CONTROLLER + +/* + * Polling 'interrupt' - used by things like netconsole to send skbs + * without having to re-enable interrupts. It's not called while + * the interrupt routine is executing. + */ + +static void poll_tulip (struct net_device *dev) +{ + disable_irq(dev->irq); + tulip_interrupt (dev->irq, dev, NULL); + enable_irq(dev->irq); +} + +#endif + + static struct pci_driver tulip_driver = { .name = DRV_NAME, .id_table = tulip_pci_tbl, _