FS_ENET: Add polling support
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
aa90f50321
commit
9b8ee8e7d6
|
@ -59,6 +59,9 @@ module_param(fs_enet_debug, int, 0);
|
||||||
MODULE_PARM_DESC(fs_enet_debug,
|
MODULE_PARM_DESC(fs_enet_debug,
|
||||||
"Freescale bitmapped debugging message enable value");
|
"Freescale bitmapped debugging message enable value");
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
|
static void fs_enet_netpoll(struct net_device *dev);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void fs_set_multicast_list(struct net_device *dev)
|
static void fs_set_multicast_list(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -1037,6 +1040,11 @@ static struct net_device *fs_init_instance(struct device *dev,
|
||||||
ndev->stop = fs_enet_close;
|
ndev->stop = fs_enet_close;
|
||||||
ndev->get_stats = fs_enet_get_stats;
|
ndev->get_stats = fs_enet_get_stats;
|
||||||
ndev->set_multicast_list = fs_set_multicast_list;
|
ndev->set_multicast_list = fs_set_multicast_list;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
|
ndev->poll_controller = fs_enet_netpoll;
|
||||||
|
#endif
|
||||||
|
|
||||||
netif_napi_add(ndev, &fep->napi,
|
netif_napi_add(ndev, &fep->napi,
|
||||||
fs_enet_rx_napi, fpi->napi_weight);
|
fs_enet_rx_napi, fpi->napi_weight);
|
||||||
|
|
||||||
|
@ -1262,6 +1270,15 @@ static void __exit fs_cleanup(void)
|
||||||
cleanup_immap();
|
cleanup_immap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
|
static void fs_enet_netpoll(struct net_device *dev)
|
||||||
|
{
|
||||||
|
disable_irq(dev->irq);
|
||||||
|
fs_enet_interrupt(dev->irq, dev, NULL);
|
||||||
|
enable_irq(dev->irq);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
|
|
||||||
module_init(fs_init);
|
module_init(fs_init);
|
||||||
|
|
Loading…
Reference in New Issue