* [PATCH] mmc: dw_mmc: Demote the data timeout message to dev_dbg
@ 2026-12-04 6:22 Francesco Saverio Pavone
2026-12-04 16:06 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Francesco Saverio Pavone @ 2026-12-04 6:22 UTC (permalink / raw)
To: Ulf Hansson, Jaehoon Chung, Shawn Lin
Cc: Sebastian Reichel, linux-mmc, linux-rockchip
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")
Suggested-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://lore.kernel.org/all/613ac7d8-4bce-4764-9234-7686351200fb@rock-chips.com/
Signed-off-by: Francesco Saverio Pavone <pavone.lawyer@gmail.com>
---
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(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index ff0b25d287a94..897936252ea08 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -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
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: dw_mmc: Demote the data timeout message to dev_dbg
2026-12-04 6:22 [PATCH] mmc: dw_mmc: Demote the data timeout message to dev_dbg Francesco Saverio Pavone
@ 2026-12-04 16:06 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2026-12-04 16:06 UTC (permalink / raw)
To: Francesco Saverio Pavone
Cc: Ulf Hansson, Jaehoon Chung, Shawn Lin, linux-mmc, linux-rockchip
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
Hi,
On Fri, Dec 04, 2026 at 07:22:28AM +0100, Francesco Saverio Pavone wrote:
> 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")
> Suggested-by: Shawn Lin <shawn.lin@rock-chips.com>
> Link: https://lore.kernel.org/all/613ac7d8-4bce-4764-9234-7686351200fb@rock-chips.com/
> Signed-off-by: Francesco Saverio Pavone <pavone.lawyer@gmail.com>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Greetings,
-- Sebastian
> drivers/mmc/host/dw_mmc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index ff0b25d287a94..897936252ea08 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -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
> --
> 2.54.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 6:22 [PATCH] mmc: dw_mmc: Demote the data timeout message to dev_dbg Francesco Saverio Pavone
2026-12-04 16:06 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox