Skip to content

Commit 174925d

Browse files
ahunter6Ulf Hansson
authored andcommitted
mmc: block: Do not lose cache flush during CQE error recovery
During CQE error recovery, error-free data commands get requeued if there is any data left to transfer, but non-data commands are completed even though they have not been processed. Requeue them instead. Note the only non-data command is cache flush, which would have resulted in a cache flush being lost if it was queued at the time of CQE recovery. Fixes: 1e8e55b ("mmc: block: Add CQE support") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20231103084720.6886-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent b85ea95 commit 174925d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/mmc/core/block.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,8 @@ static void mmc_blk_cqe_complete_rq(struct mmc_queue *mq, struct request *req)
14821482
blk_mq_requeue_request(req, true);
14831483
else
14841484
__blk_mq_end_request(req, BLK_STS_OK);
1485+
} else if (mq->in_recovery) {
1486+
blk_mq_requeue_request(req, true);
14851487
} else {
14861488
blk_mq_end_request(req, BLK_STS_OK);
14871489
}

0 commit comments

Comments
 (0)