Module Name: src Committed By: macallan Date: Sat Dec 24 06:04:50 UTC 2016
Modified Files: src/sys/dev/ic: ncr53c9x.c Log Message: avoid accessing condition variables which belong to a scsibus before actually attaching the scsibus now my SS20 boots again To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/dev/ic/ncr53c9x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/ncr53c9x.c diff -u src/sys/dev/ic/ncr53c9x.c:1.145 src/sys/dev/ic/ncr53c9x.c:1.146 --- src/sys/dev/ic/ncr53c9x.c:1.145 Mon Jun 18 21:23:56 2012 +++ src/sys/dev/ic/ncr53c9x.c Sat Dec 24 06:04:50 2016 @@ -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 @@ ncr53c9x_attach(struct ncr53c9x_softc *s /* 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 @@ ncr53c9x_init(struct ncr53c9x_softc *sc, 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); }