summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-10 11:56:42 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-11-10 11:56:42 +0000
commitf72f671ceab1b30fd6a945fab22b49521e1d6c32 (patch)
treeb4eb1f330b62f1c0e168cbaee4c0b258a6f54636 /sys
parentc3c3eb69b04a2dfcd75b3e1c73d56d6238275750 (diff)
Match Apple NVMe controller by product ID, yes apple is different.
Reported and tested by gonzalo@ on a Macbookair7,1.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/nvme_pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/nvme_pci.c b/sys/dev/pci/nvme_pci.c
index e40a09268d7..7778cd6f235 100644
--- a/sys/dev/pci/nvme_pci.c
+++ b/sys/dev/pci/nvme_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme_pci.c,v 1.4 2016/10/25 06:20:41 dlg Exp $ */
+/* $OpenBSD: nvme_pci.c,v 1.5 2016/11/10 11:56:41 mpi Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -70,6 +70,10 @@ nvme_pci_match(struct device *parent, void *match, void *aux)
PCI_INTERFACE(pa->pa_class) == NVME_PCI_INTERFACE)
return (1);
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_APPLE &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_NVME)
+ return (1);
+
return (0);
}