All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kathpalia, Tanmay" <tanmay.kathpalia@altera.com>
To: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>,
	Sumit Garg <sumit.garg@kernel.org>,
	u-boot-qcom@groups.io, u-boot@lists.u-boot-project.org
Cc: Casey Connolly <casey.connolly@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Peng Fan <peng.fan@nxp.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Tom Rini <trini@konsulko.com>,
	Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>,
	Aswin Murugan <aswin.murugan@oss.qualcomm.com>,
	Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Subject: Re: [PATCH] mmc: msm_sdhci: drop SDHCI_QUIRK_WAIT_SEND_CMD
Date: Sun, 1 Nov 2026 14:47:25 +0530	[thread overview]
Message-ID: <00e66a4e-4afc-42c7-8afd-ca59df81ce81@altera.com> (raw)
In-Reply-To: <20261030-msm-sdhci-wait-send-cmd-v1-1-6ef678db1585@oss.qualcomm.com>


On 30-10-2026 19:27, Igor Opaniuk wrote:
> SDHCI_QUIRK_WAIT_SEND_CMD makes sdhci_send_command() sleep for 1 ms
> after every command.

Nit: "after every command" is slightly broad - with
SDHCI_QUIRK_BROKEN_R1B also set (as msm_sdhci does), busy-response
commands without data already return early in sdhci_send_command()
before reaching this udelay(), so they never paid it. Might be worth
rephrasing to "after most commands" or similar.

Not a blocker, a commit-message polish.

> msm_sdhci has set it since the driver was added
> for APQ8016, back when it only did PIO; the commit gives no reason for
> it, and the Linux sdhci-msm driver has no such delay.
>
> The delay is invisible for large reads but dominates small ones. A
> multi-block read is CMD18 followed by CMD12, so every read pays 2 ms
> on top of the transfer. With the eMMC in HS400 a 128 KiB read takes
> about 0.4 ms, so USB mass storage, which reads in 128 KiB (FSG_BUFLEN)
> chunks, spent most of its time in udelay(). On the Arduino UNO Q,
> reading 1 GiB from "ums 0 mmc 0" on a USB 3 host
> (dd if=/dev/sdX of=/dev/null bs=4M count=256):
>
>                       host throughput   time in eMMC reads (10.6k reads)
>    with the quirk     46 MB/s           26.8 s (~2.5 ms per read)
>    without            201 MB/s           4.5 s (~0.4 ms per read)
>
> A single 128 MiB "mmc read" runs at 255.6 MiB/s either way.
>
> Drop the quirk and keep SDHCI_QUIRK_BROKEN_R1B.
>
> Tested on the Arduino UNO Q (QRB2210, qcom,sdhci-msm-v5, ADMA):
> - on main (eMMC in DDR52): 128 MiB "mmc read" at 75 MiB/s as before,
>    the CRC32 of the first 128 MiB read in U-Boot matches the one Linux
>    computes from the same blocks, and Linux boots from the eMMC;
> - with the "qcom: Enable HS200/HS400 eMMC modes" series and the
>    mass_storage SuperSpeed descriptor patch applied (eMMC in HS400):
>    the ums numbers above, same CRC32 check and Linux boot.
> Not tested on v4 controllers or on the boards that use the driver in
> PIO mode (qcom_dragonboard410c, qcom_dragonboard820c, hmibsc).
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>

Reviewed-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>


  parent reply	other threads:[~2026-11-01  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 13:57 [PATCH] mmc: msm_sdhci: drop SDHCI_QUIRK_WAIT_SEND_CMD Igor Opaniuk
2026-10-31 15:03 ` Aswin Murugan
2026-11-01  9:17 ` Kathpalia, Tanmay [this message]
2026-11-20 20:08 ` Stephan Gerhold

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=00e66a4e-4afc-42c7-8afd-ca59df81ce81@altera.com \
    --to=tanmay.kathpalia@altera.com \
    --cc=aswin.murugan@oss.qualcomm.com \
    --cc=balaji.selvanathan@oss.qualcomm.com \
    --cc=casey.connolly@linaro.org \
    --cc=igor.opaniuk@oss.qualcomm.com \
    --cc=jh80.chung@samsung.com \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=sumit.garg@kernel.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=varadarajan.narayanan@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.