Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic avoid accessing condition variables which belong ...



details:   https://anonhg.NetBSD.org/src/rev/f928af557384
branches:  trunk
changeset: 819940:f928af557384
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Dec 24 06:04:50 2016 +0000

description:
avoid accessing condition variables which belong to a scsibus before actually
attaching the scsibus
now my SS20 boots again

diffstat:

 sys/dev/ic/ncr53c9x.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r 086217013a25 -r f928af557384 sys/dev/ic/ncr53c9x.c
--- a/sys/dev/ic/ncr53c9x.c     Sat Dec 24 05:43:31 2016 +0000
+++ b/sys/dev/ic/ncr53c9x.c     Sat Dec 24 06:04:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr53c9x.c,v 1.145 2012/06/18 21:23:56 martin Exp $    */
+/*     $NetBSD: ncr53c9x.c,v 1.146 2016/12/24 06:04:50 macallan Exp $  */
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.145 2012/06/18 21:23:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.146 2016/12/24 06:04:50 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -296,7 +296,7 @@
        /* Reset state & bus */
        sc->sc_cfflags = device_cfdata(sc->sc_dev)->cf_flags;
        sc->sc_state = 0;
-       ncr53c9x_init(sc, 1);
+       ncr53c9x_init(sc, 0);   /* no bus reset yet, leave that to scsibus* */
 
        /*
         * Now try to attach all the sub-devices
@@ -555,14 +555,14 @@
        if (doreset) {
                sc->sc_state = NCR_SBR;
                NCRCMD(sc, NCRCMD_RSTSCSI);
+
+               /* Notify upper layer */
+               scsipi_async_event(&sc->sc_channel, ASYNC_EVENT_RESET, NULL);
        } else {
                sc->sc_state = NCR_IDLE;
                ncr53c9x_sched(sc);
        }
 
-       /* Notify upper layer */
-       scsipi_async_event(&sc->sc_channel, ASYNC_EVENT_RESET, NULL);
-
        /* XXXSMP scsipi */
        KERNEL_UNLOCK_ONE(curlwp);
 }



Home | Main Index | Thread Index | Old Index