Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d68300182828596016d7a6c0f23a912f07d9d0df
Commit:     d68300182828596016d7a6c0f23a912f07d9d0df
Parent:     0c61ed5fe2c36b502a716a2ea3dd24e846029287
Author:     Deepak Saxena <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 15:43:11 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Apr 28 11:01:01 2007 -0400

    Netpoll support for Sibyte MAC
    
    NETPOLL support for Sibyte MAC
    
    Signed-off-by: Manish Lachwani <[EMAIL PROTECTED]>
    Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/sb1250-mac.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 0a3a379..e3f1a07 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -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)
@@ -2399,6 +2419,9 @@ static int sbmac_init(struct net_device *dev, int idx)
        dev->watchdog_timeo     = TX_TIMEOUT;
 
        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 */
        sbmac_set_iphdr_offset(sc);
-
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