Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp353360pxt; Fri, 6 Aug 2021 03:44:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwatA8tfZLkGiaNpUQjuAwNMecTiL8KFtwZSYanQfp1ZTseocBoiL1co6X5OuE/rSfdRg85 X-Received: by 2002:a05:6e02:114e:: with SMTP id o14mr813913ill.121.1628246655685; Fri, 06 Aug 2021 03:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628246655; cv=none; d=google.com; s=arc-20160816; b=l/1HqpSz9GPkgeD/vurQidE66QyNxcYszKW9fvEIxnMOCBm0sB2NFC4Q2ExRtqvqLY ZCW6cY4QMyLQ1zj1JNBrYGEe5h3iV46abV8OILoKxU5r97sjuUsny7frI02hYpdM6tEe MeTJTcq+m/iwzCmzU9vncqptxSTC1IZbT0pr4V4UU5oEzLMHK6shqldvSmioZWHcs45+ pJup+EzIsatlFWfp6FwcB52YV5rAhojD8VamlFDpC6P07t4Vrki51hnQ3VV9A/4eZEUf 1wGjk3KIR6PJ0akMB3YQA1kExzqoyOcCWVodWgLU3Re6kPdwY6UvaB31AGYNm1NHR16F O2ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/Fj67vOhz3zmXYi3Qy2zVy0So4Mw59Xgs1vAgB0E0YQ=; b=0+k1b/wrrPxazH7SkZB4/rya0o/TrnhTxh3xM/1BC+Msf6NVfyDmC88nMJ9D9W4DdL 8rQ2YSgH5tDGBktj5cBjAezHNMb1FS4uxnIA69r1hUjX1faRxTGGrt8krO6sR6xpwx6D 7lm8I/nh7hEmEUPCW1EKP+gzfZ8AfEVuxe8iTccqRYnSEXu0TwkBaZvmfHdzYW8FiKfo xYeUr/b5hwbDfr+ut3mrnnbvfXOchhDPMvjihKO0ex7B5IE/Z0xkpj3d0X555ClYj94D 9OMtAb9vBezXH2m48GgJlE0wj55l8Ml9GxRBCuxD2+Iab6ZQdjs1qqAUxHssJWBwTJDz 2OGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KnFYoJFH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si9598354iot.89.2021.08.06.03.44.02; Fri, 06 Aug 2021 03:44:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KnFYoJFH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245211AbhHFKmv (ORCPT + 99 others); Fri, 6 Aug 2021 06:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245204AbhHFKmu (ORCPT ); Fri, 6 Aug 2021 06:42:50 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D71C061798; Fri, 6 Aug 2021 03:42:34 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id b11so10504858wrx.6; Fri, 06 Aug 2021 03:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/Fj67vOhz3zmXYi3Qy2zVy0So4Mw59Xgs1vAgB0E0YQ=; b=KnFYoJFHiqhapmSUUGCFGUDZh0IMJPp9qJHWp3iTHyXOdfFF4OSN6Gtf4egRQ1fCw5 +pi5v7V4UFShrw5/hC5Mjfxuio88BndrAUh92piTUUUNY+yc/J7I+CB/PSKZz2XFU6RD mAR3geycppZUM3nP+oAX/l7VdWidLunwdInVG0lcK+XX+m9By8vbp7sxmsFodSkbmrV6 GMXXZut9YmDc/jkBmbqlMsbu3gJ9BRAfw+79XSOxvJW7srdccSiHY2m0bjRWxSk95IR7 ixngMx+hNYnOJ3jzP6ST5Rz6vXDx3AxMFE+Zvub/UqP7X9sb3oeuUiE2qHHcgnR4/JOc 37TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/Fj67vOhz3zmXYi3Qy2zVy0So4Mw59Xgs1vAgB0E0YQ=; b=Q+SzWXmLLtsHaOvxEubgE8YfLlBgi3ObEKujtSxPjAuj+HZj0MAhbdTt5CM2TZBFcW pSEGjXtYNPu6Cyqq+aqfsDPu7hEwtJMuBgSVjk37fhTegCsIq5z3BvRzx7ZUwAf80hfK QsIUwfkbU4Hfg1uMCCx2qXPd0DSiRdNIkSLP/XZ1sC0yLKiuduhzfWrDBT+Xa47TIMBH 4WtSpt3YZ4RtTi8/hIPA7A+Auhc2AVSyvlJfNBUUEe22l3ALH0WRRYOhMUb3Y+W+iaqR TOeVSHp5c38bmP3DPQUX8Jv5Og/vxoWlE8Qem5uZPDDglxknBVe5U+/+WLvivQmUYyU9 ktYA== X-Gm-Message-State: AOAM533q+PDMQVj5GTZA8LIhyI5vQXyGMgPLYkIRA3s52kemh5GhHxR8 OSerR/+f945gnmIfU9Wd90k= X-Received: by 2002:adf:e0d1:: with SMTP id m17mr9870192wri.233.1628246553431; Fri, 06 Aug 2021 03:42:33 -0700 (PDT) Received: from ziggy.stardust (static-55-132-6-89.ipcom.comunitel.net. [89.6.132.55]) by smtp.gmail.com with ESMTPSA id x9sm12066410wmj.41.2021.08.06.03.42.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Aug 2021 03:42:33 -0700 (PDT) Subject: Re: [PATCH] mmc: mediatek: add wait dma stop done flow To: Derong Liu , Chaotian Jing , Ulf Hansson Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, wsp_upstream@mediatek.com, Peng Zhou References: <20210806023055.29524-1-derong.liu@mediatek.com> From: Matthias Brugger Message-ID: Date: Fri, 6 Aug 2021 12:42:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210806023055.29524-1-derong.liu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for your patch. On 06/08/2021 04:30, Derong Liu wrote: > From: mtk13858 > > it needs to wait for dma stop done after set dma stop. > Please provide a better commit message. Which bug do you see on which SoC? Are you sure you can apply that to all SoC without breaking stuff? > Signed-off-by: mtk13858 Full name please. Regards, Matthias > --- > drivers/mmc/host/mtk-sd.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c > index 4dfc246c5f95..1dfd2842471b 100644 > --- a/drivers/mmc/host/mtk-sd.c > +++ b/drivers/mmc/host/mtk-sd.c > @@ -2339,6 +2339,8 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery) > if (recovery) { > sdr_set_field(host->base + MSDC_DMA_CTRL, > MSDC_DMA_CTRL_STOP, 1); > + while (readl(host->base + MSDC_DMA_CFG) & MSDC_DMA_CFG_STS) > + cpu_relax(); > msdc_reset_hw(host); > } > } >