aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sb1250-mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sb1250-mac.c')
-rw-r--r--drivers/net/sb1250-mac.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 0a3a379b634c..e3f1a0707267 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -1125,6 +1125,26 @@ static void sbdma_fillring(sbmacdma_t *d)
1125 } 1125 }
1126} 1126}
1127 1127
1128#ifdef CONFIG_NET_POLL_CONTROLLER
1129static void sbmac_netpoll(struct net_device *netdev)
1130{
1131 struct sbmac_softc *sc = netdev_priv(netdev);
1132 int irq = sc->sbm_dev->irq;
1133
1134 __raw_writeq(0, sc->sbm_imr);
1135
1136 sbmac_intr(irq, netdev, NULL);
1137
1138#ifdef CONFIG_SBMAC_COALESCE
1139 __raw_writeq(((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_TX_CH0) |
1140 ((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_RX_CH0),
1141 sc->sbm_imr);
1142#else
1143 __raw_writeq((M_MAC_INT_CHANNEL << S_MAC_TX_CH0) |
1144 (M_MAC_INT_CHANNEL << S_MAC_RX_CH0), sc->sbm_imr);
1145#endif
1146}
1147#endif
1128 1148
1129/********************************************************************** 1149/**********************************************************************
1130 * SBDMA_RX_PROCESS(sc,d) 1150 * SBDMA_RX_PROCESS(sc,d)
@@ -2399,6 +2419,9 @@ static int sbmac_init(struct net_device *dev, int idx)
2399 dev->watchdog_timeo = TX_TIMEOUT; 2419 dev->watchdog_timeo = TX_TIMEOUT;
2400 2420
2401 dev->change_mtu = sb1250_change_mtu; 2421 dev->change_mtu = sb1250_change_mtu;
2422#ifdef CONFIG_NET_POLL_CONTROLLER
2423 dev->poll_controller = sbmac_netpoll;
2424#endif
2402 2425
2403 /* This is needed for PASS2 for Rx H/W checksum feature */ 2426 /* This is needed for PASS2 for Rx H/W checksum feature */
2404 sbmac_set_iphdr_offset(sc); 2427 sbmac_set_iphdr_offset(sc);