Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic nvme(4): Move disestablishment of admin q interru...
details: https://anonhg.NetBSD.org/src/rev/fb5a6f1bc7a1
branches: trunk
changeset: 379350:fb5a6f1bc7a1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat May 29 10:48:23 2021 +0000
description:
nvme(4): Move disestablishment of admin q interrupt to nvme_detach.
Nothing re-established this after suspend/resume, so attempting
suspend/resume/suspend would crash, and presumably we would miss
interrupts after resume. This keeps the establish/disestablish more
symmetric in attach/detach.
diffstat:
sys/dev/ic/nvme.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r d4bc77724c5e -r fb5a6f1bc7a1 sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Sat May 29 09:50:04 2021 +0000
+++ b/sys/dev/ic/nvme.c Sat May 29 10:48:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme.c,v 1.56 2021/05/29 08:46:38 riastradh Exp $ */
+/* $NetBSD: nvme.c,v 1.57 2021/05/29 10:48:23 riastradh Exp $ */
/* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.56 2021/05/29 08:46:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.57 2021/05/29 10:48:23 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -558,6 +558,7 @@ nvme_detach(struct nvme_softc *sc, int f
return error;
/* from now on we are committed to detach, following will never fail */
+ sc->sc_intr_disestablish(sc, NVME_ADMIN_Q);
for (i = 0; i < sc->sc_nq; i++)
nvme_q_free(sc, sc->sc_q[i]);
kmem_free(sc->sc_q, sizeof(*sc->sc_q) * sc->sc_nq);
@@ -628,7 +629,7 @@ disable:
return error;
}
-int
+static int
nvme_shutdown(struct nvme_softc *sc)
{
uint32_t cc, csts;
@@ -645,7 +646,6 @@ nvme_shutdown(struct nvme_softc *sc)
disabled = true;
}
}
- sc->sc_intr_disestablish(sc, NVME_ADMIN_Q);
if (disabled)
goto disable;
Home |
Main Index |
Thread Index |
Old Index