Skip to content

Commit 2673493

Browse files
Linus WalleijUlf Hansson
authored andcommitted
mmc: mmci: Clear busy_status when starting command
If we are starting a command which can generate a busy response, then clear the variable host->busy_status if the variant is using a ->busy_complete callback. We are lucky that the member is zero by default and hopefully always gets cleared in the ->busy_complete callback even on errors, but it's just fragile so make sure it is always initialized to zero. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230405-pl180-busydetect-fix-v7-1-69a7164f2a61@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent ae6a2c4 commit 2673493

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mmc/host/mmci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,7 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c)
12381238
c |= host->variant->cmdreg_srsp;
12391239
}
12401240

1241+
host->busy_status = 0;
12411242
if (host->variant->busy_timeout && cmd->flags & MMC_RSP_BUSY) {
12421243
if (!cmd->busy_timeout)
12431244
cmd->busy_timeout = 10 * MSEC_PER_SEC;

0 commit comments

Comments
 (0)