Add netpoll support to the EMAC driver.

Signed-off-by: Matt Porter <mporter at kernel.crashing.org>

===== drivers/net/ibm_emac/ibm_emac_core.c 1.5 vs edited =====
--- 1.5/drivers/net/ibm_emac/ibm_emac_core.c    2004-12-03 00:25:48 -07:00
+++ edited/drivers/net/ibm_emac/ibm_emac_core.c 2004-12-07 10:06:23 -07:00
@@ -1700,6 +1700,15 @@
        .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;
@@ -1882,6 +1891,9 @@
        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);
 

Reply via email to