]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
b44: Use kernel DMA addresses for the kernel DMA API
authorMichael Buesch <mb@bu3sch.de>
Mon, 6 Apr 2009 09:52:27 +0000 (09:52 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 May 2009 22:45:00 +0000 (15:45 -0700)
commit 37efa239901493694a48f1d6f59f8de17c2c4509 upstream.

We must not use the device DMA addresses for the kernel DMA API, because
device DMA addresses have an additional offset added for the SSB translation.

Use the original dma_addr_t for the sync operation.

Cc: stable@kernel.org
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/b44.c

index dc5f051005faaf2af5aafbf7fa46974537883e33..c2ffa8cb84e4a67ca5e59518592b0071772843de 100644 (file)
@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
                                             dest_idx * sizeof(dest_desc),
                                             DMA_BIDIRECTIONAL);
 
-       ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr),
+       ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
                                       RX_PKT_BUF_SZ,
                                       DMA_FROM_DEVICE);
 }