Skip to content

Commit cdea98b

Browse files
dsdbjorn-helgaas
authored andcommitted
PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge
The Asus B1400 with original shipped firmware versions and VMD disabled cannot resume from suspend: the NVMe device becomes unresponsive and inaccessible. This appears to be an untested D3cold transition by the vendor; Intel socwatch shows that Windows leaves the NVMe device and parent bridge in D0 during suspend, even though these firmware versions have StorageD3Enable=1. The NVMe device and parent PCI bridge both share the same "PXP" ACPI power resource, which gets turned off as both devices are put into D3cold during suspend. The _OFF() method calls DL23() which sets a L23E bit at offset 0xe2 into the PCI configuration space for this root port. This is the specific write that the _ON() routine is unable to recover from. This register is not documented in the public chipset datasheet. Disallow D3cold on the PCI bridge to enable successful suspend/resume. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215742 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Jian-Hong Pan <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]>
1 parent 6613476 commit cdea98b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

arch/x86/pci/fixup.c

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,54 @@ static void chromeos_fixup_apl_pci_l1ss_capability(struct pci_dev *dev)
907907
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_save_apl_pci_l1ss_capability);
908908
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_fixup_apl_pci_l1ss_capability);
909909

910+
/*
911+
* Disable D3cold on Asus B1400 PCI-NVMe bridge
912+
*
913+
* On this platform with VMD off, the NVMe device cannot successfully power
914+
* back on from D3cold. This appears to be an untested transition by the
915+
* vendor: Windows leaves the NVMe and parent bridge in D0 during suspend.
916+
*
917+
* We disable D3cold on the parent bridge for simplicity, and the fact that
918+
* both parent bridge and NVMe device share the same power resource.
919+
*
920+
* This is only needed on BIOS versions before 308; the newer versions flip
921+
* StorageD3Enable from 1 to 0.
922+
*/
923+
static const struct dmi_system_id asus_nvme_broken_d3cold_table[] = {
924+
{
925+
.matches = {
926+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
927+
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.304"),
928+
},
929+
},
930+
{
931+
.matches = {
932+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
933+
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.305"),
934+
},
935+
},
936+
{
937+
.matches = {
938+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
939+
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.306"),
940+
},
941+
},
942+
{
943+
.matches = {
944+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
945+
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.307"),
946+
},
947+
},
948+
{}
949+
};
950+
951+
static void asus_disable_nvme_d3cold(struct pci_dev *pdev)
952+
{
953+
if (dmi_check_system(asus_nvme_broken_d3cold_table) > 0)
954+
pci_d3cold_disable(pdev);
955+
}
956+
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x9a09, asus_disable_nvme_d3cold);
957+
910958
#ifdef CONFIG_SUSPEND
911959
/*
912960
* Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but

0 commit comments

Comments
 (0)