From: "NG, TZE YEE" <tze.yee.ng@altera.com>
To: "Kathpalia, Tanmay" <tanmay.kathpalia@altera.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/4] mmc: sdhci-cadence: add PHY settle after tuning for SD6HC
Date: Fri, 30 Oct 2026 13:25:55 +0800 [thread overview]
Message-ID: <2723bf11-8477-4f52-a95c-4ede190ecbd5@altera.com> (raw)
In-Reply-To: <dab17adc-1691-463f-bb85-7d1276fbf28f@altera.com>
Hi Tanmay,
Thanks for the detailed walk-through against the spec, it matches what
I see on the hardware.
On 26/10/2026 4:17 am, Kathpalia, Tanmay wrote:
> I'll test aborting each CMD21 that fails with a command error, and
> also a single abort after tuning completes, to see whether that
> removes the CMD6 failure. If you can test the same, that would help.
> I would prefer that fix over an unconditional sleep.
I tried the abort approach and dropped the PHY settle entirely, it
works. I now pass the command error back from mmc_send_tuning() and call
mmc_send_abort_tuning() whenever a tap fails with a command error, i.e.
the same thing the generic sdhci tuning path (sdhci_abort_tuning())
already does. Aborting only the failed tuning commands was enough; I did
not need the extra single abort after the scan.
Tested on Agilex5 SoCDK, both media:
- eMMC (HS400): HS200 -> HS -> HS400 completes and the CMD6
response timeout is gone. 8 GiB dd + 8 GiB fio (crc32c verify) + 2 GiB
image write/verify all clean.
- SD (SDR104): 2 GiB image write/verify clean. Abort is a no-op here
since CMD12 is not defined for CMD19, so the SD path is unchanged.
An ftrace of the tuning scan confirms your theory directly: a CMD21
fails in the command phase, I issue CMD12 to abort it, and tuning then
converges.
err_stats after boot: Command Timeout = 0, Tuning Error = 0. The one
non-zero command CRC is the abort itself. The CMD12 is sent at that same
failing tap, so the card's response to it is mis-sampled and counted
(CMD12 is not a tuning opcode). The command is still delivered, the card
leaves the Data state, so it is cosmetic. The data timeouts are tuning
taps whose data phase did not return; data CRCs are suppressed as usual.
For v3 I'll drop the unconditional PHY settle in this patch and replace
it with the abort-on-command-error change.
Thanks,
Tze Yee
next prev parent reply other threads:[~2026-10-30 5:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 2:14 [PATCH v2 0/4] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes tze.yee.ng
2026-10-09 2:14 ` [PATCH v2 1/4] mmc: sdhci-cadence: add PHY settle after tuning for SD6HC tze.yee.ng
2026-10-25 20:17 ` Kathpalia, Tanmay
2026-10-30 5:25 ` NG, TZE YEE [this message]
2026-10-30 7:04 ` Kathpalia, Tanmay
2026-10-09 2:14 ` [PATCH v2 2/4] mmc: sdhci-cadence6: program PHONY_DQS_TIMING for extended-read DDR tze.yee.ng
2026-10-09 2:14 ` [PATCH v2 3/4] dt-bindings: mmc: cdns,sd6hc: add SD6HC DDR50 read-path tuning tze.yee.ng
2026-10-12 8:48 ` Krzysztof Kozlowski
2026-10-29 6:21 ` NG, TZE YEE
2026-10-09 2:14 ` [PATCH v2 4/4] mmc: sdhci-cadence6: read SD6HC DDR50 tuning from device tree tze.yee.ng
2026-10-29 13:25 ` Adrian Hunter
2026-10-30 6:03 ` NG, TZE YEE
2026-10-18 21:19 ` [PATCH v2 0/4] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes Kathpalia, Tanmay
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=2723bf11-8477-4f52-a95c-4ede190ecbd5@altera.com \
--to=tze.yee.ng@altera.com \
--cc=adrian.hunter@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tanmay.kathpalia@altera.com \
/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