summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-05-29 08:07:44 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-05-29 08:07:44 +0000
commit7f33a111967edbb4c8b315dd9c64c831ec74f52d (patch)
tree4581bf0ffafd4e35277c7b04b7fbc5efc4988870 /sys/dev/ic
parenta740f31c21639d2a583fa5082aa97038cdccbab0 (diff)
Only allocate the "hibernate" queue when HIBERNATE support is being built.
This makes the NVMe storage on the Apple M1 machines actually work! ok patrick@, dlg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/nvme.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 505884cfaf1..f781e14e532 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.96 2021/05/28 03:05:01 dlg Exp $ */
+/* $OpenBSD: nvme.c,v 1.97 2021/05/29 08:07:43 kettenis Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -367,11 +367,13 @@ nvme_attach(struct nvme_softc *sc)
goto free_q;
}
+#ifdef HIBERNATE
sc->sc_hib_q = nvme_q_alloc(sc, NVME_HIB_Q, 4, sc->sc_dstrd);
if (sc->sc_hib_q == NULL) {
printf("%s: unable to allocate hibernate io queue\n", DEVNAME(sc));
goto free_q;
}
+#endif
nvme_write4(sc, NVME_INTMC, 1);