From: Neil Armstrong <neil.armstrong@linaro.org>
To: iav@iav.lv, Ulf Hansson <ulfh@kernel.org>
Cc: Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/4] mmc: meson-gx: honour the busy timeout for R1b commands
Date: Mon, 12 Oct 2026 11:23:34 +0200 [thread overview]
Message-ID: <27d5c013-9346-4159-aded-12ed8ce4e951@linaro.org> (raw)
In-Reply-To: <20261009-meson-gx-busy-timeout-v3-0-67d0db3a8328@iav.lv>
On 10/9/26 19:02, Igor Velkov via B4 Relay wrote:
> 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.
> Patch 3 fixes card_busy, which reported a busy card free; patch 4 makes
> the core rely on it.
>
> Tested on ODROID-N2+ (S922X), 256 GB eMMC, btrfs root with discard=async,
> Armbian builds in docker as load. Without the series (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 v1 (7.3-rc6): 0 in 16 h, 2.4 h of it under the
> build. With v3: 0 in a 37 min kernel build and in a 20 GiB write +
> fstrim; a sanitize went out as R1 and the core polled DAT0 for 523 ms
> until the card was back in TRAN. 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.
>
> ODROID-N2 (S922X), 128 GB Kingston eMMC, 20 GiB write + fstrim:
> without the series an erase hit the 1024 ms limit and failed with -110
> in 3 of 3 runs. With v3, in 3 such runs and a fill of the card to 85 %
> with rm + fstrim, 5 erases took over 1024 ms, up to 1219 ms, and
> completed; 0 errors.
>
> ODROID-HC4, SD card in SDR104 at 1.8 V: 0 errors in 5 boots.
>
> 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 v3:
> - Clamp cmd->busy_timeout to the range of the field before rounding it
> up to a power of two: the rounding of a value above 2^31 overflowed
> unsigned int (Sashiko).
> - New patch 3: card_busy reports busy from DAT0 alone. It required
> DAT0..3 all low and reported a busy card free (Sashiko).
> - Link to v2: https://lore.kernel.org/r/20261008-meson-gx-busy-timeout-v2-0-8bde1adfb5b4@iav.lv
>
> 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@iav.lv
>
> ---
> Igor Velkov (4):
> 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 busy from DAT0 alone
> mmc: meson-gx: report the longest busy wait the controller can do
>
> drivers/mmc/host/meson-gx-mmc.c | 26 ++++++++++++++++++++++----
> 1 file changed, 22 insertions(+), 4 deletions(-)
> ---
> base-commit: fd9af27f6c2319713bb23832066585f8a59a1771
> change-id: 20261005-meson-gx-busy-timeout-7e8e3fdcb3e3
>
> Best regards,
This looks much better!
For me it looks all good, so:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
prev parent reply other threads:[~2026-10-12 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 17:02 Igor Velkov via B4 Relay
2026-10-09 17:02 ` [PATCH v3 1/4] mmc: meson-gx: name the limit of the CMD_CFG timeout field Igor Velkov via B4 Relay
2026-10-09 17:02 ` [PATCH v3 2/4] mmc: meson-gx: honour the busy timeout for R1b commands Igor Velkov via B4 Relay
2026-10-09 17:02 ` [PATCH v3 3/4] mmc: meson-gx: report busy from DAT0 alone Igor Velkov via B4 Relay
2026-10-09 17:03 ` [PATCH v3 4/4] mmc: meson-gx: report the longest busy wait the controller can do Igor Velkov via B4 Relay
2026-10-12 9:23 ` Neil Armstrong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27d5c013-9346-4159-aded-12ed8ce4e951@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=iav@iav.lv \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=ulfh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®