Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26d29ea799b200c2499a7b41920c2dbfe710bea7
Commit:     26d29ea799b200c2499a7b41920c2dbfe710bea7
Parent:     80a9fad8e89a23c31bab9c228a88a391c4f8d698
Author:     Anton Vorontsov <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 1 16:22:54 2008 +0300
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sun Feb 3 04:25:59 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/ucc_geth.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index e41da46..fba0811 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)
        return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void ucc_netpoll(struct net_device *dev)
+{
+       struct ucc_geth_private *ugeth = netdev_priv(dev);
+       int irq = ugeth->ug_info->uf_info.irq;
+
+       disable_irq(irq);
+       ucc_geth_irq_handler(irq, dev);
+       enable_irq(irq);
+}
+#endif /* CONFIG_NET_POLL_CONTROLLER */
+
 /* Called when something needs to use the ethernet device */
 /* Returns 0 for success. */
 static 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
 #ifdef CONFIG_UGETH_NAPI
        netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
 #endif                         /* CONFIG_UGETH_NAPI */
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller = ucc_netpoll;
+#endif
        dev->stop = ucc_geth_close;
 //    dev->change_mtu = ucc_geth_change_mtu;
        dev->mtu = 1500;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to