[PATCH] mmc: core: fix wrong comments in mmc_ops.c

From: Shawn Lin

Date: Sun Oct 11 2026 - 13:01:47 EST


From: Shawn Lin <shawn.lin@xxxxxxxxx>

When seeking to use mmc_send_bus_test for eMMC HS mode tuning
to workaround a vendor product, issues were found with these comments:

1. In mmc_send_adtc_data(), the comment refers to "CSR and CID",
but the branch handles MMC_SEND_CSD/MMC_SEND_CID, so it should say
"CSD and CID".

2. In mmc_send_bus_test(), the NOTE HACK comment about reading CSD or
CID with the R2 response type was copied from mmc_send_adtc_data()
and is irrelevant here: the bus test commands do not read CSD/CID and
use the R1 response correctly. Drop it.

Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxx>
---

drivers/mmc/core/mmc_ops.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index d59ff82f..fda728d 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -319,7 +319,7 @@ int mmc_send_adtc_data(struct mmc_card *card, struct mmc_host *host, u32 opcode,

if (opcode == MMC_SEND_CSD || opcode == MMC_SEND_CID) {
/*
- * The spec states that CSR and CID accesses have a timeout
+ * The spec states that CSD and CID accesses have a timeout
* of 64 clock cycles.
*/
data.timeout_ns = 0;
@@ -815,11 +815,6 @@ mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode,
cmd.opcode = opcode;
cmd.arg = 0;

- /* NOTE HACK: the MMC_RSP_SPI_R1 is always correct here, but we
- * rely on callers to never use this with "native" calls for reading
- * CSD or CID. Native versions of those commands use the R2 type,
- * not R1 plus a data block.
- */
cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;

data.blksz = len;
--
2.7.4