From 3d9af6480a3da0c902953d8f44c394d277fc0715 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Fri, 3 Feb 2023 10:00:27 +0800 Subject: [PATCH] PCI: Mark Micron 2100AI NVMe to avoid using ASPM From test, 2100AI NVMe randomly reject TLP access when ASPM is enabled. Especially after powering cycle it, it immediately enters lower power mode but refuse to ack TLP. Signed-off-by: Shawn Lin Change-Id: I2ce3e857014296195d91cd89c8185810a271b4af --- drivers/pci/quirks.c | 7 +++++++ include/linux/pci_ids.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1be2894ada70..0ad6bf1807b2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2357,6 +2357,13 @@ static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev) */ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1); +/* + * Micron 2100AI NVMe doesn't work reliably when ASPM is enabled. Disable + * ASPM support for it now. + */ +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICRON, PCI_DEVICE_ID_MICRON_2100AI, + quirk_disable_aspm_l0s_l1); + /* * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain * Link bit cleared after starting the link retrain process to allow this diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 2efb6a1c823f..cf4e50e87cb5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1912,6 +1912,9 @@ #define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425 #define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155 +#define PCI_VENDOR_ID_MICRON 0x1344 +#define PCI_DEVICE_ID_MICRON_2100AI 0x6001 + #define PCI_VENDOR_ID_DOMEX 0x134a #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001