From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B7DF1115 for ; Sun, 3 Dec 2023 13:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="G4ZCuJ84" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFCABC433C7; Sun, 3 Dec 2023 13:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1701609242; bh=+ZOGzyIFZAFDSPRWv6aXRd72hSKufgnIDbYIUPlOQYg=; h=Subject:To:Cc:From:Date:From; b=G4ZCuJ84Bg4GkrhfrwMCuzSAEWz6Fx7aNtqLwmjhK08UK+7hqhuOSAa4lcIfc0ZeU tliWxNhTgJMwN6ju9WoRFeoIecLxXD3oW3lJZDT8xLmifABnw3wKL03LRnEn70h+cD dSoukHqvAUC/2An3DNYcyL3iz1TY0riu63BfJXHk= Subject: FAILED: patch "[PATCH] mmc: block: Be sure to wait while busy in CQE error recovery" failed to apply to 5.10-stable tree To: adrian.hunter@intel.com,avri.altman@wdc.com,christian.loehle@arm.com,ulf.hansson@linaro.org Cc: From: Date: Sun, 03 Dec 2023 14:13:58 +0100 Message-ID: <2023120358-baking-anymore-b0c7@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x c616696a902987352426fdaeec1b0b3240949e6b # git commit -s git send-email --to '' --in-reply-to '2023120358-baking-anymore-b0c7@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: c616696a9029 ("mmc: block: Be sure to wait while busy in CQE error recovery") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c616696a902987352426fdaeec1b0b3240949e6b Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Fri, 3 Nov 2023 10:47:17 +0200 Subject: [PATCH] mmc: block: Be sure to wait while busy in CQE error recovery STOP command does not guarantee to wait while busy, but subsequent command MMC_CMDQ_TASK_MGMT to discard the queue will fail if the card is busy, so be sure to wait by employing mmc_poll_for_busy(). Fixes: 72a5af554df8 ("mmc: core: Add support for handling CQE requests") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter Reviewed-by: Avri Altman Reviewed-by: Christian Loehle Link: https://lore.kernel.org/r/20231103084720.6886-4-adrian.hunter@intel.com Signed-off-by: Ulf Hansson diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 3d3e0ca52614..befde2bd26d3 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -553,6 +553,8 @@ int mmc_cqe_recovery(struct mmc_host *host) cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT; mmc_wait_for_cmd(host, &cmd, 0); + mmc_poll_for_busy(host->card, MMC_CQE_RECOVERY_TIMEOUT, true, MMC_BUSY_IO); + memset(&cmd, 0, sizeof(cmd)); cmd.opcode = MMC_CMDQ_TASK_MGMT; cmd.arg = 1; /* Discard entire queue */