Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75561
b: refs/heads/master
c: 0da1b99
h: refs/heads/master
i:
  75559: d7b215e
v: v3
  • Loading branch information
Francois Romieu committed Jan 17, 2008
1 parent 5262951 commit 7914c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 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: 227bc24d675d80de1cfb3ab72891cc932dadbc3b
refs/heads/master: 0da1b995aee447656c0eb77e4e32468e37f868a3
19 changes: 5 additions & 14 deletions trunk/drivers/net/ipg.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,21 +857,14 @@ static void init_tfdlist(struct net_device *dev)
static void ipg_nic_txfree(struct net_device *dev)
{
struct ipg_nic_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp->ioaddr;
unsigned int curr;
u64 txd_map;
unsigned int released, pending;

txd_map = (u64)sp->txd_map;
curr = ipg_r32(TFD_LIST_PTR_0) -
do_div(txd_map, sizeof(struct ipg_tx)) - 1;
unsigned int released, pending, dirty;

IPG_DEBUG_MSG("_nic_txfree\n");

pending = sp->tx_current - sp->tx_dirty;
dirty = sp->tx_dirty % IPG_TFDLIST_LENGTH;

for (released = 0; released < pending; released++) {
unsigned int dirty = sp->tx_dirty % IPG_TFDLIST_LENGTH;
struct sk_buff *skb = sp->TxBuff[dirty];
struct ipg_tx *txfd = sp->txd + dirty;

Expand All @@ -882,11 +875,8 @@ static void ipg_nic_txfree(struct net_device *dev)
* If the TFDDone bit is set, free the associated
* buffer.
*/
if (dirty == curr)
break;

/* Setup TFDDONE for compatible issue. */
txfd->tfc |= cpu_to_le64(IPG_TFC_TFDDONE);
if (!(txfd->tfc & cpu_to_le64(IPG_TFC_TFDDONE)))
break;

/* Free the transmit buffer. */
if (skb) {
Expand All @@ -898,6 +888,7 @@ static void ipg_nic_txfree(struct net_device *dev)

sp->TxBuff[dirty] = NULL;
}
dirty = (dirty + 1) % IPG_TFDLIST_LENGTH;
}

sp->tx_dirty += released;
Expand Down

0 comments on commit 7914c48

Please sign in to comment.