From patchwork Thu Jun 28 10:29:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10493533 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 DAA5F60325 for ; Thu, 28 Jun 2018 10:30:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7BFE29C89 for ; Thu, 28 Jun 2018 10:30:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB7E229C8F; Thu, 28 Jun 2018 10:30:14 +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 4D6B529C8D for ; Thu, 28 Jun 2018 10:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932244AbeF1KaM (ORCPT ); Thu, 28 Jun 2018 06:30:12 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:42747 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753236AbeF1KaH (ORCPT ); Thu, 28 Jun 2018 06:30:07 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.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 B8F4A8DFCB; Thu, 28 Jun 2018 19:30:04 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.51,283,1526310000"; d="scan'208";a="283858156" Received: from mail-ty1jpn01lp0182.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.182]) 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=oGnu+mXPhiydFNLZEpD5ABGIZRdKL2dsEug2zJ+iuQY=; b=MfF7hX9PRbYwOS/4fmIxAvmKsVbSJKZ8VNR7vV6GKK5FFiymXyGExZRn/GRDBisf+0GTpK/rT268H+Y3BFtCklgwu/e7p0ZO3QQFaxA46s/uKZTZkl1g5c58ovzzJ8ZdyFEU9wFnJ8KGt102ZXBRvGae0kJop7fibUsvH0JeoYY= 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 2/2] mmc: renesas_sdhi_internal_dmac: Cannot clear the RX_IN_USE in abort Date: Thu, 28 Jun 2018 19:29:05 +0900 Message-Id: <1530181745-10519-3-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: 4f6d56a0-0410-4f31-db41-08d5dce21bc2 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:KR3OryqhSLqyaYkbn3ddWLJ+6bJSjDnqQNetW7iWeiAckSuVN0FWNU0vlSsnK51HwnfMgeepb12lvA17s4QeKLwyPPUFnL7aL4jlXGSkHNhbRA25feh5MPUoE/ZmzmCJHYtHp2MD8RqMNObDCMV98r07Wm5IiHwQIdHf/1AZ/DnMh0Iq0Vadkx2yjaSsvWkah8Pn57bFVzNb1ENPBf+w1SGxET96/CmfgLNOOXqYYfQy1qJhsiLvdfjG9Pq5nuTg; 25:+uC9w35H9gYPJNmf4/d8h2RGIJMYMEIp7HGscKcP9mA9Lc/JeRhHEGhyXsWjymSU0fnvUAhb+/uRIPz3Cq1zWKz2+/W4yGo49x28dcneutQoneqz3LVOxEjz/DHPnGyQV13jrshn4N1EutToVoGh/aBZ9wxQ6UDt6L+SNyknIZ7ihTrDmON1FzMehuCqRZbqKpCkgfF7s/F19s7Oxxfit6pKz1zBQmIs5IVRwyuunXGBWWOWDI956eDWlVQxD7wbmyBOrNk3/OJ/bUbuHR+GfDMM5g13tS/kzBXg9fNH6ZscMLdfaeoKpv15XB+ceACNXz3yGLrVIWbgQNgRv+P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Wa/cjL/cLZQos12pEGPOl1cEtvyykYJH3AZSCforXe731HGntj1cYahi+4l+I/ 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:C7sCzLl2XlXoJPscwcZ73nNLBqhe38hgZhlLGQPDc?= =?us-ascii?Q?kAkBeZUyYLQkLAQjODQATezK/uRivwhgkrSF3EtRBeO8r2EdytfP1TWZPK+n?= =?us-ascii?Q?yCp9Wfm/kzQm4U+zzvbiOKBrc8nM4OyYBUwCpVm788gU9Z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0JHRwgNYFmXBrY1i5BaSvWy/MDjNPeWe6ImTc0/kvmmG9IYP/iJnF8ueuvDcNATdUIQviwcwuTglhagre5NPXsPshL10vtgejYbafYph8usSI9Mg==; 5:NZHVzV9vKWXqUIVte3kSgsZSj2FWJlKalO+hqMcQO3WWQFhTDSFMi/UG3f8CalPL7lTBc9L1RNE7Nwym/qYmIrNXkmq1a7FJckNfe+Fz5AUH8Bp6fO/WdsEgS+nf6TcBY67Cxo1y20i6Y08u38QENxFVybRMT9hmUb6zCax62Pw=; 24:6AVPmlxM195eNkXcO2mQO9kP3fN6/CWrQzvt8zp32wR0n8aLVoIvNBARAB/+hoCwKlHCgrBqSMfX7j2dSZyXDVcc1IcLxmQdjuJmxr63rj8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; OSAPR01MB2290; 7:YudPcm5uDHUBTj7n7rJW9d84GMZygj7p0ch/1qjlUwbzY8CXfZvzTslgIgr4AdsaVa1am5rmtBqhuaBw7xDwcteLbva65ySZ6hnt+omjROaCnC79QKUq6+/S2ZXHtunmVTZ5wgOKf3TWCFTzifrjSMAwcTlvANn0d7ns7WWM1MU8MyGajxm+SZPSPoX2IMgiiW8y4W9LNHPjxs48sOhkiiYGmIHYWHh97vtLk+YLIvb7gnMFAeqPUKyC3aEYvrUw; 20:3e6halKtV07dw6oevmb5+CDPOzfl4a7LqWqDLgKwlhtoMgZxVR5S2zwAFUuopCDPalfGM7NOGK19u8rZP71sZN3xz+E5dVbd4MTNdeDS4SYQEw0fu82rH/ZSweq4W4VAgs1FOHWTsy3o1XbVUCxb9I5M/tnJv7l6ow9CpZNxOoc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2018 10:30:02.7861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f6d56a0-0410-4f31-db41-08d5dce21bc2 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 is fixes an issue that the SDHI_INTERNAL_DMAC_RX_IN_USE flag cannot be cleared because tmio_mmc_core sets the host->data to NULL before the tmio_mmc_core calls tmio_mmc_abort_dma(). So, this patch clears the SDHI_INTERNAL_DMAC_RX_IN_USE in the renesas_sdhi_internal_dmac_abort_dma() anyway. This doesn't cause any side effects. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index d503511..3669981 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -139,8 +139,7 @@ renesas_sdhi_internal_dmac_dm_write(host, DM_CM_RST, RST_RESERVED_BITS | val); - if (host->data && host->data->flags & MMC_DATA_READ) - clear_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags); + clear_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags); renesas_sdhi_internal_dmac_enable_dma(host, true); }