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/e4cff71efa7d
branches: trunk
changeset: 1021381:e4cff71efa7d
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 41811084594c -r e4cff71efa7d 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 @@
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 @@
return error;
}
-int
+static int
nvme_shutdown(struct nvme_softc *sc)
{
uint32_t cc, csts;
@@ -645,7 +646,6 @@
disabled = true;
}
}
- sc->sc_intr_disestablish(sc, NVME_ADMIN_Q);
if (disabled)
goto disable;
Home |
Main Index |
Thread Index |
Old Index