Commit d6830018 authored by Deepak Saxena's avatar Deepak Saxena Committed by Jeff Garzik

Netpoll support for Sibyte MAC

NETPOLL support for Sibyte MAC
Signed-off-by: default avatarManish Lachwani <mlachwani@mvista.com>
Signed-off-by: default avatarDeepak Saxena <dsaxena@mvista.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 0c61ed5f
...@@ -1125,6 +1125,26 @@ static void sbdma_fillring(sbmacdma_t *d) ...@@ -1125,6 +1125,26 @@ static void sbdma_fillring(sbmacdma_t *d)
} }
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void sbmac_netpoll(struct net_device *netdev)
{
struct sbmac_softc *sc = netdev_priv(netdev);
int irq = sc->sbm_dev->irq;
__raw_writeq(0, sc->sbm_imr);
sbmac_intr(irq, netdev, NULL);
#ifdef CONFIG_SBMAC_COALESCE
__raw_writeq(((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_TX_CH0) |
((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_RX_CH0),
sc->sbm_imr);
#else
__raw_writeq((M_MAC_INT_CHANNEL << S_MAC_TX_CH0) |
(M_MAC_INT_CHANNEL << S_MAC_RX_CH0), sc->sbm_imr);
#endif
}
#endif
/********************************************************************** /**********************************************************************
* SBDMA_RX_PROCESS(sc,d) * SBDMA_RX_PROCESS(sc,d)
...@@ -2399,6 +2419,9 @@ static int sbmac_init(struct net_device *dev, int idx) ...@@ -2399,6 +2419,9 @@ static int sbmac_init(struct net_device *dev, int idx)
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
dev->change_mtu = sb1250_change_mtu; dev->change_mtu = sb1250_change_mtu;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = sbmac_netpoll;
#endif
/* This is needed for PASS2 for Rx H/W checksum feature */ /* This is needed for PASS2 for Rx H/W checksum feature */
sbmac_set_iphdr_offset(sc); sbmac_set_iphdr_offset(sc);
......
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