Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/arch/evbmips/loongson/dev pcibrescan(): config_...



details:   https://anonhg.NetBSD.org/src/rev/6a59635cc1e9
branches:  thorpej-cfargs
changeset: 1019722:6a59635cc1e9
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 26 02:04:02 2021 +0000

description:
pcibrescan(): config_found_ia() -> config_found().  Add a comment why we
are explicit about the interface attribute even though "pcib" itself only
carries one.

diffstat:

 sys/arch/evbmips/loongson/dev/pcib.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r bf5f6fa7c81e -r 6a59635cc1e9 sys/arch/evbmips/loongson/dev/pcib.c
--- a/sys/arch/evbmips/loongson/dev/pcib.c      Fri Mar 26 02:02:53 2021 +0000
+++ b/sys/arch/evbmips/loongson/dev/pcib.c      Fri Mar 26 02:04:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $  */
+/*     $NetBSD: pcib.c,v 1.2.16.1 2021/03/26 02:04:02 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2.16.1 2021/03/26 02:04:02 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -148,6 +148,10 @@
        struct pcib_softc *sc = device_private(self);
        struct isabus_attach_args iba;
 
+       /*
+        * pcib only carries "isabus", but this can also be used
+        * by other drivers that carry additional interface attributes.
+        */
        if (ifattr_match(ifattr, "isabus") && sc->sc_isabus == NULL) {
                /*
                 * Attach the ISA bus behind this bridge.
@@ -162,7 +166,9 @@
 
                if (iba.iba_ic != NULL) 
                        sc->sc_isabus =
-                           config_found_ia(self, "isabus", &iba, isabusprint);
+                           config_found(self, &iba, isabusprint,
+                                        CFARG_IATTR, "isabus",
+                                        CFARG_EOL);
        }
        return 0;
 }



Home | Main Index | Thread Index | Old Index