Skip to content

Commit 028822b

Browse files
vwaxUlf Hansson
authored andcommitted
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: f7b6fc3 ("mmc: core: Support zeroout using TRIM for eMMC") Reported-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221020130123.4033218-1-vincent.whitchurch@axis.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 9972e6b commit 028822b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mmc/core/queue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static enum mmc_issue_type mmc_cqe_issue_type(struct mmc_host *host,
4848
case REQ_OP_DRV_OUT:
4949
case REQ_OP_DISCARD:
5050
case REQ_OP_SECURE_ERASE:
51+
case REQ_OP_WRITE_ZEROES:
5152
return MMC_ISSUE_SYNC;
5253
case REQ_OP_FLUSH:
5354
return mmc_cqe_can_dcmd(host) ? MMC_ISSUE_DCMD : MMC_ISSUE_SYNC;

0 commit comments

Comments
 (0)