Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS for Lexar NQ790
@ 2026-11-09 20:15 Platon Miller
  2026-11-09 20:19 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Platon Miller @ 2026-11-09 20:15 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, axboe, hch, sagi, Platon Miller

The Lexar SSD NQ790 (PCI ID 1d97:5236, firmware 1.7.O.4F) advertises
a non-operational power state PS4 with 70000us exit latency. When the
controller enters PS4 via APST, it experiences significant latency
resuming from sleep and gets stuck reporting 100% active/busy time,
leading to noticeable I/O latency spikes in userspace.

Add NVME_QUIRK_NO_DEEPEST_PS to nvme_id_table for this device to prevent
it from entering PS4, while retaining shallower power-saving states.

Signed-off-by: Platon Miller <platon.ksenzenkokk@gmail.com>
---
 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 f8088d5aa..5414b16d4 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -4508,6 +4508,8 @@ static const struct pci_device_id nvme_id_table[] = {
 	{ PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
 		.driver_data = NVME_QUIRK_BOGUS_NID |
 				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+	{ PCI_DEVICE(0x1d97, 0x5236), /* Lexar NQ790 / NM800 PRO */
+		.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
 	{ PCI_DEVICE(0x10ec, 0x5763), /* TEAMGROUP T-FORCE CARDEA ZERO Z330 SSD */
 		.driver_data = NVME_QUIRK_BOGUS_NID, },
 	{ PCI_DEVICE(0x1e4b, 0x1602), /* HS-SSD-FUTURE 2048G  */
-- 
2.56.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS for Lexar NQ790
  2026-11-09 20:15 [PATCH] nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS for Lexar NQ790 Platon Miller
@ 2026-11-09 20:19 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-09 20:19 UTC (permalink / raw)
  To: Platon Miller, linux-nvme

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] nvme-pci: unreachable duplicate PCI ID entries in
  nvme_id_table [1]
--

commit 429e3e2e059a46cae1c4b2dd37e74978a88e3c7d
Author: Platon Miller <platon.ksenzenkokk@gmail.com>

nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS for Lexar NQ790

This commit adds the NVME_QUIRK_NO_DEEPEST_PS quirk for the Lexar NQ790
SSD (PCI ID 1d97:5236) to prevent it from entering its non-operational
PS4 state via APST.

> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index f8088d5aa724c..5414b16d44387 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -4508,6 +4508,8 @@ static const struct pci_device_id nvme_id_table[] = {
>  	{ PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
>  		.driver_data = NVME_QUIRK_BOGUS_NID |
>  				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
> +	{ PCI_DEVICE(0x1d97, 0x5236), /* Lexar NQ790 / NM800 PRO */
> +		.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },

[Severity: Medium]
This problem wasn't introduced by this patch, but nvme_id_table contains
duplicate PCI ID entries for 0x1d97:0x2263 [1]:

drivers/nvme/host/pci.c:nvme_id_table[] = {
    ...
	{ PCI_DEVICE(0x1d97, 0x2263),   /* SPCC */
		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
    ...
	{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
		.driver_data = NVME_QUIRK_BOGUS_NID, },
    ...
};

Because pci_match_device() stops at the first matching vendor and device
ID, is the Lexar NM610 entry unreachable, leaving those drives with
NVME_QUIRK_DISABLE_WRITE_ZEROES instead of NVME_QUIRK_BOGUS_NID?

[1] https://sashiko.dev/#/bug/linux-6e3b737e-406a-4fa3-94f8-00407fa27202

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109201503.10098-1-platon.ksenzenkokk@gmail.com?part=1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-09 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 20:15 [PATCH] nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS for Lexar NQ790 Platon Miller
2026-11-09 20:19 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox