Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60490
b: refs/heads/master
c: 9030c0d
h: refs/heads/master
v: v3
  • Loading branch information
Francois Romieu authored and Jeff Garzik committed Jul 16, 2007
1 parent 204481c commit caf2dec
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c97884b5de95a11d1668f134a51c1d150d214391
refs/heads/master: 9030c0d24dbb90bbe6b31dc93c3be5e36290c7c3
27 changes: 24 additions & 3 deletions trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
TODO:
* Test Tx checksumming thoroughly
* Implement dev->tx_timeout
Low priority TODO:
* Complete reset on PciErr
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit caf2dec

Please sign in to comment.