Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: core: Introduce the MMC_RSP_R1B_NO_CRC response

The R1B response type with ignoring CRC is used in the mmc_cqe_recovery(),
introduce the MMC_RSP_R1B_NO_CRC response type to simplify the code.

Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Message-ID: <20241126125041.16071-2-andy-ld.lu@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Andy-ld Lu and committed by
Ulf Hansson
ed97550d ea79df10

+3 -4
+2 -4
drivers/mmc/core/core.c
··· 557 557 558 558 memset(&cmd, 0, sizeof(cmd)); 559 559 cmd.opcode = MMC_STOP_TRANSMISSION; 560 - cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; 561 - cmd.flags &= ~MMC_RSP_CRC; /* Ignore CRC */ 560 + cmd.flags = MMC_RSP_R1B_NO_CRC | MMC_CMD_AC; /* Ignore CRC */ 562 561 cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT; 563 562 mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); 564 563 ··· 566 567 memset(&cmd, 0, sizeof(cmd)); 567 568 cmd.opcode = MMC_CMDQ_TASK_MGMT; 568 569 cmd.arg = 1; /* Discard entire queue */ 569 - cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; 570 - cmd.flags &= ~MMC_RSP_CRC; /* Ignore CRC */ 570 + cmd.flags = MMC_RSP_R1B_NO_CRC | MMC_CMD_AC; /* Ignore CRC */ 571 571 cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT; 572 572 err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); 573 573
+1
include/linux/mmc/core.h
··· 57 57 #define MMC_RSP_NONE (0) 58 58 #define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) 59 59 #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) 60 + #define MMC_RSP_R1B_NO_CRC (MMC_RSP_PRESENT|MMC_RSP_OPCODE|MMC_RSP_BUSY) 60 61 #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) 61 62 #define MMC_RSP_R3 (MMC_RSP_PRESENT) 62 63 #define MMC_RSP_R4 (MMC_RSP_PRESENT)