aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 20:48:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 20:48:54 -0400
commit1f1c2881f673671539b25686df463518d69c4649 (patch)
tree45f4a79f2371ae4525fd621d4b5820732efa161e /drivers/net/8139cp.c
parent7608a864e5211df1e3c1948e2719aec7c27b9333 (diff)
parentc5e3ae8823693b260ce1f217adca8add1bc0b3de (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (37 commits) forcedeth bug fix: realtek phy forcedeth bug fix: vitesse phy forcedeth bug fix: cicada phy atl1: reorder atl1_main functions atl1: fix excessively indented code atl1: cleanup atl1_main atl1: header file cleanup atl1: remove irq_sem cdc-subset to support new vendor/product ID 8139cp: implement the missing dev->tx_timeout myri10ge: Remove nonsensical limit in the tx done routine gianfar: kill unused header EP93XX_ETH must select MII macb: Add multicast capability macb: Use generic PHY layer s390: add barriers to qeth driver s390: scatter-gather for inbound traffic in qeth driver eHEA: Introducing support vor DLPAR memory add Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c [PATCH] softmac: Fix ESSID problem ...
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r--drivers/net/8139cp.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 807e6992e614..e970e64bf966 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
1220static 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
1222static int cp_change_mtu(struct net_device *dev, int new_mtu) 1245static int cp_change_mtu(struct net_device *dev, int new_mtu)
1223{ 1246{
@@ -1920,10 +1943,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1920 dev->change_mtu = cp_change_mtu; 1943 dev->change_mtu = cp_change_mtu;
1921#endif 1944#endif
1922 dev->ethtool_ops = &cp_ethtool_ops; 1945 dev->ethtool_ops = &cp_ethtool_ops;
1923#if 0
1924 dev->tx_timeout = cp_tx_timeout; 1946 dev->tx_timeout = cp_tx_timeout;
1925 dev->watchdog_timeo = TX_TIMEOUT; 1947 dev->watchdog_timeo = TX_TIMEOUT;
1926#endif
1927 1948
1928#if CP_VLAN_TAG_USED 1949#if CP_VLAN_TAG_USED
1929 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 1950 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;