diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2007-07-13 17:05:35 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-16 18:28:05 -0400 |
commit | 9030c0d24dbb90bbe6b31dc93c3be5e36290c7c3 (patch) | |
tree | c671157177d936c99371cb6a51f04ca0b1eeb0d5 /drivers | |
parent | c97884b5de95a11d1668f134a51c1d150d214391 (diff) |
8139cp: implement the missing dev->tx_timeout
Signed-off-by: Mika Lansirinne <mika.lansirinne@stonesoft.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 58bbc3e6d0de..f5223eca2f7b 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | TODO: | 27 | TODO: |
28 | * Test Tx checksumming thoroughly | 28 | * Test Tx checksumming thoroughly |
29 | * Implement dev->tx_timeout | ||
30 | 29 | ||
31 | Low priority TODO: | 30 | Low priority TODO: |
32 | * Complete reset on PciErr | 31 | * Complete reset on PciErr |
@@ -1218,6 +1217,30 @@ static int cp_close (struct net_device *dev) | |||
1218 | return 0; | 1217 | return 0; |
1219 | } | 1218 | } |
1220 | 1219 | ||
1220 | static void cp_tx_timeout(struct net_device *dev) | ||
1221 | { | ||
1222 | struct cp_private *cp = netdev_priv(dev); | ||
1223 | unsigned long flags; | ||
1224 | int rc; | ||
1225 | |||
1226 | printk(KERN_WARNING "%s: Transmit timeout, status %2x %4x %4x %4x\n", | ||
1227 | dev->name, cpr8(Cmd), cpr16(CpCmd), | ||
1228 | cpr16(IntrStatus), cpr16(IntrMask)); | ||
1229 | |||
1230 | spin_lock_irqsave(&cp->lock, flags); | ||
1231 | |||
1232 | cp_stop_hw(cp); | ||
1233 | cp_clean_rings(cp); | ||
1234 | rc = cp_init_rings(cp); | ||
1235 | cp_start_hw(cp); | ||
1236 | |||
1237 | netif_wake_queue(dev); | ||
1238 | |||
1239 | spin_unlock_irqrestore(&cp->lock, flags); | ||
1240 | |||
1241 | return; | ||
1242 | } | ||
1243 | |||
1221 | #ifdef BROKEN | 1244 | #ifdef BROKEN |
1222 | static int cp_change_mtu(struct net_device *dev, int new_mtu) | 1245 | static int cp_change_mtu(struct net_device *dev, int new_mtu) |
1223 | { | 1246 | { |
@@ -1923,10 +1946,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1923 | dev->change_mtu = cp_change_mtu; | 1946 | dev->change_mtu = cp_change_mtu; |
1924 | #endif | 1947 | #endif |
1925 | dev->ethtool_ops = &cp_ethtool_ops; | 1948 | dev->ethtool_ops = &cp_ethtool_ops; |
1926 | #if 0 | ||
1927 | dev->tx_timeout = cp_tx_timeout; | 1949 | dev->tx_timeout = cp_tx_timeout; |
1928 | dev->watchdog_timeo = TX_TIMEOUT; | 1950 | dev->watchdog_timeo = TX_TIMEOUT; |
1929 | #endif | ||
1930 | 1951 | ||
1931 | #if CP_VLAN_TAG_USED | 1952 | #if CP_VLAN_TAG_USED |
1932 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 1953 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |