drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+)
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@saulv.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
On Fri, Jan 17, 2025 at 05:46:53PM +0100, Saúl Valdelvira wrote: > 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. We would definitely prefer the firmware solution. Quirking devices in the driver would force everyone to subscribe to the less aggressive power savings even if they're not affected. How do they offer their firmware update? I think it's common for vendors to provide some kind of bootable USB image that does the update if they don't provide a standalone firmware binary or other tooling.
> We would definitely prefer the firmware solution. Quirking devices in > the driver would force everyone to subscribe to the less aggressive > power savings even if they're not affected. That makes sense. > How do they offer their firmware update? I think it's common for vendors > to provide some kind of bootable USB image that does the update if they > don't provide a standalone firmware binary or other tooling. I don't really know. I'll search for that kind of thing. And even if I can't find it, I can still avoid the problem with a kernel parameter. So it's no big deal. Thank you so much for your time!
© 2016 - 2026 Red Hat, Inc.