nvme/pci: Add APST quirk for Lenovo N60z laptop
authorWangYuli <wangyuli@uniontech.com>
Mon, 15 Jul 2024 09:31:44 +0000 (17:31 +0800)
committerKeith Busch <kbusch@kernel.org>
Mon, 15 Jul 2024 20:43:39 +0000 (13:43 -0700)
There is a hardware power-saving problem with the Lenovo N60z
board. When turn it on and leave it for 10 hours, there is a
20% chance that a nvme disk will not wake up until reboot.

Link: https://lore.kernel.org/all/2B5581C46AC6E335+9c7a81f1-05fb-4fd0-9fbb-108757c21628@uniontech.com
Signed-off-by: hmy <huanglin@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c

index 21f8e1b9801fcf80934119d757aac58516801ce1..bc24a85e96ce3622544120f68915573c2f1e530e 100644 (file)
@@ -2968,6 +2968,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
                        return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
        }
 
+       /*
+        * NVMe SSD drops off the PCIe bus after system idle
+        * for 10 hours on a Lenovo N60z board.
+        */
+       if (dmi_match(DMI_BOARD_NAME, "LXKT-ZXEG-N6"))
+               return NVME_QUIRK_NO_APST;
+
        return 0;
 }