From patchwork Thu Jun 28 10:29:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10493527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 85DC060325 for ; Thu, 28 Jun 2018 10:30:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 728EB29C89 for ; Thu, 28 Jun 2018 10:30:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6644E29C90; Thu, 28 Jun 2018 10:30:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=2.0 tests=AXB_X_OUTLOOKPROT_ENVSDR, BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E36A229C89 for ; Thu, 28 Jun 2018 10:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932222AbeF1KaJ (ORCPT ); Thu, 28 Jun 2018 06:30:09 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:19033 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753371AbeF1KaG (ORCPT ); Thu, 28 Jun 2018 06:30:06 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 28 Jun 2018 19:30:04 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 56A428DFC6; Thu, 28 Jun 2018 19:30:04 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.51,283,1526310000"; d="scan'208";a="283858154" Received: from mail-ty1jpn01lp0183.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.183]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2018 19:30:04 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c3qVx5SSgi6zaVKfFrf6ma9Pt/NUH6m6FJNhnsaD6gw=; b=HWBU3xklEfpdfKGnjMdQnh+cetAGBMJdGuIN2ipJwkqwk0A9PjPJRRHku6E9ScOl+MuDDOYZJQ1zuoZxE/lf7bIsa+32zgmvEoXXLOOBQvL1XA4tpniy1Rcm2Dnz2Fyp9OCyy+MaUd35mydd0mtRThRZWtDeDADSlZgL3ts1xjA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSAPR01MB2290.jpnprd01.prod.outlook.com (2603:1096:603:1c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.24; Thu, 28 Jun 2018 10:30:02 +0000 From: Yoshihiro Shimoda To: wsa+renesas@sang-engineering.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 1/2] mmc: renesas_sdhi_internal_dmac: Fix missing unmap in error patch Date: Thu, 28 Jun 2018 19:29:04 +0900 Message-Id: <1530181745-10519-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530181745-10519-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1530181745-10519-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0067.jpnprd01.prod.outlook.com (2603:1096:402:b::27) To OSAPR01MB2290.jpnprd01.prod.outlook.com (2603:1096:603:1c::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f4faa08-e5a2-4b49-68ce-08d5dce21b6f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(8559017)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:OSAPR01MB2290; X-Microsoft-Exchange-Diagnostics: 1; OSAPR01MB2290; 3:4l1lTv6l2qdoLu/rH/ku8ZzqlBOBc8pGfueHsY6QIxmbHSBKIsnZOIuSq8rO+1Dr05Uvqdr9gjYMUmUtx7SnMjpQ7ldMV2zqkDN5xXkAOqUcpDQoZco2IqLOYtZo+zKqROjnQlDxdGklIqV2psp92X946AwmXBsGfbqHz2Fg6/1GvkI6It/X0Yj2sDgtMvyhKnb4CI5AHRQqF441kUyO4zd1dys6LsOcS7Xq29Akt2yyomXGYZoOOxTMmonbL6RT; 25:GyZPF6Zq8WJPppJTFLnxhnM1RgtbEVILAAlDvbaQaH5W9vJv3o1XKGaQ0j5eAPuhyb6LjhF2c+ZmSuKE0l2ARePZJzMs8Z6KiJb5InfLgmguArFWlgXDFJEcR9bsxCWtfFbtLjgSQj7M1aq0nf47nVHqqjBjmKYfZoidURR7/YgqxEFJkeYoLcqiJUbHEVbI4i1wRJuCRFvEdzOfaoxqLMt2cAk6/6eU0XM8XYJ6GjP1lcyVzmWbq775PhH9F8I7VBoMzZyshr2TsSTRc63tSaSlRvTUrLKvTnbO9XXJgUe+9WfJ3U21pygmh7tNwAg/IUemHXTtIJwKFLy/BAd7zA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//uPMqJzixtxfT0rGVhPe5emH/fFZCX/sSDmfX470/qypcR/2U6Y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(10201501046)(93006095)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(6072148)(201708071742011)(7699016); SRVR:OSAPR01MB2290; BCL:0; PCL:0; RULEID:; SRVR:OSAPR01MB2290; X-Forefront-PRVS: 0717E25089 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(346002)(376002)(366004)(39860400002)(396003)(136003)(189003)(199004)(66066001)(47776003)(2906002)(50466002)(6486002)(305945005)(48376002)(3846002)(6116002)(97736004)(14444005)(8936002)(105586002)(498600001)(106356001)(81166006)(81156014)(53936002)(7736002)(78352004)(25786009)(956004)(11346002)(2616005)(476003)(5660300001)(8676002)(446003)(42882007)(107886003)(316002)(16586007)(4326008)(76176011)(6506007)(51416003)(6512007)(386003)(52116002)(486006)(50226002)(68736007)(36756003)(16526019)(26005)(3720700003); DIR:OUT; SFP:1102; SCL:1; SRVR:OSAPR01MB2290; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:0; A:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; OSAPR01MB2290; 23:ml1Mgiw1OlaoDdSrQuaIrSv2gnxXqazywcrCYT3nM?= =?us-ascii?Q?sjKOBt2Ims4toxxjJoIDFJ/X7bnf0nflLH6pICY9aTZFZab6+P0aO+upPzo1?= =?us-ascii?Q?JUP75udIYsf4/39duXZa8SV+SZB+QkFXozG6nSnOaMwZOElxSMcPHq+hktB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QIFrMhqKQRDuRA4iVPw15mYXt5dJw+PaNS9k37q5GXUsPcwJH9XrN7XIHsyG2z2gsqbB8cJ5Dkq70Faht9Ys5hx3z4UfPKJXdv89RhoKfuWTGg==; 5:RHslgkT/LZEdP/yU7wv1TOpjqdxXTvt4IrBYAUY7WFFeMYRuyW+9pb7CRonq7NPi8SeiqRKtYbLK5PfozTMYXpH7gcfKSi1UY0mVy8KcJJPeZF1f811rXfCMnCE1wtnt64eYno9x6eda5y+p05BTvH5jIf2KS8m1jTMnG4crQpU=; 24:5HUGxObNWxQteJMGllgOhE9pgWox5+ro4hWDc9ZXesG13xxzXKDzN39N7KfSUqlysZuU8LWNuYhgRhXLtew0GESf6ssXSOS0E93PG74Dgpk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; OSAPR01MB2290; 7:wgCgwABOo0hTzjFO1VlMUofp4OfAcasxxSbBMJafzNMuTiFh3f0IIfBpZay1bYbu7Vhs/Im3M+U4jRtYcyrRLhwJEpcDc4cmp6I6YJz5qyhCXADaCK7vjtk5S9l90aSLrjG4SdSQF/ZlHVA77K6I2gSc0e7q4fOIc5vOq1tNzeBCwCypH6ywBrazcxzNIHXv//CtmSVrgVQvsktEo6cER5kVoTimPiJs0YFKTRdc9K6V7fZr2MnieublB91Jrgoa; 20:pWXyXbzwPdlIGFVzSKZhHLFRZqDnXyz72ImpUmGj8cSoFwMCWqDpZevjsDGKPHii9p3hevJYhtCoTXFcxpTI+Rgs56nn2A0LmK2qF6hSxdxMcPv36pmwMPA/hKDSRjibeXRZ3wShoN5NDs32YJzEbU0Il+vBUFJ8/xdh1W2r7kA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2018 10:30:02.2548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f4faa08-e5a2-4b49-68ce-08d5dce21b6f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2290 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes an issue that lacks the dma_unmap_sg() calling in the error patch of renesas_sdhi_internal_dmac_start_dma(). Fixes: 0cbc94daa554 ("mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs") Cc: # v4.17+ Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index f7f9773..d503511 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -173,8 +173,11 @@ if (data->flags & MMC_DATA_READ) { dtran_mode |= DTRAN_MODE_CH_NUM_CH1; if (test_bit(SDHI_INTERNAL_DMAC_ONE_RX_ONLY, &global_flags) && - test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags)) + test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags)) { + dma_unmap_sg(&host->pdev->dev, sg, host->sg_len, + mmc_get_dma_dir(data)); goto force_pio; + } } else { dtran_mode |= DTRAN_MODE_CH_NUM_CH0; }