Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231237
b: refs/heads/master
c: 2a2bc01
h: refs/heads/master
i:
  231235: 357c6d0
v: v3
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Jan 14, 2011
1 parent db7fbce commit 5e2ffbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: bbe9e637330abe55442aebe799425e224086959f
refs/heads/master: 2a2bc012b98729ce9a39386faed28d11ee021683
19 changes: 10 additions & 9 deletions trunk/drivers/net/greth.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev)
greth->tx_skbuff[curr_tx] = NULL;
bdp = greth->tx_bd_base + curr_tx;

status = GRETH_TXBD_CSALL;
status = GRETH_TXBD_CSALL | GRETH_BD_EN;
status |= frag->size & GRETH_BD_LEN;

/* Wrap around descriptor ring */
Expand Down Expand Up @@ -540,26 +540,27 @@ greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev)

wmb();

/* Enable the descriptors that we configured ... */
for (i = 0; i < nr_frags + 1; i++) {
bdp = greth->tx_bd_base + greth->tx_next;
greth_write_bd(&bdp->stat, greth_read_bd(&bdp->stat) | GRETH_BD_EN);
greth->tx_next = NEXT_TX(greth->tx_next);
greth->tx_free--;
}
/* Enable the descriptor chain by enabling the first descriptor */
bdp = greth->tx_bd_base + greth->tx_next;
greth_write_bd(&bdp->stat, greth_read_bd(&bdp->stat) | GRETH_BD_EN);
greth->tx_next = curr_tx;
greth->tx_free -= nr_frags + 1;

wmb();

greth_enable_tx(greth);

return NETDEV_TX_OK;

frag_map_error:
/* Unmap SKB mappings that succeeded */
/* Unmap SKB mappings that succeeded and disable descriptor */
for (i = 0; greth->tx_next + i != curr_tx; i++) {
bdp = greth->tx_bd_base + greth->tx_next + i;
dma_unmap_single(greth->dev,
greth_read_bd(&bdp->addr),
greth_read_bd(&bdp->stat) & GRETH_BD_LEN,
DMA_TO_DEVICE);
greth_write_bd(&bdp->stat, 0);
}
map_error:
if (net_ratelimit())
Expand Down

0 comments on commit 5e2ffbc

Please sign in to comment.