Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9030c0d24dbb90bbe6b31dc93c3be5e36290c7c3
Commit:     9030c0d24dbb90bbe6b31dc93c3be5e36290c7c3
Parent:     c97884b5de95a11d1668f134a51c1d150d214391
Author:     Francois Romieu <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 13 23:05:35 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 18:28:05 2007 -0400

    8139cp: implement the missing dev->tx_timeout
    
    Signed-off-by: Mika Lansirinne <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/8139cp.c |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 58bbc3e..f5223ec 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -26,7 +26,6 @@
 
        TODO:
        * Test Tx checksumming thoroughly
-       * Implement dev->tx_timeout
 
        Low priority TODO:
        * Complete reset on PciErr
@@ -1218,6 +1217,30 @@ static int cp_close (struct net_device *dev)
        return 0;
 }
 
+static void cp_tx_timeout(struct net_device *dev)
+{
+       struct cp_private *cp = netdev_priv(dev);
+       unsigned long flags;
+       int rc;
+
+       printk(KERN_WARNING "%s: Transmit timeout, status %2x %4x %4x %4x\n",
+              dev->name, cpr8(Cmd), cpr16(CpCmd),
+              cpr16(IntrStatus), cpr16(IntrMask));
+
+       spin_lock_irqsave(&cp->lock, flags);
+
+       cp_stop_hw(cp);
+       cp_clean_rings(cp);
+       rc = cp_init_rings(cp);
+       cp_start_hw(cp);
+
+       netif_wake_queue(dev);
+
+       spin_unlock_irqrestore(&cp->lock, flags);
+
+       return;
+}
+
 #ifdef BROKEN
 static int cp_change_mtu(struct net_device *dev, int new_mtu)
 {
@@ -1923,10 +1946,8 @@ static int cp_init_one (struct pci_dev *pdev, const 
struct pci_device_id *ent)
        dev->change_mtu = cp_change_mtu;
 #endif
        dev->ethtool_ops = &cp_ethtool_ops;
-#if 0
        dev->tx_timeout = cp_tx_timeout;
        dev->watchdog_timeo = TX_TIMEOUT;
-#endif
 
 #if CP_VLAN_TAG_USED
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
-
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