aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-02-01 08:22:54 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-03 07:25:59 -0500
commit26d29ea799b200c2499a7b41920c2dbfe710bea7 (patch)
tree178a8d23eb71a863a6818571d3acce35c718e91e
parent80a9fad8e89a23c31bab9c228a88a391c4f8d698 (diff)
ucc_geth: add support for netpoll
This patch adds netpoll support for the QE UCC Gigabit Ethernet driver. Tested using netconsole and KGDBoE. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ucc_geth.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index e41da4670d0b..fba0811d2608 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3666,6 +3666,23 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
3666 return IRQ_HANDLED; 3666 return IRQ_HANDLED;
3667} 3667}
3668 3668
3669#ifdef CONFIG_NET_POLL_CONTROLLER
3670/*
3671 * Polling 'interrupt' - used by things like netconsole to send skbs
3672 * without having to re-enable interrupts. It's not called while
3673 * the interrupt routine is executing.
3674 */
3675static void ucc_netpoll(struct net_device *dev)
3676{
3677 struct ucc_geth_private *ugeth = netdev_priv(dev);
3678 int irq = ugeth->ug_info->uf_info.irq;
3679
3680 disable_irq(irq);
3681 ucc_geth_irq_handler(irq, dev);
3682 enable_irq(irq);
3683}
3684#endif /* CONFIG_NET_POLL_CONTROLLER */
3685
3669/* Called when something needs to use the ethernet device */ 3686/* Called when something needs to use the ethernet device */
3670/* Returns 0 for success. */ 3687/* Returns 0 for success. */
3671static int ucc_geth_open(struct net_device *dev) 3688static int ucc_geth_open(struct net_device *dev)
@@ -4008,6 +4025,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4008#ifdef CONFIG_UGETH_NAPI 4025#ifdef CONFIG_UGETH_NAPI
4009 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); 4026 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
4010#endif /* CONFIG_UGETH_NAPI */ 4027#endif /* CONFIG_UGETH_NAPI */
4028#ifdef CONFIG_NET_POLL_CONTROLLER
4029 dev->poll_controller = ucc_netpoll;
4030#endif
4011 dev->stop = ucc_geth_close; 4031 dev->stop = ucc_geth_close;
4012// dev->change_mtu = ucc_geth_change_mtu; 4032// dev->change_mtu = ucc_geth_change_mtu;
4013 dev->mtu = 1500; 4033 dev->mtu = 1500;