From patchwork Mon Apr 6 19:52:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 25652 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5623ADDE9F for ; Tue, 7 Apr 2009 05:55:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbZDFTy5 (ORCPT ); Mon, 6 Apr 2009 15:54:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751375AbZDFTy5 (ORCPT ); Mon, 6 Apr 2009 15:54:57 -0400 Received: from bu3sch.de ([62.75.166.246]:38292 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbZDFTy5 (ORCPT ); Mon, 6 Apr 2009 15:54:57 -0400 Received: by vs166246.vserver.de with esmtpa (Exim 4.63) id 1Lquu4-0006gV-Dh; Mon, 06 Apr 2009 19:54:44 +0000 From: Michael Buesch To: "Gary Zambrano" Subject: Re: [Bugme-new] [Bug 12969] New: WARNING: at lib/dma-debug.c:539 check_sync+0xe9/0x341() (Not tainted) Date: Mon, 6 Apr 2009 21:52:27 +0200 User-Agent: KMail/1.9.9 Cc: "Andrew Morton" , David Miller , netdev@vger.kernel.org References: <20090402114402.a89b956d.akpm@linux-foundation.org> <66E4AD309580E34AA457975F33D2A7473FBC6A3626@IRVEXCHCCR01.corp.ad.broadcom.com> In-Reply-To: <66E4AD309580E34AA457975F33D2A7473FBC6A3626@IRVEXCHCCR01.corp.ad.broadcom.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200904062152.28233.mb@bu3sch.de> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: stable@kernel.org Signed-off-by: Michael Buesch --- 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); }