Commit cd53caa1 authored by Ingo Molnar's avatar Ingo Molnar

[netdrvr dmfe] netpoll support

parent 2279a9da
...@@ -299,6 +299,9 @@ static void dmfe_set_filter_mode(struct DEVICE *); ...@@ -299,6 +299,9 @@ static void dmfe_set_filter_mode(struct DEVICE *);
static struct ethtool_ops netdev_ethtool_ops; static struct ethtool_ops netdev_ethtool_ops;
static u16 read_srom_word(long ,int); static u16 read_srom_word(long ,int);
static irqreturn_t dmfe_interrupt(int , void *, struct pt_regs *); static irqreturn_t dmfe_interrupt(int , void *, struct pt_regs *);
#ifdef CONFIG_NET_POLL_CONTROLLER
static void poll_dmfe (struct net_device *dev);
#endif
static void dmfe_descriptor_init(struct dmfe_board_info *, unsigned long); static void dmfe_descriptor_init(struct dmfe_board_info *, unsigned long);
static void allocate_rx_buffer(struct dmfe_board_info *); static void allocate_rx_buffer(struct dmfe_board_info *);
static void update_cr6(u32, unsigned long); static void update_cr6(u32, unsigned long);
...@@ -417,6 +420,9 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, ...@@ -417,6 +420,9 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
dev->stop = &dmfe_stop; dev->stop = &dmfe_stop;
dev->get_stats = &dmfe_get_stats; dev->get_stats = &dmfe_get_stats;
dev->set_multicast_list = &dmfe_set_filter_mode; dev->set_multicast_list = &dmfe_set_filter_mode;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &poll_dmfe;
#endif
dev->ethtool_ops = &netdev_ethtool_ops; dev->ethtool_ops = &netdev_ethtool_ops;
spin_lock_init(&db->lock); spin_lock_init(&db->lock);
...@@ -791,6 +797,23 @@ static irqreturn_t dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -791,6 +797,23 @@ static irqreturn_t dmfe_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
#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_dmfe (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);
dmfe_interrupt (dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
/* /*
* Free TX resource after TX complete * Free TX resource after TX complete
*/ */
......
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