Commit 8333589e authored by Matt Porter's avatar Matt Porter Committed by Jeff Garzik

[PATCH] Add netpoll support

Add netpoll support to the EMAC driver.
Signed-off-by: default avatarMatt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 7b752d79
......@@ -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);
......
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