Commit af2398ba authored by Andi Kleen's avatar Andi Kleen Committed by Stephen Hemminger

[PATCH] netpoll for tulip

Netpoll for tulip. Uses disable_irq() because tulip is unfortunately
still lockless.
parent 875ed1a1
......@@ -247,7 +247,7 @@ static void tulip_down(struct net_device *dev);
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);
static void poll_tulip(struct net_device *dev);
static void tulip_set_power_state (struct tulip_private *tp,
......@@ -1633,6 +1633,9 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
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 +1792,22 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev)
/* pci_power_off (pdev, -1); */
}
#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 here is not very nice, but with the lockless
interrupt handler we have no other choice. */
disable_irq(dev->irq);
tulip_interrupt (dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
static struct pci_driver tulip_driver = {
.name = DRV_NAME,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment