From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795533025; b=rr+XQpwge5CHUDh9205uoDx4GmDGC4E2VjMf8uo5QoJ/4ZVg0cKb0r0167+POwr1rorV O7Ic1sLojWdZvWVoPAwZ+KhxyJJWoF0UFxYiXUV7wEgGa2sS2cP9u1wyqpJZl+7OOWBsy YWKkyXKDoYM5iFjtSabOcUjAcCAQN3f1uNJlF0I8D2drx8waLc81OokuToe8mdGe1I5mE ruUSz5AdFu8lI6DrZTjv+XyKE+x/4+CtUVU+UlzS5bLtPWiJC8l2RB0Jty/B9QzbtLZSK Il87sNxdldQSiW9ZFWzn1dhvMSLaQQ9O5rUHzunUElSe7vFnPqnsGKazvxltcGWDRig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795533025; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=ssP1M6W3gOW+5UpWs6tC1Xnom9O+66GQyMEDJR0pBbQ=; b=m1eVuBuvWtxof2PITeZFaqxuaYa506Rtsvgz9zrGPll0tTj183bDhZYwSDkerr6v7d5T SgrdQ0CvD97eLT+MwnialuQHZk29SmYyzBzyQAu84W+jUxtoeTxNw7FjZsI4g4fjir32s GmwcbwfDHHPjhHbAIwlwoBMvcDOjXZeieKVmz9TL1p6gPuyrVzDW2kpAI+OurNOvs+WsO EQ7Hc8SLUtGir1YWiVcNRxnAcm3SExMWsY/A6Ipx3BCVnw7cP+PPUnW0DrAcnnmAqDncI aBaOHvcWeEKaCOk6boy08DQHJ+1JQhcaPWv2Pp40qYvexRpSEswkmiH0KewV4xE7JdA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dLQe6dXf; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EC7C606A31E for ; Tue, 24 Nov 2026 15:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dLQe6dXf Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77EE61F000D8; Tue, 24 Nov 2026 15:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795533024; bh=ssP1M6W3gOW+5UpWs6tC1Xnom9O+66GQyMEDJR0pBbQ=; h=Subject:To:Cc:From:Date; b=dLQe6dXfUzrkdGGgiiy5rX8qfMCChOuMcZKyZXIuMOwYV6xLP5Njf61r06GIIjFpC ks8xbywnWr3JcMAPaoF41+mNGbBtm61yPlPL7XnCgNBuW9+fYPxc0Wm8U0RqhPniEG Vqehu8vEGx5bn4CsBobc0XedjAp+4zZgJdFhuvcg= Subject: FAILED: patch "[PATCH] mmc: jz4740: Remove the host before resetting the controller" failed to apply to 5.15-stable tree To: olivier@mgcrea.io,ulfh@kernel.org Cc: From: Date: Tue, 24 Nov 2026 16:10:35 +0100 Message-ID: <2026112435-undone-daily-7520@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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.15-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.15.y git checkout FETCH_HEAD git cherry-pick -x 6b8b1e8827837bf4cf1f87219038fddae9e81b0b # git commit -s git send-email --to '' --in-reply-to '2026112435-undone-daily-7520@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 6b8b1e8827837bf4cf1f87219038fddae9e81b0b Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Mon, 26 Oct 2026 09:33:23 +0100 Subject: [PATCH] mmc: jz4740: Remove the host before resetting the controller jz4740_mmc_remove() masks every interrupt and resets the controller before mmc_remove_host(), which removes the card and lets the card's driver send its last commands. Those commands then run on a controller that was just reset, and can wait out the driver's 5 s request timeout. With an SDIO card that cost 5 s on every unbind: on a HiBy R1 (Ingenic X1600, a BCM43430A1 driven by brcmfmac), the CMD52 that sdio_release_irq() sends from brcmfmac's remove waited 5.1 s. The command had finished (END_CMD_RES set in MSC_STAT), but MSC_IMASK read 0xffffffff although the request had unmasked END_CMD_RES. MSC_STAT can still show IS_RESETTING after jz4740_mmc_reset() returns, so the reset most likely completed after that write and undid it. Remove the host first, then quiesce the controller, as other host drivers do. On the R1, unbinding the Wi-Fi's MSC now takes 0.65 s. Fixes: 61bfbdb85687 ("MMC: Add support for the controller on JZ4740 SoCs.") Cc: stable@vger.kernel.org Signed-off-by: Olivier Louvignes Signed-off-by: Ulf Hansson diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 6a3c26b7c82d..923cf1450de5 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -1151,12 +1151,13 @@ static void jz4740_mmc_remove(struct platform_device *pdev) { struct jz4740_mmc_host *host = platform_get_drvdata(pdev); + /* The card's driver may still send commands as it goes */ + mmc_remove_host(host->mmc); + timer_delete_sync(&host->timeout_timer); jz4740_mmc_set_irq_enabled(host, 0xff, false); jz4740_mmc_reset(host); - mmc_remove_host(host->mmc); - free_irq(host->irq, host); if (host->use_dma)