]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
nvme: Detect devices that are class Storage Express
authorJon Nettleton <jon@solid-run.com>
Thu, 3 Aug 2017 09:31:00 +0000 (02:31 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 13 Aug 2017 19:17:32 +0000 (15:17 -0400)
This adds support to detect the catchall PCI class for NVMe devices.
It allows the drivers to work with most NVMe devices that don't need
specific detection due to quirks etc.

Tested against a Samsung 960 EVO drive.

Signed-off-by: Jon Nettleton <jon@solid-run.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/nvme/nvme.c
include/pci_ids.h

index a60682af117431e785951e7da8c855072c9c54f2..feea02aa85d75b31f72e169fa7c3dec154938887 100644 (file)
@@ -832,7 +832,7 @@ U_BOOT_DRIVER(nvme) = {
 };
 
 struct pci_device_id nvme_supported[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0953) },
+       { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, ~0) },
        {}
 };
 
index ab6aa58adb815b8748bcd0b35f574935468a0987..fdda679cc05a7b1612afed3c3d08efbd64b8c36c 100644 (file)
@@ -21,6 +21,7 @@
 #define PCI_CLASS_STORAGE_SATA         0x0106
 #define PCI_CLASS_STORAGE_SATA_AHCI    0x010601
 #define PCI_CLASS_STORAGE_SAS          0x0107
+#define PCI_CLASS_STORAGE_EXPRESS      0x010802
 #define PCI_CLASS_STORAGE_OTHER                0x0180
 
 #define PCI_BASE_CLASS_NETWORK         0x02