From patchwork Fri Jun 29 10:01:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10496081 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 371CA601C7 for ; Fri, 29 Jun 2018 10:02:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18B4828A78 for ; Fri, 29 Jun 2018 10:02:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C74F292E5; Fri, 29 Jun 2018 10:02:57 +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.4 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 96BF128A78 for ; Fri, 29 Jun 2018 10:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754566AbeF2KCy (ORCPT ); Fri, 29 Jun 2018 06:02:54 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:7827 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753305AbeF2KCr (ORCPT ); Fri, 29 Jun 2018 06:02:47 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 29 Jun 2018 19:02:45 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id AECDA8B38E; Fri, 29 Jun 2018 19:02:45 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.51,285,1526310000"; d="scan'208";a="285474557" Received: from mail-ty1jpn01lp0183.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.183]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 29 Jun 2018 19:02:45 +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=kSdQCb4GdS71xburoczX38PlJqTYrAbC1XnrhwLS0mE=; b=MNlHO2VowqOc+dSUDw4ud1lyPfZcaJee8iWiE1RPUBlVgzIhUkySVv09Kk0mHC8n04x7cO6tlbrBAngKw6ugiPisGBFLQHrouRNPTQBawijRtnaW0ONJARpHTzbp08/U7mMLpd5YBduuLwAVDjNIwousnJIUDSAZSqllvpDkzFM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSAPR01MB2291.jpnprd01.prod.outlook.com (2603:1096:603:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Fri, 29 Jun 2018 10:02:43 +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 v2 2/2] mmc: renesas_sdhi_internal_dmac: Cannot clear the RX_IN_USE in abort Date: Fri, 29 Jun 2018 19:01:45 +0900 Message-Id: <1530266505-19953-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530266505-19953-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1530266505-19953-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYAPR01CA0153.jpnprd01.prod.outlook.com (2603:1096:404:7e::21) To OSAPR01MB2291.jpnprd01.prod.outlook.com (2603:1096:603:1c::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ccbadeee-e330-4f9f-9217-08d5dda774f1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:OSAPR01MB2291; X-Microsoft-Exchange-Diagnostics: 1; OSAPR01MB2291; 3:oizQHZm4AMKyXBuHCEQwjrwHoOWT3OTgLdioGv/+IeDcZHAcD/eqq6DndD5w+fyNhui/Lg4rHk5RrhlukP/Bs3P9w8RUnu+Y3tdqeUmRsWysF6MZKW+93funl0EOzwxR4DpvjqjBtn9EbAsQWL4ncpAigjKWLOIYsEZ9WuKlPk0IqRUJUz3kuaB9Y43rLKT/1wlLiV5OljuScUu/TGCVEZsm5ESAHbfdLPo/sof1uEXCWLop2aCC59WhwHvukgRn; 25:C2ZzCFKCSNYQZG8VuLiwxAAoJYbXDfaskgb6NMsSoFdU8mran3CHu0d7e3RkEZOpSw3Vh8tX/On7TUpZqzBKCtLNq1iPAYBI9efT4MMlx1oH4eyOTnN9HjNyfovVV2hRF1U0TP9hibsQyAhK6Di1z8Ebvz7WS2iYUaPhP6ngwCvcL8/rV9fr9r7q2xJ3UhyrvPVcSzxUU/+1m2YoN1zV8HDRMDqss5PFXp9wdypVmTW+7qzN0ti/TTPjUy+EmiekKaizrnCdgddYhmEZ9ApiDK9lEZkof4Mpf8+VbaNnEBCr1W9giG8uV6XhiMh9dZT2Mi3C5T+myo/IVBVzattmag==; 31:NYoZo/3L4oR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M70fm/+2jJcZQBN5bZSdYORZmbYb4iMGNeLL14J3anJ1DDM8kz 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)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:OSAPR01MB2291; BCL:0; PCL:0; RULEID:; SRVR:OSAPR01MB2291; X-Forefront-PRVS: 0718908305 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(376002)(366004)(396003)(136003)(346002)(39860400002)(199004)(189003)(105586002)(48376002)(8676002)(14444005)(81166006)(81156014)(78352004)(486006)(5660300001)(26005)(7736002)(16526019)(476003)(36756003)(97736004)(386003)(6506007)(106356001)(6512007)(305945005)(446003)(2616005)(316002)(11346002)(956004)(16586007)(53936002)(4326008)(107886003)(50226002)(6116002)(42882007)(66066001)(47776003)(3846002)(6486002)(76176011)(51416003)(50466002)(2906002)(8936002)(25786009)(498600001)(68736007)(52116002)(3720700003); DIR:OUT; SFP:1102; SCL:1; SRVR:OSAPR01MB2291; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; OSAPR01MB2291; 23:nWZDTx+prwgmFo4N0Gqrh+kFHfbDEjVk1C75PqgTr?= =?us-ascii?Q?u5NDcmjnUR26IGgqD9MKnaPb3dMxJHkO49KLpN6luPhWcpqCSpxuQK3hS//7?= =?us-ascii?Q?d3QXElty22RSO3y9jI0SqNELxbvtiOB9+sHJCgz4H9y6od6+80oKTY5foL+P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IyN5rUkMeWDmDbUluGiz5dLdK31dnrN2u3lrqyd2Tq51v7y50yX16PTkMmb09WPpmTGt5GVQshZRs9Z4vGMg==; 5:WC11cOhaonHA8jmAe55smXQM8xx66MSzDCZ79A5F/KabEthydeIxvwYt71XNyOMhD8FEStuqWtDb8XzbK6IJwgsf4Fp0wzmjl+bUzCotKA4DnRnn6PDG5B1k29LlzirwiYYx1HodGD0H61IWymXxQ005DSpVzA6jsaGGy3gf4w8=; 24:MpUO9b2eAF5FDBfJnuDgnUHu1sQAURukKdK4rPmltMCjanexlZmX/QJy+MNXCvC+9ork4LFIBQ8JVL7dhTYN0blqw8+Q2nd5ZldNcSQWayw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; OSAPR01MB2291; 7:pQ0POtNwWPZpl5ggTB9MBiem/y7IMTDUf2r3Zy8H2kFpBIHE2crXh16QWUkrXUgX2gmAok6ocLzuUOjdAi1uhDjHgxCUVw5Xzg0KQK/M7/Uq1YGA7GgQ0GQ3joHopBW85vQwSJfdH2bvd1CLLArxp9clwmBxop7TEcN9bXxkoHF4FU/P/DYtftdups1On1YCtKSopG2cqqpt5f1ROmOJCEO/J8lXVzrbqjBD5njaVq+JESI+JDXRxAXkdNodcTFd; 20:JprjUOKEmk3fZlpCaUEeGVj4KwDaDBlquRdZy+Qank+aFKKMvb0faBEmLokDsrHdrR5NswVAKvmvowpi08uIsNd4u5QXL3HUs766bHtXRnAroX51twabxAN6VHKp3jHaQ9D6fhW/0JKLBFJ9fInvCovyVjsu21tv+6dLH7ftys0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2018 10:02:43.2652 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ccbadeee-e330-4f9f-9217-08d5dda774f1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2291 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 Reviewed-by: Simon Horman --- 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 d676a20..d032bd6 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); }