From: kettenis Date: Sat, 29 May 2021 08:07:43 +0000 (+0000) Subject: Only allocate the "hibernate" queue when HIBERNATE support is being built. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4d4525de17a8cebd666e3cf050f7900cdf09d4e8;p=openbsd 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@ --- 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 @@ -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);