Skip to content

Commit

Permalink
mmc: block: Fixup condition for CMD13 polling for RPMB requests
Browse files Browse the repository at this point in the history
The CMD13 polling is needed for commands with R1B responses. In commit
a0d4c7e ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B
response"), the intent was to introduce this for requests targeted to the
RPMB partition. However, the condition to trigger the polling loop became
wrong, leading to unnecessary polling. Let's fix the condition to avoid
this.

Fixes: a0d4c7e ("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>
Link: https://lore.kernel.org/r/20201202202320.22165-1-huobean@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Bean Huo authored and Ulf Hansson committed Dec 4, 2020
1 parent 32a9e0c commit 6246d7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down

0 comments on commit 6246d7c

Please sign in to comment.