diff mbox series

[1/2] mmc: fix switch issue with send_status disabled

Message ID 1629192034-64056-1-git-send-email-ye.li@nxp.com
State Accepted
Commit 3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3
Delegated to: Peng Fan
Headers show
Series [1/2] mmc: fix switch issue with send_status disabled | expand

Commit Message

Ye Li Aug. 17, 2021, 9:20 a.m. UTC
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>
---
 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung Aug. 28, 2021, 4:51 a.m. UTC | #1
On 8/17/21 6:20 PM, Ye Li wrote:
> 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>

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 8078a89..a1fd533 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;
>  	}
>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 8078a89..a1fd533 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;
 	}