From: Lennert Buytenhek Date: Sun, 24 Aug 2008 05:19:48 +0000 (+0200) Subject: mv643xx_eth: fix receive buffer DMA unmapping X-Git-Tag: v2.6.28-rc1~717^2~194^2~26 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a499481c167977368a7e7cae8ea1ff2a99518a0;p=linux-2.6-omap-h63xx.git mv643xx_eth: fix receive buffer DMA unmapping 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 --- diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index deee66dcd0a..ad2ae937443 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -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++;