Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172118
b: refs/heads/master
c: ff236f7
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and David S. Miller committed Dec 3, 2009
1 parent 40c30bf commit 2d73022
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: 8818a9d884e3a589899be3303958fff182e98e55
refs/heads/master: ff236f7af82fae0818d7cbb5a0717d3218d00bdd
19 changes: 14 additions & 5 deletions trunk/drivers/net/sunhme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,10 +1226,16 @@ static void happy_meal_clean_rings(struct happy_meal *hp)
for (frag = 0; frag <= skb_shinfo(skb)->nr_frags; frag++) {
txd = &hp->happy_block->happy_meal_txd[i];
dma_addr = hme_read_desc32(hp, &txd->tx_addr);
dma_unmap_single(hp->dma_dev, dma_addr,
(hme_read_desc32(hp, &txd->tx_flags)
& TXFLAG_SIZE),
DMA_TO_DEVICE);
if (!frag)
dma_unmap_single(hp->dma_dev, dma_addr,
(hme_read_desc32(hp, &txd->tx_flags)
& TXFLAG_SIZE),
DMA_TO_DEVICE);
else
dma_unmap_page(hp->dma_dev, dma_addr,
(hme_read_desc32(hp, &txd->tx_flags)
& TXFLAG_SIZE),
DMA_TO_DEVICE);

if (frag != skb_shinfo(skb)->nr_frags)
i++;
Expand Down Expand Up @@ -1953,7 +1959,10 @@ static void happy_meal_tx(struct happy_meal *hp)
dma_len = hme_read_desc32(hp, &this->tx_flags);

dma_len &= TXFLAG_SIZE;
dma_unmap_single(hp->dma_dev, dma_addr, dma_len, DMA_TO_DEVICE);
if (!frag)
dma_unmap_single(hp->dma_dev, dma_addr, dma_len, DMA_TO_DEVICE);
else
dma_unmap_page(hp->dma_dev, dma_addr, dma_len, DMA_TO_DEVICE);

elem = NEXT_TX(elem);
this = &txbase[elem];
Expand Down

0 comments on commit 2d73022

Please sign in to comment.