]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: dw_mmc: Don't return error if data busy timeout
authorYang Xiwen <forbidden405@outlook.com>
Thu, 1 Feb 2024 14:05:43 +0000 (22:05 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 15 Apr 2024 07:01:32 +0000 (16:01 +0900)
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>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/dw_mmc.c

index 400066fa99a29b5cc41cd5818b89a386c27823d9..e1036641452ab4f3f072dc7bb8212c8968cf3a0d 100644 (file)
@@ -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;
                }
        }