From patchwork Fri Mar 4 10:26:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 318 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:40 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9877qah; Fri, 4 Mar 2011 02:26:15 -0800 (PST) Received: by 10.224.67.20 with SMTP id p20mr346182qai.92.1299234375554; Fri, 04 Mar 2011 02:26:15 -0800 (PST) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by mx.google.com with ESMTPS id i34si4103956qck.172.2011.03.04.02.26.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:26:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.216.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: by qyk2 with SMTP id 2so1910265qyk.16 for ; Fri, 04 Mar 2011 02:26:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.37.10 with SMTP id v10mr339712qad.84.1299234375421; Fri, 04 Mar 2011 02:26:15 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:26:15 -0800 (PST) In-Reply-To: <1297350580-2068-1-git-send-email-linus.walleij@linaro.org> References: <1297350580-2068-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:26:15 +0100 Message-ID: Subject: Fwd: [PATCH 05/11] sh_mmcif: unmap with the proper sglen From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij Date: Thu, Feb 10, 2011 at 4:09 PM Subject: [PATCH 05/11] sh_mmcif: unmap with the proper sglen To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Paul Mundt , 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/sh_mmcif.c |    4 ++--  1 files changed, 2 insertions(+), 2 deletions(-) -- 1.7.4 diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 8e4aba9..61ad19e 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -195,11 +195,11 @@ static void mmcif_dma_complete(void *arg)        if (host->data->flags & MMC_DATA_READ)                dma_unmap_sg(host->chan_rx->device->dev, -                            host->data->sg, host->dma_sglen, +                            host->data->sg, host->data->sg_len,                             DMA_FROM_DEVICE);        else                dma_unmap_sg(host->chan_tx->device->dev, -                            host->data->sg, host->dma_sglen, +                            host->data->sg, host->data->sg_len,                             DMA_TO_DEVICE);        complete(&host->dma_complete);