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 <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
Ye Li 2021-08-17 17:20:33 +08:00 committed by Peng Fan
parent b817959bd4
commit 3f4e52fc9d

View file

@ -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;
}