Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6A3CF471264; Tue, 21 Jul 2026 18:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659405; cv=none; b=ZhaJqhPPlpP/Umd/B32x8QkWv3AtdsF0wdrXYZZrhPOOWMcx//B7EX+rrcesHW9ihVb4FsYIynmPSnjlqROMzrkzn4iFE4ZpRhCY+Gy1DtCo1EmshY1ygCvzS6br1rVsgVIhfL6txfX/a1MhoOzdOldribYGMDGOQ1eamS9dBro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659405; c=relaxed/simple; bh=lSN0HwmRp/bkPLXLO3AXnAG4KJYlCiVxIB7CKiHf9Z8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iMbFTJCj7Jx+pL0HtAh6HwX2p9UtNDRZMuYcGt2xkGX/ey3PU6DadZ9amRIlElqVQ8cUa097jEfwDsibfVvjcSyyFug01ZZrKw555P1ACiYOxwEUEh9+oIy2ivlItW4Hi0E83EYvZCbZPEyUF+ntEK8pGSlPHlWuiEDMWESwWp8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S1b6kM8l; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="S1b6kM8l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D073F1F000E9; Tue, 21 Jul 2026 18:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784659404; bh=kEHzi9KjOCLIKwMhBEVj4YWr77S8Ngqtc//KTtqhtPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=S1b6kM8lT/WXbB8Q9Q7MPgTvQjZIc9W5FwaS9U/gPv/P2r2ziWUntxbX+e/VB33+W lj28VzSxMk6Nx9dUQhZvS97wqh3hn3pk6xx73FZnTI/iQGOx0W3uG1fbzCdtMEjwqn ZfiR3s/jo0DRZBDDcsHW4KvInXSZ0iHIC87IHLVg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Adrian Hunter , Frank Li , Haibo Chen , Luke Wang , Ulf Hansson Subject: [PATCH 6.18 1508/1611] mmc: sdhci-esdhc-imx: remove unnecessary mmc_card_wake_sdio_irq check for tuning save/restore Date: Tue, 21 Jul 2026 17:27:04 +0200 Message-ID: <20260721152549.360452989@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152514.750365251@linuxfoundation.org> References: <20260721152514.750365251@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luke Wang commit 899160e2774d9952e9f2770b38f701ff1906c0b2 upstream. The tuning save/restore during system PM is conditioned on mmc_card_wake_sdio_irq(), but this check is unrelated to whether tuning values need to be preserved. The actual requirement is that the card keeps power during suspend and the controller is a uSDHC. SDIO devices using out-of-band GPIO wakeup maintain power during suspend but do not set the SDIO IRQ wake flag. In this case the tuning delay values are not saved/restored. Remove the unnecessary mmc_card_wake_sdio_irq() condition from both the suspend save and resume restore paths. Fixes: c63d25cdc59a ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend") Acked-by: Adrian Hunter Reviewed-by: Frank Li Reviewed-by: Haibo Chen Signed-off-by: Luke Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -2041,8 +2041,7 @@ static int sdhci_esdhc_suspend(struct de * to save the tuning delay value just in case the usdhc * lost power during system PM. */ - if (mmc_card_keep_power(host->mmc) && mmc_card_wake_sdio_irq(host->mmc) && - esdhc_is_usdhc(imx_data)) + if (mmc_card_keep_power(host->mmc) && esdhc_is_usdhc(imx_data)) sdhc_esdhc_tuning_save(host); if (device_may_wakeup(dev)) { @@ -2107,8 +2106,7 @@ static int sdhci_esdhc_resume(struct dev * restore the saved tuning delay value for the device which keep * power during system PM. */ - if (mmc_card_keep_power(host->mmc) && mmc_card_wake_sdio_irq(host->mmc) && - esdhc_is_usdhc(imx_data)) + if (mmc_card_keep_power(host->mmc) && esdhc_is_usdhc(imx_data)) sdhc_esdhc_tuning_restore(host); pm_runtime_put_autosuspend(dev);