Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41504
b: refs/heads/master
c: 2109f89
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Huang authored and Jeff Garzik committed Dec 2, 2006
1 parent 17f2ad4 commit a93758f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: e242040df1da94a9a3daa98ea5539e2b52502bb4
refs/heads/master: 2109f89f3483ff5a05899385ee3fb04d779e9cce
16 changes: 14 additions & 2 deletions trunk/drivers/net/sundance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,8 @@ reset_tx (struct net_device *dev)

/* free all tx skbuff */
for (i = 0; i < TX_RING_SIZE; i++) {
np->tx_ring[i].next_desc = 0;

skb = np->tx_skbuff[i];
if (skb) {
pci_unmap_single(np->pci_dev,
Expand All @@ -1094,6 +1096,10 @@ reset_tx (struct net_device *dev)
}
np->cur_tx = np->dirty_tx = 0;
np->cur_task = 0;

np->last_tx = 0;
iowrite8(127, ioaddr + TxDMAPollPeriod);

iowrite16 (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
return 0;
}
Expand Down Expand Up @@ -1162,8 +1168,14 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
sundance_reset(dev, (NetworkReset|FIFOReset|TxReset) << 16);
/* No need to reset the Tx pointer here */
}
/* Restart the Tx. */
iowrite16 (TxEnable, ioaddr + MACCtrl1);
/* Restart the Tx. Need to make sure tx enabled */
i = 10;
do {
iowrite16(ioread16(ioaddr + MACCtrl1) | TxEnable, ioaddr + MACCtrl1);
if (ioread16(ioaddr + MACCtrl1) & TxEnabled)
break;
mdelay(1);
} while (--i);
}
/* Yup, this is a documentation bug. It cost me *hours*. */
iowrite16 (0, ioaddr + TxStatus);
Expand Down

0 comments on commit a93758f

Please sign in to comment.