[PATCH v2 0/3] mmc: meson-gx: honour the busy timeout for R1b commands
From: Igor Velkov via B4 Relay
Date: Thu Oct 08 2026 - 10:37:43 EST
For a command without data the driver programs a fixed 1024 ms into the
CMD_CFG timeout field and does not tell the core how long the controller
can wait for busy. Erase and cache flush then fail with -110 on eMMC.
Tested on ODROID-N2+ (S922X), 256 GB eMMC, btrfs root with discard=async,
Armbian builds in docker as load. Without the patches (7.3-rc6): 262
errors in 3 h and 68 in 2.5 h in two runs; the first came 4 and 43 min
into the build. With the patches (7.3-rc6): 0 in 2.4 h. On 7.1 with the
previous eMMC module a synthetic test (20 GiB write + fstrim) gave 48
errors without the patches, 0 and 0 with them.
The timeout is rounded up to a power of two: the field holds powers of
two only, and the timeout is a lower bound. MMC_CAP_WAIT_WHILE_BUSY is
not set: I have not checked that the controller waits for busy on every
R1b command, HS400 switches included.
---
Changes in v2:
- Split into three patches, as Neil asked: name the limit of the
timeout field, program the R1b timeout from cmd->busy_timeout, report
max_busy_timeout.
- Link to v1: https://lore.kernel.org/r/20261008-meson-gx-busy-timeout-v1-1-d92f3c68c409@xxxxxx
---
Igor Velkov (3):
mmc: meson-gx: name the limit of the CMD_CFG timeout field
mmc: meson-gx: honour the busy timeout for R1b commands
mmc: meson-gx: report the longest busy wait the controller can do
drivers/mmc/host/meson-gx-mmc.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
---
base-commit: fd9af27f6c2319713bb23832066585f8a59a1771
change-id: 20261005-meson-gx-busy-timeout-7e8e3fdcb3e3
Best regards,
--
Igor Velkov <iav@xxxxxx>