diff options
| author | Matt Porter <mporter@kernel.crashing.org> | 2005-01-06 12:03:59 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-01-06 12:03:59 -0500 |
| commit | 8333589ed91c1a73c7c71044bc8b8f1162da97bb (patch) | |
| tree | 35c4aaf46a366c46e3a6d6edf9d44c9b9effea26 | |
| parent | 7b752d7941321c09ac363d16abccf1bc30ccb9e9 (diff) | |
[PATCH] Add netpoll support
Add netpoll support to the EMAC driver.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| -rw-r--r-- | drivers/net/ibm_emac/ibm_emac_core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 77b52db0bf10..7346ab066dbc 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c @@ -1703,6 +1703,15 @@ struct mal_commac_ops emac_commac_ops = { .rxde = &emac_rxde_dev, }; +#ifdef CONFIG_NET_POLL_CONTROLLER +static int emac_netpoll(struct net_device *ndev) +{ + emac_rxeob_dev((void *)ndev, 0); + emac_txeob_dev((void *)ndev, 0); + return 0; +} +#endif + static int emac_init_device(struct ocp_device *ocpdev, struct ibm_ocp_mal *mal) { int deferred_init = 0; @@ -1885,6 +1894,9 @@ static int emac_init_device(struct ocp_device *ocpdev, struct ibm_ocp_mal *mal) SET_ETHTOOL_OPS(ndev, &emac_ethtool_ops); if (emacdata->tah_idx >= 0) ndev->features = NETIF_F_IP_CSUM | NETIF_F_SG; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = emac_netpoll; +#endif SET_MODULE_OWNER(ndev); |
