lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250117164653.1751-1-saul@saulv.es>
Date: Fri, 17 Jan 2025 17:46:53 +0100
From: Saúl Valdelvira <saul@...lv.es>
To: kbusch@...nel.org,
	axboe@...nel.dk,
	hch@....de,
	sagi@...mberg.me
Cc: Saúl Valdelvira <saul@...lv.es>,
	linux-nvme@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] nvme-pci: Avoid the deepest sleep state on Wester Digital SSD

The Western Digital PC SN520 NVMe SSD has a firmware issue that causes
it to hang when APST is enabled. This bug freezes the computer and
forces the user to cold-reboot.

Add a quirk for this model to avoid the deepest sleep states.

Signed-off-by: Saúl Valdelvira <saul@...lv.es>
---
Hello, my name is Saúl.
Here's a patch that works arround a firmware issue I've been
experiencing for years in the aforementioned SSD card model.

Long story short:
4 years ago I bought a new laptop, and for some reason I was unable to
install Linux on it. Everytime I booted Linux, the computer hanged after
a few seconds.

I've been working arround this issue by setting the following kernel
parameter: nvme_core.default_ps_max_latency_us=14000

Adding the NVME_QUIRK_NO_DEEPEST_PS flag fixed the issue completely.

This [1] page from Dell's web mentions a firmware update for this SSD
with number 20240012 that seems to address the issue.
The problem is that, as far as i know, Western Digital doesn't offer
official firmware updates for Linux. At least, I haven't been able to
update it.

Here's some info about my SSD
- Model: WDC PC SN520 SDAPNUW-512G-1014
- Vendor: Western Digital
- Firmware Revision: 20110000

Hope you find this patch usefull.

[1] https://www.dell.com/support/home/en-uk/drivers/driversdetails?driverid=ffk91&lwp=rt
---

 drivers/nvme/host/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e2634f437f33..20a94e479caf 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3760,6 +3760,8 @@ static const struct pci_device_id nvme_id_table[] = {
 				NVME_QUIRK_SHARED_TAGS |
 				NVME_QUIRK_SKIP_CID_GEN |
 				NVME_QUIRK_IDENTIFY_CNS },
+	{ PCI_DEVICE(0x15b7, 0x5003), /* WDC PC SN520 SDAPNUW-512G-1014 */
+		.driver_data = NVME_QUIRK_NO_DEEPEST_PS },
 	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
 	{ 0, }
 };
--
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ