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 B663B22A81D; Mon, 2 Jun 2025 14:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748875530; cv=none; b=cnI03FHE4Xze728NqQzgXRG8rOO/rvT4pUdAy/GDg0ss/ymHgQgiLMEuetEybpMBL5StqryyMgQZhDYTOY4fqMxPF9PcU17KAbRhywybtgB5PdcNUcpZps/TLzPaGGZubZrENyE1hCQRMDN6emAr9vDdysdajnNl3CsfU8QpJRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748875530; c=relaxed/simple; bh=sYPfQHe0ngZilKviUORoIjcMTo3PIIZjpHVsfDs3Oag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eYCKSPGGRaYDr5BEVjedBQ/CSX1wSLiTi7s/UZ61EiS3LSCJin1/sdmyy+MMS0B/5rS+EChr2AD3480qjfOJmU4UP6e7SPcVkz+B65iGlv6zehvPIWQkEGH5jAUOPMFwgYy8A7xvXOn4k8G6LvGrw3Vb/BZJf5+GsF2V+uWXLyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RLrND2jz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RLrND2jz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F41EC4CEEB; Mon, 2 Jun 2025 14:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748875530; bh=sYPfQHe0ngZilKviUORoIjcMTo3PIIZjpHVsfDs3Oag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RLrND2jzTgBFmTrkZ/RrgCUUP2A3nuCBEP77s4rzT/kZhA4LU0lt5kULnYVMCgJJj 3xP3UPXqUg86NjUeHqgVM18M8AcaSuyevgqnUC4CKzL4Jh85ZwuOBd7dSOnXehFdBr 0u+4OlJPlIfavU1whqSpV0+xRDU0BdIWrC7znED8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Erick Shepherd , Adrian Hunter , Ulf Hansson , Sasha Levin Subject: [PATCH 5.10 133/270] mmc: host: Wait for Vdd to settle on card power off Date: Mon, 2 Jun 2025 15:46:58 +0200 Message-ID: <20250602134312.664034195@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134307.195171844@linuxfoundation.org> References: <20250602134307.195171844@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Erick Shepherd [ Upstream commit 31e75ed964582257f59156ce6a42860e1ae4cc39 ] The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be lowered to less than 0.5V for a minimum of 1 ms when powering off a card. Increase wait to 15 ms so that voltage has time to drain down to 0.5V and cards can power off correctly. Issues with voltage drain time were only observed on Apollo Lake and Bay Trail host controllers so this fix is limited to those devices. Signed-off-by: Erick Shepherd Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250314195021.1588090-1-erick.shepherd@ni.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-pci-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 67d9dd2165ec7..3769595693531 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -666,8 +666,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode, sdhci_set_power(host, mode, vdd); - if (mode == MMC_POWER_OFF) + if (mode == MMC_POWER_OFF) { + if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD || + slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD) + usleep_range(15000, 17500); return; + } /* * Bus power might not enable after D3 -> D0 transition due to the -- 2.39.5