drivers/net/tlan.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+) diff -puN drivers/net/tlan.c~tlan-poll_controller drivers/net/tlan.c --- 25/drivers/net/tlan.c~tlan-poll_controller 2003-09-26 22:11:53.000000000 -0700 +++ 25-akpm/drivers/net/tlan.c 2003-09-26 22:11:53.000000000 -0700 @@ -297,6 +297,7 @@ static int TLan_ioctl( struct net_device static int TLan_probe1( struct pci_dev *pdev, long ioaddr, int irq, int rev, const struct pci_device_id *ent); static void TLan_tx_timeout( struct net_device *dev); static int tlan_init_one( struct pci_dev *pdev, const struct pci_device_id *ent); +static void TLan_Poll(struct net_device *dev); static u32 TLan_HandleInvalid( struct net_device *, u16 ); static u32 TLan_HandleTxEOF( struct net_device *, u16 ); @@ -453,6 +454,25 @@ static void __devexit tlan_remove_one( s pci_set_drvdata( pdev, NULL ); } +#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 TLan_Poll (struct net_device *dev) +{ + disable_irq(dev->irq); + TLan_HandleInterrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} + +#endif + + + static struct pci_driver tlan_driver = { .name = "tlan", .id_table = tlan_pci_tbl, @@ -895,6 +915,9 @@ static int TLan_Init( struct net_device dev->do_ioctl = &TLan_ioctl; dev->tx_timeout = &TLan_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &TLan_Poll; +#endif return 0; _