]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mv643xx_eth: fix receive buffer DMA unmapping
authorLennert Buytenhek <buytenh@wantstofly.org>
Sun, 24 Aug 2008 05:19:48 +0000 (07:19 +0200)
committerLennert Buytenhek <buytenh@marvell.com>
Fri, 5 Sep 2008 04:33:57 +0000 (06:33 +0200)
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>
drivers/net/mv643xx_eth.c

index deee66dcd0adee9793947c9dc4d6b7a0b2dde24a..ad2ae937443d4383ce4e86ca7b2635029548363c 100644 (file)
@@ -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++;