[PATCH v2] nvme/pci: Add DEEPEST_PS quirk for Lenovo N60z laptop

WangYuli posted 1 patch 1 year, 5 months ago
drivers/nvme/host/pci.c | 7 +++++++
1 file changed, 7 insertions(+)
[PATCH v2] nvme/pci: Add DEEPEST_PS quirk for Lenovo N60z laptop
Posted by WangYuli 1 year, 5 months ago
There is a hardware power-saving problem with the Lenovo N60z
board. When turn it on and leave it for 30 minutes, there is a
20% chance that a nvme disk will not wake up until reboot.

Signed-off-by: hmy <huanglin@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 drivers/nvme/host/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 282d808400c5..4c840d468fce 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2903,6 +2903,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 			return NVME_QUIRK_SIMPLE_SUSPEND;
 	}
 
+	/*
+	 * NVMe SSD drops off the PCIe bus after system idle
+	 * for 30 minuites on a Lenovo N60z board.
+	 */
+	if (dmi_match(DMI_BOARD_NAME, "LXKT-ZXEG-N6"))
+		return NVME_QUIRK_NO_DEEPEST_PS;
+
 	return 0;
 }
 
-- 
2.43.4
Re: [PATCH v2] nvme/pci: Add DEEPEST_PS quirk for Lenovo N60z laptop
Posted by WangYuli 1 year, 5 months ago
Sorry, please just don't merge this patch!!!


Just a few minutes after I sent this patch, right now (after I quiesced 
this lenovo n60z laptop for 10 hours),

its nvme disk crashed again! Just like before, nothing can wake it up 
except a reboot.


This is very surprising and it seems that only 'NVME_QUIRK_NO_APST' is 
the correct choice.

I'm sure that 'NVME_QUIRK_NO_APST' will not have the same problem, I 
have tested dozens of devices of the same model before.


I will send patch v3 to revert the code to its original state.


-- 
WangYuli <wangyuli@uniontech.com>