From: Bean Huo <huobean@gmail.com>
To: ulf.hansson@linaro.org, axboe@kernel.dk, baolin.wang@linaro.org,
beanhuo@micron.com, arnd@arndb.de, vbadigan@codeaurora.org,
richard.peng@oppo.com, chaotian.jing@mediatek.com,
avri.altman@wdc.com, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, zliua@micron.com,
zszubbocsev@micron.com
Cc: stable@vger.kernel.org
Subject: [PATCH] mmc: block: Let CMD13 polling only for MMC IOCTLS with the R1B response
Date: Wed, 2 Dec 2020 21:23:20 +0100 [thread overview]
Message-ID: <20201202202320.22165-1-huobean@gmail.com> (raw)
From: Bean Huo <beanhuo@micron.com>
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 <zliua@micron.com>
Signed-off-by: Zhan Liu <zliua@micron.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
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
next reply other threads:[~2020-12-02 20:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 20:23 Bean Huo [this message]
2020-12-04 14:38 ` [PATCH] mmc: block: Let CMD13 polling only for MMC IOCTLS with the R1B response Ulf Hansson
2020-12-04 15:54 ` Bean Huo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201202202320.22165-1-huobean@gmail.com \
--to=huobean@gmail.com \
--cc=arnd@arndb.de \
--cc=avri.altman@wdc.com \
--cc=axboe@kernel.dk \
--cc=baolin.wang@linaro.org \
--cc=beanhuo@micron.com \
--cc=chaotian.jing@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=richard.peng@oppo.com \
--cc=stable@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vbadigan@codeaurora.org \
--cc=zliua@micron.com \
--cc=zszubbocsev@micron.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).