Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/ic Pull up following revision(s) (requested by ka...
details: https://anonhg.NetBSD.org/src/rev/2e82fa7e1d15
branches: netbsd-9
changeset: 964209:2e82fa7e1d15
user: martin <martin%NetBSD.org@localhost>
date: Mon Dec 07 20:04:07 2020 +0000
description:
Pull up following revision(s) (requested by kardel in ticket #1144):
sys/dev/ic/nvme.c: revision 1.53
PR kern/55839:
handle multiple nvme_rescan()s correctly by doing the
name-space identify only once per nsid.
fixes issue where modloading triggers multiple
rescans.
diffstat:
sys/dev/ic/nvme.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r 25f0e028296c -r 2e82fa7e1d15 sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Mon Dec 07 19:58:04 2020 +0000
+++ b/sys/dev/ic/nvme.c Mon Dec 07 20:04:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme.c,v 1.44.2.4 2020/09/27 10:30:16 martin Exp $ */
+/* $NetBSD: nvme.c,v 1.44.2.5 2020/12/07 20:04:07 martin 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.44.2.4 2020/09/27 10:30:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.5 2020/12/07 20:04:07 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -628,6 +628,12 @@
KASSERT(nsid > 0);
+ ns = nvme_ns_get(sc, nsid);
+ KASSERT(ns);
+
+ if (ns->ident != NULL)
+ return 0;
+
ccb = nvme_ccb_get(sc->sc_admin_q, false);
KASSERT(ccb != NULL); /* it's a bug if we don't have spare ccb here */
@@ -665,9 +671,6 @@
/* Convert data to host endian */
nvme_identify_namespace_swapbytes(identify);
- ns = nvme_ns_get(sc, nsid);
- KASSERT(ns);
- KASSERT(ns->ident == NULL);
ns->ident = identify;
done:
Home |
Main Index |
Thread Index |
Old Index