Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev ensure an ebus really does exist in ebu...



details:   https://anonhg.NetBSD.org/src/rev/a00acdcd1642
branches:  trunk
changeset: 487471:a00acdcd1642
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jun 08 06:52:25 2000 +0000

description:
ensure an ebus really does exist in ebus_match; fixes spurious attachments with the ebus on a hme pci card.

diffstat:

 sys/arch/sparc64/dev/ebus.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 2396feeb9bc4 -r a00acdcd1642 sys/arch/sparc64/dev/ebus.c
--- a/sys/arch/sparc64/dev/ebus.c       Thu Jun 08 06:50:46 2000 +0000
+++ b/sys/arch/sparc64/dev/ebus.c       Thu Jun 08 06:52:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ebus.c,v 1.9 2000/05/17 09:25:27 mrg Exp $     */
+/*     $NetBSD: ebus.c,v 1.10 2000/06/08 06:52:25 mrg Exp $    */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -95,7 +95,7 @@
 void   ebus_destroy_attach_args __P((struct ebus_attach_args *));
 int    ebus_print __P((void *, const char *));
 void   ebus_find_ino __P((struct ebus_softc *, struct ebus_attach_args *));
-int    ebus_find_node __P((struct ebus_softc *, struct pci_attach_args *));
+int    ebus_find_node __P((struct pci_attach_args *));
 
 /*
  * here are our bus space and bus dma routines.
@@ -130,7 +130,8 @@
 
        if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE &&
            PCI_VENDOR(pa->pa_id) == PCI_VENDOR_SUN && 
-           PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_EBUS)
+           PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_EBUS &&
+           ebus_find_node(pa))
                return (1);
 
        return (0);
@@ -163,7 +164,7 @@
        sc->sc_childbustag = ebus_alloc_bus_tag(sc, PCI_MEMORY_BUS_SPACE);
        sc->sc_dmatag = ebus_alloc_dma_tag(sc, pa->pa_dmat);
 
-       node = ebus_find_node(sc, pa);
+       node = ebus_find_node(pa);
        if (node == 0)
                panic("could not find ebus node");
 
@@ -336,8 +337,7 @@
  * see the simba driver.
  */
 int
-ebus_find_node(sc, pa)
-       struct ebus_softc *sc;
+ebus_find_node(pa)
        struct pci_attach_args *pa;
 {
        int node = pa->pa_pc->node;



Home | Main Index | Thread Index | Old Index