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 A7FCF22A4E5; Mon, 2 Jun 2025 15:06:38 +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=1748876798; cv=none; b=ghOXFdD2aJma3FluZeQHXi9wL8ECjaKbwH2CCtZZNo+mowtAvErzhJqQDqGODps0dBXh1l/x667HzvgYrP0UYad8Y0WAYi6XEx537ACxwBjOK/MuE5XDtt9f9em+hLy9i3oit5OLenaoL49uq/mlUUyuBkO6x9qLL+UwE1ovkZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876798; c=relaxed/simple; bh=EE+p2Tn3lUqSisbGYm5oX9/MnQ7AxrE+w4rQ6hb9djc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wq8h31hY4TEtN85JwLDxFkNfeaD0U5hNfXrwL7suA+nhhO0a1zZIr/IldNH/KJNN5LoAApEs+vpWCAxesYSN6w2wtnZh4GiDu8pS8CQK5h3FTmlkbzCwCHCEC1+DNjlEttPNJ1t7TwpvJBL1NzTBnhIyFMk88hMVTraMSCsIKfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yGuCcQzB; 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="yGuCcQzB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F2EFC4CEEB; Mon, 2 Jun 2025 15:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748876798; bh=EE+p2Tn3lUqSisbGYm5oX9/MnQ7AxrE+w4rQ6hb9djc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yGuCcQzB3RtMK+oCi9WYmXXmW7uLxTRH7h1qewWuSKkjuIMccqjRT7Lh2yQfTBZq6 JL2n1E2uSP6jcfdXDbnl8IF8MaJvyvLs7P/2JUS0SpjFbfXvZlnvuKVTdMGVHCI5Gb 5SOcaTXENR46W45aPgU8GM9gRybuPmklJesNp24E= 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 6.1 047/325] mmc: host: Wait for Vdd to settle on card power off Date: Mon, 2 Jun 2025 15:45:23 +0200 Message-ID: <20250602134321.662287034@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134319.723650984@linuxfoundation.org> References: <20250602134319.723650984@linuxfoundation.org> User-Agent: quilt/0.68 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.1-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 5a5cc40d4bc37..c71d9956b398d 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -613,8 +613,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