summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRex Chen <rex.chen_1@nxp.com>2025-07-28 17:22:30 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:33:54 +0200
commit99141fc03c22090b13a5e7ddc4bb8909ead37558 (patch)
tree645bd4d250de04d0358e9f48d2d5670247eb7120 /drivers/mmc
parentcb7a1f5e29305aeba3f1835427450800efe17085 (diff)
downloadlinux-99141fc03c22090b13a5e7ddc4bb8909ead37558.tar.gz
linux-99141fc03c22090b13a5e7ddc4bb8909ead37558.tar.bz2
linux-99141fc03c22090b13a5e7ddc4bb8909ead37558.zip
mmc: mmc_spi: multiple block read remove read crc ack
commit fef12d9f5bcf7e2b19a7cf1295c6abd5642dd241 upstream. For multiple block read, the current implementation, transfer packet includes cmd53 + cmd53 response + block nums*(1byte token + block length bytes payload + 2bytes CRC + 1byte transfer), the last 1byte transfer of every block is not needed, so remove it. Why doesn't multiple block read need CRC ack? For read operation, host side get the payload and CRC value, then will only check the CRC value to confirm if the data is correct or not, but not send CRC ack to card. If the data is correct, save it, or discard it and retransmit if data is error, so the last 1byte transfer of every block make no sense. What's the side effect of this 1byte transfer? As the SPI is full duplex, if add this redundant 1byte transfer, SDIO card side take it as the token of next block, then all the next sub blocks sequence distort. Signed-off-by: Rex Chen <rex.chen_1@nxp.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250728082230.1037917-3-rex.chen_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmc_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 47443fb5eb33..f42d5f9c48c1 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -563,7 +563,7 @@ mmc_spi_setup_data_message(struct mmc_spi_host *host, bool multiple, bool write)
* the next token (next data block, or STOP_TRAN). We can try to
* minimize I/O ops by using a single read to collect end-of-busy.
*/
- if (multiple || write) {
+ if (write) {
t = &host->early_status;
memset(t, 0, sizeof(*t));
t->len = write ? sizeof(scratch->status) : 1;