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 no...



details:   https://anonhg.NetBSD.org/src/rev/4fdd28775ea2
branches:  netbsd-9
changeset: 963031:4fdd28775ea2
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Sep 26 19:13:14 2019 +0000

description:
Pull up following revision(s) (requested by nonaka in ticket #248):

        sys/dev/ic/nvme.c: revision 1.46

nvme(4): Don't attach the device, if namespace not found.

diffstat:

 sys/dev/ic/nvme.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r b4f8824798a7 -r 4fdd28775ea2 sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Thu Sep 26 19:09:57 2019 +0000
+++ b/sys/dev/ic/nvme.c Thu Sep 26 19:13:14 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvme.c,v 1.44.2.1 2019/09/22 12:18:56 martin Exp $     */
+/*     $NetBSD: nvme.c,v 1.44.2.2 2019/09/26 19:13:14 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.1 2019/09/22 12:18:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.2 2019/09/26 19:13:14 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -399,6 +399,10 @@
                aprint_error_dev(sc->sc_dev, "unable to identify controller\n");
                goto disable;
        }
+       if (sc->sc_nn == 0) {
+               aprint_error_dev(sc->sc_dev, "namespace not found\n");
+               goto disable;
+       }
 
        /* we know how big things are now */
        sc->sc_max_sgl = sc->sc_mdts / sc->sc_mps;



Home | Main Index | Thread Index | Old Index