Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp426616pxu; Fri, 4 Dec 2020 06:43:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQ+3uu1ihChqcSCmQVOiu1iyaqPMV0acDiKDp7wUy4v63tJ75+6bZ34JNWRPyumy2plIbo X-Received: by 2002:a17:906:1a19:: with SMTP id i25mr7334811ejf.206.1607093018216; Fri, 04 Dec 2020 06:43:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607093018; cv=none; d=google.com; s=arc-20160816; b=wiMxvG3HOQ1SUhsMvOhDwOzhzJlbg2TbFHwOyQafFHNGLplT+8A4SQd9e7asfcYRZi V7Atr5yK4LEQRVYkDnX+6u6s0f15wnO7hXpJkNoYt5drjNG9kZh6JP7xSAsACms6ps4Q OSajEsPBxtkJmgm1VaXprFtbM4dxOvytpuZMlEqWdnBGTUukZKKBya9e/eRSGkREOEqe zE1L7OQCupMjbEUQqyp57L0nN222aloGM9zKfQh5h+scI6FJp3lp3TevYrGcMhsRYJbr mJ8g3MwUaLMxBZbWGndUyL4efAnyi2Ap2sKIq85bCLRmjnRAZSMVYC2qIcSw+DJdDf71 ieFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ALFvhZ1OjbfVf/iAkbXtpPEl6kf7hFGESlUg72YwV2s=; b=TZEz3Sory5kUbOdPTQkAndiDDIHGlI2S8pmr0sYPAoXYj9KWFntYrKzy0wzW4s54HU GM+efx7Z3p+zCh8VmNHofpm1BfpNNHE414qKKUXG1q4l+uV7yOlENH8ZI6o7rRAais5S TrRo7SCmTouHk3Vf4Ghf9WbWiH5ZEwXXH7g7Eo/g/LvXxrQ7isJ4Gx63iY+w8YgEUcC0 j734huMtGO+QMlpGHhmPzkcOOMJxFMKLj1TFOloZKYOekVOSfeDZef4+0VaPzDlr0XKO m9QsHV8PscLF/eq+73BXlyN8xfZ/Cv0Iuh0t8Q/YhZilyxNpvCD7UMOgg8YZdGE6Pdx9 CTjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s3Ku7AVE; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si3107527edk.319.2020.12.04.06.43.13; Fri, 04 Dec 2020 06:43:38 -0800 (PST) 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=@linaro.org header.s=google header.b=s3Ku7AVE; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387662AbgLDOkE (ORCPT + 99 others); Fri, 4 Dec 2020 09:40:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387597AbgLDOkE (ORCPT ); Fri, 4 Dec 2020 09:40:04 -0500 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71545C08E863 for ; Fri, 4 Dec 2020 06:39:00 -0800 (PST) Received: by mail-ua1-x942.google.com with SMTP id n18so1905106ual.9 for ; Fri, 04 Dec 2020 06:39:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ALFvhZ1OjbfVf/iAkbXtpPEl6kf7hFGESlUg72YwV2s=; b=s3Ku7AVE/9HH3DtwPJCfcA81tzqrP0dq8xSrkCN0QiwbH/+JoOwR6RvK1IlmjghAXd 0ieHFh843CCnahnuHpDrm6y8SBYLZByGQaSbhLCTRwzXMnxueF4/+gz6e8szcZTvV3dY 5EcmxsyWv/AMyx2WqithnYA33e8SJeiKc3wVrfky9TCUzo9wUNNKQzaScpg3jlGHPyxu yWWo+K37fKgomlEB96lOu2lfM7682x5HWKycXPfYejW6tbMdXcNSg5uRoNZAk89GHafO hyo3YXqoS10TSskEcywdeExjeoOJNwcngDBp4mfnGP7WYpySKgHPgOk1h/SWFdolhkN3 2aWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ALFvhZ1OjbfVf/iAkbXtpPEl6kf7hFGESlUg72YwV2s=; b=ocaKEyc5kT4KOFxgtNBUHTCRHmydEzIxJfmbBdBO5O6+SbRBMvtaCi+NAdQIS/pXdD bwosaMZ2V6XpIIT1SRVwCKxXvh9JK23UdUr1BYWMgRq7+1JBpfj2+RucTCGvb1CjJSCp 9a6T27BtuYNEEcSmvLOqoU3QGkfQT0xagj/SfTsTy0tQKu7mhiS6O10YAwOibc7NiCYQ f+VwVCZnrcbp7oWBYTYNm+BSAN7efUTLzJvUo6eQL0rDsbABHIXjRJHcf4Gx/Qp2kjfU YLwl50Z4qj5lcwJiRZOrOgHXw9dR2Fj9smNHK5jD70FFtvQw7mfSpKgkqUx/3aqcxRFT QBQw== X-Gm-Message-State: AOAM532WRrt++aO+f69iJPU5ZX/cbLCtoZnqTjD0qi7Nj0m6usG6xh+H P2unFe9A12JKLF4KwxPiZ3sSqoio4wJUaVzsPEKSSA== X-Received: by 2002:ab0:23d5:: with SMTP id c21mr3340200uan.129.1607092739611; Fri, 04 Dec 2020 06:38:59 -0800 (PST) MIME-Version: 1.0 References: <20201202202320.22165-1-huobean@gmail.com> In-Reply-To: <20201202202320.22165-1-huobean@gmail.com> From: Ulf Hansson Date: Fri, 4 Dec 2020 15:38:20 +0100 Message-ID: Subject: Re: [PATCH] mmc: block: Let CMD13 polling only for MMC IOCTLS with the R1B response To: Bean Huo Cc: Jens Axboe , "(Exiting) Baolin Wang" , "Bean Huo (beanhuo)" , Arnd Bergmann , Veerabhadrarao Badiganti , =?UTF-8?B?5b2t5rWpKFJpY2hhcmQp?= , Chaotian Jing , Avri Altman , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , zliua@micron.com, "Zoltan Szubbocsev (zszubbocsev)" , "# 4.0+" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Dec 2020 at 21:23, Bean Huo wrote: > > From: Bean Huo > > The CMD13 polling is only needed for the command with R1B Resp. For the > command with R1 Resp, such as open-ended multiple block read/write > (CMD18/25) commands, the device will just wait for its next paired command. > There is no need to poll device status through CMD13. > > Meanwhile, based on the original change commit (mmc: block: Add CMD13 polling > for MMC IOCTLS with R1B response), and comment in __mmc_blk_ioctl_cmd(), > current code is not in line with its original purpose. So fix it with this patch. > > Fixes: a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response") > Cc: stable@vger.kernel.org > Reported-by: Zhan Liu > Signed-off-by: Zhan Liu > Signed-off-by: Bean Huo Applied for fixes, thanks! Note, I took the liberty to rephrase the commit message (and the header) to clarify things a bit more. Kind regards Uffe > --- > drivers/mmc/core/block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c > index 8d3df0be0355..42e27a298218 100644 > --- a/drivers/mmc/core/block.c > +++ b/drivers/mmc/core/block.c > @@ -580,7 +580,7 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md, > > memcpy(&(idata->ic.response), cmd.resp, sizeof(cmd.resp)); > > - if (idata->rpmb || (cmd.flags & MMC_RSP_R1B)) { > + if (idata->rpmb || (cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { > /* > * Ensure RPMB/R1B command has completed by polling CMD13 > * "Send Status". > -- > 2.17.1 >