All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Don't return error if data busy timeout
@ 2024-01-26  3:29 Yang Xiwen
       [not found] ` <CGME20240402235337epcas1p4fce814a4edf451277db5040e6edfa403@epcas1p4.samsung.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Xiwen @ 2024-01-26  3:29 UTC (permalink / raw)
  To: Peng Fan, Jaehoon Chung; +Cc: Yang Xiwen, u-boot

As described in [1], some poor hardware or cards would fail to release
the bus and keep driving data lines low. Ignore it and send the next cmd
directly seems okay for most cases.

[1]: https://patchwork.kernel.org/project/linux-mmc/patch/1424458179-5456-1-git-send-email-dianders@chromium.org/

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
 drivers/mmc/dw_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 400066fa99..e103664145 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -262,8 +262,8 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
 
 	while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) {
 		if (get_timer(start) > timeout) {
-			debug("%s: Timeout on data busy\n", __func__);
-			return -ETIMEDOUT;
+			debug("%s: Timeout on data busy, continue anyway\n", __func__);
+			break;
 		}
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Don't return error if data busy timeout
       [not found] ` <CGME20240402235337epcas1p4fce814a4edf451277db5040e6edfa403@epcas1p4.samsung.com>
@ 2024-04-02 23:53   ` Jaehoon Chung
  0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2024-04-02 23:53 UTC (permalink / raw)
  To: Yang Xiwen, Peng Fan; +Cc: u-boot

Hi,

On 1/26/24 12:29, Yang Xiwen wrote:
> As described in [1], some poor hardware or cards would fail to release
> the bus and keep driving data lines low. Ignore it and send the next cmd
> directly seems okay for most cases.

I didn't test on my board. But it's not same with below patch.
Did you check all cases?

Best Regards,
Jaehoon Chung

> 
> [1]: https://patchwork.kernel.org/project/linux-mmc/patch/1424458179-5456-1-git-send-email-dianders@chromium.org/
> 
> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
> ---
>  drivers/mmc/dw_mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> index 400066fa99..e103664145 100644
> --- a/drivers/mmc/dw_mmc.c
> +++ b/drivers/mmc/dw_mmc.c
> @@ -262,8 +262,8 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
>  
>  	while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) {
>  		if (get_timer(start) > timeout) {
> -			debug("%s: Timeout on data busy\n", __func__);
> -			return -ETIMEDOUT;
> +			debug("%s: Timeout on data busy, continue anyway\n", __func__);
> +			break;
>  		}
>  	}
>  


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-02 23:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26  3:29 [PATCH] mmc: dw_mmc: Don't return error if data busy timeout Yang Xiwen
     [not found] ` <CGME20240402235337epcas1p4fce814a4edf451277db5040e6edfa403@epcas1p4.samsung.com>
2024-04-02 23:53   ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.