This is a note to let you know that I've just added the patch titled mmc: block: Do not lose cache flush during CQE error recovery to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 174925d340aac55296318e43fd96c0e1d196e105 Mon Sep 17 00:00:00 2001 From: Adrian Hunter <adrian.hunter@xxxxxxxxx> Date: Fri, 3 Nov 2023 10:47:15 +0200 Subject: mmc: block: Do not lose cache flush during CQE error recovery From: Adrian Hunter <adrian.hunter@xxxxxxxxx> commit 174925d340aac55296318e43fd96c0e1d196e105 upstream. 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: 1e8e55b67030 ("mmc: block: Add CQE support") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> Reviewed-by: Avri Altman <avri.altman@xxxxxxx> Link: https://lore.kernel.org/r/20231103084720.6886-2-adrian.hunter@xxxxxxxxx Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mmc/core/block.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1418,6 +1418,8 @@ static void mmc_blk_cqe_complete_rq(stru blk_mq_requeue_request(req, true); else __blk_mq_end_request(req, BLK_STS_OK); + } else if (mq->in_recovery) { + blk_mq_requeue_request(req, true); } else { blk_mq_end_request(req, BLK_STS_OK); } Patches currently in stable-queue which might be from adrian.hunter@xxxxxxxxx are queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch queue-5.10/mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch queue-5.10/mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch