diff --git a/sys/arch/sparc/dev/sbus.c b/sys/arch/sparc/dev/sbus.c index 0a637136dee2..f40247d5bdeb 100644 --- a/sys/arch/sparc/dev/sbus.c +++ b/sys/arch/sparc/dev/sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbus.c,v 1.62 2004/07/05 08:51:19 pk Exp $ */ +/* $NetBSD: sbus.c,v 1.63 2004/12/13 02:39:07 chs Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.62 2004/07/05 08:51:19 pk Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.63 2004/12/13 02:39:07 chs Exp $"); #include #include @@ -134,6 +134,8 @@ CFATTACH_DECL(sbus_xbox, sizeof(struct sbus_softc), extern struct cfdriver sbus_cd; +static int sbus_mainbus_attached; + /* The "primary" Sbus */ struct sbus_softc *sbus_sc; @@ -213,7 +215,7 @@ sbus_match_mainbus(parent, cf, aux) { struct mainbus_attach_args *ma = aux; - if (CPU_ISSUN4) + if (CPU_ISSUN4 || sbus_mainbus_attached) return (0); return (strcmp(cf->cf_name, ma->ma_name) == 0); @@ -260,14 +262,7 @@ sbus_attach_mainbus(parent, self, aux) struct mainbus_attach_args *ma = aux; int node = ma->ma_node; - /* - * XXX there is only one Sbus, for now -- do not know how to - * address children on others - */ - if (sc->sc_dev.dv_unit > 0) { - printf(" unsupported\n"); - return; - } + sbus_mainbus_attached = 1; sc->sc_bustag = ma->ma_bustag; sc->sc_dmatag = ma->ma_dmatag;