aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Whitchurch <[email protected]>2022-10-20 13:01:23 +0000
committerUlf Hansson <[email protected]>2022-10-24 17:14:17 +0000
commit028822b714bd3a159d65416c53f1549345b53d9e (patch)
tree39b63ad3629941b74923089a87a8b451a3bec795
parentmmc: core: Fix kernel panic when remove non-standard SDIO card (diff)
downloadkernel-028822b714bd3a159d65416c53f1549345b53d9e.tar.gz
kernel-028822b714bd3a159d65416c53f1549345b53d9e.zip
mmc: core: Fix WRITE_ZEROES CQE handling
WRITE_ZEROES requests use TRIM, so mark them as needing to be issued synchronously even when a CQE is being used. Without this, mmc_blk_mq_issue_rq() triggers a WARN_ON_ONCE() and fails the request since we don't have any handling for issuing this asynchronously. Fixes: f7b6fc327327 ("mmc: core: Support zeroout using TRIM for eMMC") Reported-by: Jon Hunter <[email protected]> Tested-by: Jon Hunter <[email protected]> Signed-off-by: Vincent Whitchurch <[email protected]> Reviewed-by: Avri Altman <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/core/queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 86be55d7cf55..b396e3900717 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -48,6 +48,7 @@ static enum mmc_issue_type mmc_cqe_issue_type(struct mmc_host *host,
case REQ_OP_DRV_OUT:
case REQ_OP_DISCARD:
case REQ_OP_SECURE_ERASE:
+ case REQ_OP_WRITE_ZEROES:
return MMC_ISSUE_SYNC;
case REQ_OP_FLUSH:
return mmc_cqe_can_dcmd(host) ? MMC_ISSUE_DCMD : MMC_ISSUE_SYNC;