* [PATCH] mmc: return immediately once the dwmci data transfer fails
@ 2024-05-28 6:01 linjunbao
0 siblings, 0 replies; 2+ messages in thread
From: linjunbao @ 2024-05-28 6:01 UTC (permalink / raw)
To: u-boot; +Cc: linjunbao
Originally, when the host is in dma mode, the return status of
dwmci_data_transfer() gets overlapped by the latter DWMCI_IDINTEN query.
When the data transfer fails and the query succeeds, the failure gets
escaped. Add quick return when data transfer fails.
Signed-off-by: linjunbao <meljbao@gmail.com>
---
drivers/mmc/dw_mmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index e103664145..e04872c432 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -372,6 +372,10 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (data) {
ret = dwmci_data_transfer(host, data);
+ if (ret) {
+ debug("DWMCI data transfer fail.\n");
+ return ret;
+ }
/* only dma mode need it */
if (!host->fifo_mode) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] mmc: return immediately once the dwmci data transfer fails
@ 2024-05-28 6:15 linjunbao
0 siblings, 0 replies; 2+ messages in thread
From: linjunbao @ 2024-05-28 6:15 UTC (permalink / raw)
To: u-boot
Cc: linjunbao, Jaehoon Chung, Jonas Karlman, Peng Fan, Peter Robinson,
Tom Rini, Yang Xiwen
Originally, when the host is in dma mode, the return status of
dwmci_data_transfer() gets overlapped by the latter DWMCI_IDINTEN query.
When the data transfer fails and the query succeeds, the failure gets
escaped. Add quick return when data transfer fails.
Signed-off-by: linjunbao <meljbao@gmail.com>
---
drivers/mmc/dw_mmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index e103664145..e04872c432 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -372,6 +372,10 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (data) {
ret = dwmci_data_transfer(host, data);
+ if (ret) {
+ debug("DWMCI data transfer fail.\n");
+ return ret;
+ }
/* only dma mode need it */
if (!host->fifo_mode) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-28 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 6:01 [PATCH] mmc: return immediately once the dwmci data transfer fails linjunbao
-- strict thread matches above, loose matches on Subject: below --
2024-05-28 6:15 linjunbao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox