From: Ye Li Date: Tue, 17 Aug 2021 09:20:33 +0000 (+0800) Subject: mmc: fix switch issue with send_status disabled X-Git-Tag: v2021.10~25^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3;p=platform%2Fkernel%2Fu-boot.git mmc: fix switch issue with send_status disabled When send_status is false or wait_dat0 is not supported, the switch function should not send CMD13 but directly return. Signed-off-by: Ye Li Reviewed-by: Jaehoon Chung --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index bd34897..6f767cb 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -823,7 +823,7 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value, * capable of polling by using mmc_wait_dat0, then rely on waiting the * stated timeout to be sufficient. */ - if (ret == -ENOSYS && !send_status) { + if (ret == -ENOSYS || !send_status) { mdelay(timeout_ms); return 0; }