@@ -2129,7 +2129,7 @@ static void mmc_blk_mq_complete_rq(struct mmc_queue *mq, struct request *req)
} else if (mqrq->retries++ < MMC_MAX_RETRIES) {
blk_mq_requeue_request(req, true);
} else {
- if (mmc_card_removed(mq->card))
+ if (mmc_card_removed(mq->card) || mq->card->host->undervoltage)
req->rq_flags |= RQF_QUIET;
blk_mq_end_request(req, BLK_STS_IOERR);
}
@@ -239,7 +239,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
bool get_card, cqe_retune_ok;
blk_status_t ret;
- if (mmc_card_removed(mq->card)) {
+ if (mmc_card_removed(mq->card) || mq->card->host->undervoltage) {
req->rq_flags |= RQF_QUIET;
return BLK_STS_IOERR;
}
Extend the existing card removal checks in mmc_blk_mq_complete_rq() and mmc_mq_queue_rq() to also account for the undervoltage state. If the host has entered undervoltage shutdown, mark requests as quiet and abort them early to prevent unnecessary retries and error logging. This ensures no further operations are attempted on the card after an emergency stop. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> --- drivers/mmc/core/block.c | 2 +- drivers/mmc/core/queue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)