Subject: Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted)

From: Michael Buesch <[email-masked]>
Date: Mon, 6 Apr 2009 21:52:27 +0200

Subject: [PATCH] b44: Use kernel DMA addresses for the kernel DMA API

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: [email-masked]
Signed-off-by: Michael Buesch <[email-masked]>

---

I could reproduce the bug on my b44 card and this patch fixes it.
Please apply the patch and close the bug. Thanks.

Index: linux-2.6/drivers/net/b44.c
===================================================================
--- linux-2.6.orig/drivers/net/b44.c	2009-04-06 21:47:55.000000000 +0200
+++ linux-2.6/drivers/net/b44.c	2009-04-06 21:50:18.000000000 +0200
@@ -750,7 +750,7 @@
 					     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);
 }

-- 
Greetings, Michael.