diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-07-14 20:27:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-07-14 20:27:38 +0000 |
commit | d1092316eb307ee35f180ddb8b03d3eb1e2be5af (patch) | |
tree | e07a71e1fe8f175f4e0b4549ff12971924e8ba2a | |
parent | 25b6d4816538fab7a162fadc84b1161a3ac95b2b (diff) |
on a SparcStation Voyager, the 2nd zs device does not exist.
-rw-r--r-- | sys/arch/sparc/dev/zs.c | 10 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 16 |
2 files changed, 15 insertions, 11 deletions
diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c index 716897bc326..697fdf45305 100644 --- a/sys/arch/sparc/dev/zs.c +++ b/sys/arch/sparc/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.25 2000/07/11 15:00:12 deraadt Exp $ */ +/* $OpenBSD: zs.c,v 1.26 2000/07/14 20:27:37 deraadt Exp $ */ /* $NetBSD: zs.c,v 1.49 1997/08/31 21:26:37 pk Exp $ */ /* @@ -252,8 +252,12 @@ zsmatch(parent, vcf, aux) if (strcmp(cf->cf_driver->cd_name, ra->ra_name)) return (0); if ((ca->ca_bustype == BUS_MAIN && !CPU_ISSUN4) || - (ca->ca_bustype == BUS_OBIO && CPU_ISSUN4M)) - return (getpropint(ra->ra_node, "slave", -2) == cf->cf_unit); + (ca->ca_bustype == BUS_OBIO && CPU_ISSUN4M)) { + if (getpropint(ra->ra_node, "slave", -2) == cf->cf_unit && + findzs(cf->cf_unit)) + return (1); + return (0); + } ra->ra_len = NBPG; return (probeget(ra->ra_vaddr, 1) != -1); } diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 1a6a0c4b740..3a9cc3bfcce 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.34 2000/02/22 19:27:59 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.35 2000/07/14 20:27:32 deraadt Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -1305,23 +1305,23 @@ findzs(zs) #if defined(SUN4C) || defined(SUN4M) if (CPU_ISSUN4COR4M) { - register int node, addr; + register int node; node = firstchild(findroot()); if (CPU_ISSUN4M) { /* zs is in "obio" tree on Sun4M */ node = findnode(node, "obio"); if (!node) - panic("findzs: no obio node"); + panic("findzs: no obio node"); node = firstchild(node); } + printf("[zs%d]", zs); while ((node = findnode(node, "zs")) != 0) { - if (getpropint(node, "slave", -1) == zs) { - if ((addr = getpropint(node, "address", 0)) == 0) - panic("findzs: zs%d not mapped by PROM", zs); - return ((void *)addr); - } + if (getpropint(node, "slave", -1) == zs) + return ((void *)getpropint(node, "address", 0)); node = nextsibling(node); } + printf("huh"); + return (NULL); } #endif panic("findzs: cannot find zs%d", zs); |