Skip to contentSkip to conversation

mmc: dw_mmc: Demote the data timeout message to dev_dbg

PATCH In review Francesco Saverio Pavone 2 participants 2 messages Dec 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: dw_mmc: Demote the data timeout message to dev_dbg

Since commit ec0db371236e ("mmc: dw_mmc: convert DTO onto the central watchdog") the driver prints a warning when the data timeout watchdog fires:

dwmmc_rockchip fe2c0000.mmc: Data timeout, state 3

On a ROCK 5B+ (RK3588) this shows up once per boot, while the SD card is being tuned. A tuning command whose data never arrives ends in this timeout, the request fails with -ETIMEDOUT and the tuning goes on to the next phase. In 17 boots of v7.4-rc5 the warning was there once in each, right before "Successfully tuned phase".

State 3 is STATE_DATA_BUSY. The old dw_mci_dto_timer() handled a timeout in that state without printing anything, and the data errors reported by the controller itself are already dev_dbg(). Use dev_dbg() here too.

Fixes ec0db371236e ("mmc: dw_mmc: convert DTO onto the central watchdog")

---
The "Command timeout" message next to it stays a warning: I have not seen it in these boots and the old code was silent there only in some states.

One boot of v7.4-rc5 with this patch on the ROCK 5B+: the line is gone and the card is tuned as before (phase 70). I did not turn the debug message on to see it.

Claude (Anthropic) wrote the patch and ran the boots on my board. I checked the logs.

 drivers/mmc/host/dw_mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -2
index ff0b25d287a94..897936252ea08 100644
@@ -150,8 +150,7 @@ static enum hrtimer_restart dw_mci_watchdog_fn(struct hrtimer *t)
 	}
 
 	if (host->wd_events == DW_MCI_WD_DATA_EVENTS) {
-		dev_warn(host->dev,
-			 "Data timeout, state %d\n", host->state);
+		dev_dbg(host->dev, "Data timeout, state %d\n", host->state);
 		host->data_status = SDMMC_INT_DRTO;
 		set_bit(EVENT_DATA_ERROR, &host->pending_events);
 		set_bit(EVENT_DATA_COMPLETE, &host->pending_events);

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 17 lines · Francesco Saverio Pavone

Since commit ec0db371236e ("mmc: dw_mmc: convert DTO onto the central watchdog") the driver prints a warning when the data timeout watchdog fires:

dwmmc_rockchip fe2c0000.mmc: Data timeout, state 3

On a ROCK 5B+ (RK3588) this shows up once per boot, while the SD card is being tuned. A tuning command whose data never arrives ends in this timeout, the request fails with -ETIMEDOUT and the tuning goes on to the next phase. In 17 boots of v7.4-rc5 the warning was there once in each, right before "Successfully tuned phase".

State 3 is STATE_DATA_BUSY. The old dw_mci_dto_timer() handled a timeout in that state without printing anything, and the data errors reported by the controller itself are already dev_dbg(). Use dev_dbg() here too.

Quoted 5 lines
Fixes ec0db371236e ("mmc: dw_mmc: convert DTO onto the central watchdog")

---

Greetings,

-- Sebastian

Quoted 22 lines
 drivers/mmc/host/dw_mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -2
index ff0b25d287a94..897936252ea08 100644
@@ -150,8 +150,7 @@ static enum hrtimer_restart dw_mci_watchdog_fn(struct hrtimer *t)
 	}
 
 	if (host->wd_events == DW_MCI_WD_DATA_EVENTS) {
-		dev_warn(host->dev,
-			 "Data timeout, state %d\n", host->state);
+		dev_dbg(host->dev, "Data timeout, state %d\n", host->state);
 		host->data_status = SDMMC_INT_DRTO;
 		set_bit(EVENT_DATA_ERROR, &host->pending_events);
 		set_bit(EVENT_DATA_COMPLETE, &host->pending_events);

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

Signature · 1 line
2.54.0