From patchwork Fri Jan 18 07:46:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 1999911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 77F37DF280 for ; Fri, 18 Jan 2013 07:49:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tw6fJ-0005LZ-6t; Fri, 18 Jan 2013 07:47:05 +0000 Received: from norkia.v3.sk ([91.210.183.14]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tw6eq-0005EU-Qj for linux-arm-kernel@lists.infradead.org; Fri, 18 Jan 2013 07:46:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by norkia.v3.sk (Postfix) with ESMTP id 7870112A0E7; Fri, 18 Jan 2013 08:46:35 +0100 (CET) X-Virus-Scanned: amavisd-new at v3.sk Received: from norkia.v3.sk ([127.0.0.1]) by localhost (norkia.v3.sk [127.0.0.1]) (amavisd-new, port 10024) with SMTP id Yj948YCrfQX4; Fri, 18 Jan 2013 08:46:32 +0100 (CET) Received: from localhost.localdomain (ip-94-113-108-27.net.upcbroadband.cz [94.113.108.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lkundrak@v3.sk) by norkia.v3.sk (Postfix) with ESMTP id 445C312A0E9; Fri, 18 Jan 2013 08:46:32 +0100 (CET) From: Lubomir Rintel To: Thomas Petazzoni Subject: [PATCH 3/3] dma: mv_xor: get rid of a DMA-API sanity check warning Date: Fri, 18 Jan 2013 08:46:22 +0100 Message-Id: <1358495182-30964-3-git-send-email-lkundrak@v3.sk> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1358495154.28503.5.camel@unicorn> References: <1358495154.28503.5.camel@unicorn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130118_024637_118725_D47889E8 X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Vinod Koul , Lubomir Rintel , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Williams X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org mv_xor mv_xor.0: DMA-API: device driver frees DMA memory with different direction [device address=0x000000001dea4000] [size=4096 bytes] [mapped with DMA_FROM_DEVICE] [unmapped with DMA_BIDIRECTIONAL] Change xor self test destination buffer allocation direction to bidirectional, as it's what mv_xor_run_tx_complete_actions() frees for multiple sources. Signed-off-by: Lubomir Rintel --- drivers/dma/mv_xor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index d00a834..1e90f5d 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -1042,7 +1042,7 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan) /* test xor */ dest_dma = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE, - DMA_FROM_DEVICE); + DMA_BIDIRECTIONAL); if (dma_mapping_error(dma_chan->device->dev, dest_dma)) { dev_err(dma_chan->device->dev, "Could not map destination page, disabling\n");