Skip to content

Commit

Permalink
mv643xx_eth: fix receive buffer DMA unmapping
Browse files Browse the repository at this point in the history
When tearing down a DMA mapping for a receive buffer, we should pass
dma_unmap_single() the exact same address that dma_map_single() gave
us when we originally set up the mapping.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Sep 5, 2008
1 parent b987384 commit 3a49948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)

spin_unlock_irqrestore(&mp->lock, flags);

dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
dma_unmap_single(NULL, rx_desc->buf_ptr,
rx_desc->buf_size, DMA_FROM_DEVICE);
rxq->rx_desc_count--;
rx++;
Expand Down

0 comments on commit 3a49948

Please sign in to comment.