summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-11-10 11:56:41 +0000
committermpi <mpi@openbsd.org>2016-11-10 11:56:41 +0000
commit7f49499228c8fe791762b9072cfd2b9db5c748fa (patch)
treed5f6221a7e9cbbc4a0ea5c9422cd6306743c8ef8
parentregen (diff)
downloadwireguard-openbsd-7f49499228c8fe791762b9072cfd2b9db5c748fa.tar.xz
wireguard-openbsd-7f49499228c8fe791762b9072cfd2b9db5c748fa.zip
Match Apple NVMe controller by product ID, yes apple is different.
Reported and tested by gonzalo@ on a Macbookair7,1.
-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);
}