summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-08-29 11:23:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-08-29 11:23:30 +0000
commiteb813e160a9e7aeb1208d94885fd440bc556e775 (patch)
tree79c6b690fe48e8266afcfc79b367c7467e135137 /sys/dev/ic
parentd3c0387559023f830640347cc502d4062aa8a36e (diff)
Reduce the number of openings for aplns(4) to 1. This isn't correct but
make NVMe on the Apple M1 stable. Hopefully we can figure out the real issue in the future. ok jmatthew@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/nvme.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 61861014ecc..68318ba1364 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.101 2021/07/08 22:43:59 dlg Exp $ */
+/* $OpenBSD: nvme.c,v 1.102 2021/08/29 11:23:29 kettenis Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -282,6 +282,8 @@ nvme_attach(struct nvme_softc *sc)
scsi_iopool_init(&sc->sc_iopool, sc, nvme_ccb_get, nvme_ccb_put);
if (sc->sc_ops == NULL)
sc->sc_ops = &nvme_ops;
+ if (sc->sc_openings == 0)
+ sc->sc_openings = 64;
reg = nvme_read4(sc, NVME_VS);
if (reg == 0xffffffff) {
@@ -372,7 +374,7 @@ nvme_attach(struct nvme_softc *sc)
saa.saa_adapter_buswidth = sc->sc_nn + 1;
saa.saa_luns = 1;
saa.saa_adapter_target = 0;
- saa.saa_openings = 64;
+ saa.saa_openings = sc->sc_openings;
saa.saa_pool = &sc->sc_iopool;
saa.saa_quirks = saa.saa_flags = 0;
saa.saa_wwpn = saa.saa_wwnn = 0;