Module Name: src Committed By: martin Date: Sun Mar 26 18:38:34 UTC 2017
Modified Files: src/sys/arch/sparc64/dev: schizo.c Log Message: Reorder attach slightly to avoid unintialized use of OF nodes. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sparc64/dev/schizo.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/arch/sparc64/dev/schizo.c diff -u src/sys/arch/sparc64/dev/schizo.c:1.37 src/sys/arch/sparc64/dev/schizo.c:1.38 --- src/sys/arch/sparc64/dev/schizo.c:1.37 Thu Nov 10 06:44:35 2016 +++ src/sys/arch/sparc64/dev/schizo.c Sun Mar 26 18:38:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: schizo.c,v 1.37 2016/11/10 06:44:35 macallan Exp $ */ +/* $NetBSD: schizo.c,v 1.38 2017/03/26 18:38:33 martin Exp $ */ /* $OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $ */ /* @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.37 2016/11/10 06:44:35 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.38 2017/03/26 18:38:33 martin Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -157,13 +157,13 @@ schizo_attach(device_t parent, device_t if (strcmp(str, "pci108e,a801") == 0) sc->sc_tomatillo = 1; - sc->sc_ver = prom_getpropint(sc->sc_node, "version#", 0); - sc->sc_dev = self; sc->sc_node = ma->ma_node; sc->sc_dmat = ma->ma_dmatag; sc->sc_bustag = ma->ma_bustag; + sc->sc_ver = prom_getpropint(sc->sc_node, "version#", 0); + if (bus_space_map(sc->sc_bustag, ma->ma_reg[1].ur_paddr - 0x10000UL, sizeof(struct schizo_regs), 0, &sc->sc_ctrlh)) {