From patchwork Fri Mar 4 10:27:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 320 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:41 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9907qah; Fri, 4 Mar 2011 02:27:09 -0800 (PST) Received: by 10.229.15.13 with SMTP id i13mr285763qca.240.1299234429701; Fri, 04 Mar 2011 02:27:09 -0800 (PST) Received: from mail-qy0-f171.google.com (mail-qy0-f171.google.com [209.85.216.171]) by mx.google.com with ESMTPS id z24si4131100qcj.86.2011.03.04.02.27.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:27:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.171 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.216.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.171 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: by qyj19 with SMTP id 19so33630qyj.16 for ; Fri, 04 Mar 2011 02:27:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.207.196 with SMTP id fz4mr321570qab.184.1299234429576; Fri, 04 Mar 2011 02:27:09 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:27:09 -0800 (PST) In-Reply-To: <1297350647-3135-1-git-send-email-linus.walleij@linaro.org> References: <1297350647-3135-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:27:09 +0100 Message-ID: Subject: Fwd: [PATCH 09/11] tmio_mmc: unmap with the proper sglen From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij Date: Thu, Feb 10, 2011 at 4:10 PM Subject: [PATCH 09/11] tmio_mmc: unmap with the proper sglen To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Ian Molton , Linus Walleij According to the DMA-API you shall unmap the sglists with the same sglist length as passed into the mapping function, not the returned value from the mapping function. Signed-off-by: Linus Walleij ---  drivers/mmc/host/tmio_mmc.c |    4 ++--  1 files changed, 2 insertions(+), 2 deletions(-) -- 1.7.4 diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index c82d8e2..5da2e17 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -979,11 +979,11 @@ static void tmio_tasklet_fn(unsigned long arg)        if (host->data->flags & MMC_DATA_READ)                dma_unmap_sg(host->chan_rx->device->dev, -                            host->sg_ptr, host->dma_sglen, +                            host->sg_ptr, host->sg_len,                             DMA_FROM_DEVICE);        else                dma_unmap_sg(host->chan_tx->device->dev, -                            host->sg_ptr, host->dma_sglen, +                            host->sg_ptr, host->sg_len,                             DMA_TO_DEVICE);        tmio_mmc_do_data_irq(host);