Commit 4562a42b authored by Colin Leroy's avatar Colin Leroy Committed by David S. Miller

[SUNGEM]: Add polling support.

Signed-off-by: default avatarColin Leroy <colin@colino.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8dce0aac
...@@ -2742,6 +2742,23 @@ static void get_gem_mac_nonobp(struct pci_dev *pdev, unsigned char *dev_addr) ...@@ -2742,6 +2742,23 @@ static void get_gem_mac_nonobp(struct pci_dev *pdev, unsigned char *dev_addr)
} }
#endif /* not Sparc and not PPC */ #endif /* not Sparc and not PPC */
#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 gem_netpoll(struct net_device *netdev)
{
struct gem *gp = netdev->priv;
if (!gp->pdev)
return;
disable_irq(gp->pdev->irq);
gem_interrupt(gp->pdev->irq, netdev, NULL);
enable_irq(gp->pdev->irq);
}
#endif
static int __devinit gem_get_device_address(struct gem *gp) static int __devinit gem_get_device_address(struct gem *gp)
{ {
#if defined(__sparc__) || defined(CONFIG_PPC_PMAC) #if defined(__sparc__) || defined(CONFIG_PPC_PMAC)
...@@ -2940,6 +2957,9 @@ static int __devinit gem_init_one(struct pci_dev *pdev, ...@@ -2940,6 +2957,9 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
dev->set_multicast_list = gem_set_multicast; dev->set_multicast_list = gem_set_multicast;
dev->do_ioctl = gem_ioctl; dev->do_ioctl = gem_ioctl;
dev->poll = gem_poll; dev->poll = gem_poll;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = gem_netpoll;
#endif
dev->weight = 64; dev->weight = 64;
dev->ethtool_ops = &gem_ethtool_ops; dev->ethtool_ops = &gem_ethtool_ops;
dev->tx_timeout = gem_tx_timeout; dev->tx_timeout = gem_tx_timeout;
......
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