diff options
| author | thorpej <thorpej@NetBSD.org> | 2021-04-24 23:36:23 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2021-04-24 23:36:23 +0000 |
| commit | 3bee0c110b9ff2a9a0e2833be339e1c873af3a44 (patch) | |
| tree | 82c9f34b9867882723e76eff95e5d7ca6cab69bf /sys/dev | |
| parent | e77b3a7c4b6598de68d8b78f86e7851410840595 (diff) | |
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.
Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)
Remove unnecessary or redundant interface attributes where they're not
needed.
There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
Diffstat (limited to 'sys/dev')
359 files changed, 1720 insertions, 1402 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 18ab6f044dd..e22ae4d4cd3 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.290 2021/02/05 17:13:40 thorpej Exp $ */ +/* $NetBSD: acpi.c,v 1.291 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.290 2021/02/05 17:13:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.291 2021/04/24 23:36:52 thorpej Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -360,7 +360,10 @@ acpi_disable(void) int acpi_check(device_t parent, const char *ifattr) { - return (config_search_ia(acpi_submatch, parent, ifattr, NULL) != NULL); + return config_search(parent, NULL, + CFARG_SUBMATCH, acpi_submatch, + CFARG_IATTR, ifattr, + CFARG_EOL) != NULL; } int @@ -488,7 +491,9 @@ acpi_attach(device_t parent, device_t self, void *aux) /* * Early initialization of acpiec(4) via ECDT. */ - (void)config_found_ia(self, "acpiecdtbus", aa, NULL); + config_found(self, aa, NULL, + CFARG_IATTR, "acpiecdtbus", + CFARG_EOL); rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); @@ -552,7 +557,9 @@ acpi_attach(device_t parent, device_t self, void *aux) if (ACPI_FAILURE(rv)) { continue; } - config_found_ia(sc->sc_dev, "acpisdtbus", hdr, NULL); + config_found(sc->sc_dev, hdr, NULL, + CFARG_IATTR, "acpisdtbus", + CFARG_EOL); AcpiPutTable(hdr); } @@ -889,9 +896,11 @@ acpi_rescan(device_t self, const char *ifattr, const int *locators) */ aa.aa_memt = sc->sc_memt; - if (ifattr_match(ifattr, "acpihpetbus") && sc->sc_hpet == NULL) - sc->sc_hpet = config_found_ia(sc->sc_dev, - "acpihpetbus", &aa, NULL); + if (ifattr_match(ifattr, "acpihpetbus") && sc->sc_hpet == NULL) { + sc->sc_hpet = config_found(sc->sc_dev, &aa, NULL, + CFARG_IATTR, "acpihpetbus", + CFARG_EOL); + } /* * A two-pass scan for acpinodebus. @@ -904,13 +913,17 @@ acpi_rescan(device_t self, const char *ifattr, const int *locators) /* * Attach APM emulation and acpiwdrt(4). */ - if (ifattr_match(ifattr, "acpiapmbus") && sc->sc_apmbus == NULL) - sc->sc_apmbus = config_found_ia(sc->sc_dev, - "acpiapmbus", NULL, NULL); + if (ifattr_match(ifattr, "acpiapmbus") && sc->sc_apmbus == NULL) { + sc->sc_apmbus = config_found(sc->sc_dev, NULL, NULL, + CFARG_IATTR, "acpiapmbus", + CFARG_EOL); + } - if (ifattr_match(ifattr, "acpiwdrtbus") && sc->sc_wdrt == NULL) - sc->sc_wdrt = config_found_ia(sc->sc_dev, - "acpiwdrtbus", NULL, NULL); + if (ifattr_match(ifattr, "acpiwdrtbus") && sc->sc_wdrt == NULL) { + sc->sc_wdrt = config_found(sc->sc_dev, NULL, NULL, + CFARG_IATTR, "acpiwdrtbus", + CFARG_EOL); + } return 0; } @@ -938,6 +951,8 @@ acpi_rescan_early(struct acpi_softc *sc) if (acpi_match_hid(ad->ad_devinfo, acpi_early_ids) == 0) continue; + KASSERT(ad->ad_handle != NULL); + aa.aa_node = ad; aa.aa_iot = sc->sc_iot; aa.aa_memt = sc->sc_memt; @@ -949,8 +964,10 @@ acpi_rescan_early(struct acpi_softc *sc) aa.aa_dmat = ad->ad_dmat; aa.aa_dmat64 = ad->ad_dmat64; - ad->ad_device = config_found_ia(sc->sc_dev, - "acpinodebus", &aa, acpi_print); + ad->ad_device = config_found(sc->sc_dev, &aa, acpi_print, + CFARG_IATTR, "acpinodebus", + CFARG_DEVHANDLE, devhandle_from_acpi(ad->ad_handle), + CFARG_EOL); } } @@ -1002,6 +1019,8 @@ acpi_rescan_nodes(struct acpi_softc *sc) if (acpi_match_hid(di, hpet_ids) != 0 && sc->sc_hpet != NULL) continue; + KASSERT(ad->ad_handle != NULL); + aa.aa_node = ad; aa.aa_iot = sc->sc_iot; aa.aa_memt = sc->sc_memt; @@ -1013,8 +1032,10 @@ acpi_rescan_nodes(struct acpi_softc *sc) aa.aa_dmat = ad->ad_dmat; aa.aa_dmat64 = ad->ad_dmat64; - ad->ad_device = config_found_ia(sc->sc_dev, - "acpinodebus", &aa, acpi_print); + ad->ad_device = config_found(sc->sc_dev, &aa, acpi_print, + CFARG_IATTR, "acpinodebus", + CFARG_DEVHANDLE, devhandle_from_acpi(ad->ad_handle), + CFARG_EOL); } } @@ -1136,14 +1157,7 @@ acpi_device_register(device_t dev, void *v) device_t parent = device_parent(dev); ACPI_HANDLE hdl = NULL; - /* - * aa_node is only valid if we attached to the "acpinodebus" - * interface attribute. - */ - if (device_attached_to_iattr(dev, "acpinodebus")) { - const struct acpi_attach_args *aa = v; - hdl = aa->aa_node->ad_handle; - } else if (device_is_a(parent, "pci")) { + if (device_is_a(parent, "pci")) { const struct pci_attach_args *pa = v; struct acpi_devnode *ad; u_int segment; diff --git a/sys/dev/acpi/acpi_display.c b/sys/dev/acpi/acpi_display.c index 4ef8884005a..478baac1736 100644 --- a/sys/dev/acpi/acpi_display.c +++ b/sys/dev/acpi/acpi_display.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_display.c,v 1.18 2020/06/30 13:14:21 sborrill Exp $ */ +/* $NetBSD: acpi_display.c,v 1.19 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.18 2020/06/30 13:14:21 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.19 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -572,8 +572,8 @@ acpidisp_vga_scan_outdevs(struct acpidisp_vga_softc *asc) aa.aa_node = ad; aa.aa_mtx = &asc->sc_mtx; - ad->ad_device = config_found_ia(asc->sc_dev, - "acpivga", &aa, acpidisp_acpivga_print); + ad->ad_device = config_found(asc->sc_dev, + &aa, acpidisp_acpivga_print, CFARG_EOL); } } diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c index 2d50ecbd68f..7672628c5a3 100644 --- a/sys/dev/acpi/dwiic_acpi.c +++ b/sys/dev/acpi/dwiic_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: dwiic_acpi.c,v 1.7 2021/02/04 23:59:46 thorpej Exp $ */ +/* $NetBSD: dwiic_acpi.c,v 1.8 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwiic_acpi.c,v 1.7 2021/02/04 23:59:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwiic_acpi.c,v 1.8 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -129,7 +129,7 @@ dwiic_acpi_attach(device_t parent, device_t self, void *aux) dwiic_attach(sc); - config_found_ia(self, "i2cbus", &sc->sc_iba, iicbus_print); + config_found(self, &sc->sc_iba, iicbus_print, CFARG_EOL); pmf_device_register(self, dwiic_suspend, dwiic_resume); diff --git a/sys/dev/acpi/ehci_acpi.c b/sys/dev/acpi/ehci_acpi.c index 9102a88614a..94ee7a5da0a 100644 --- a/sys/dev/acpi/ehci_acpi.c +++ b/sys/dev/acpi/ehci_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_acpi.c,v 1.5 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: ehci_acpi.c,v 1.6 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_acpi.c,v 1.5 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_acpi.c,v 1.6 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -146,7 +146,7 @@ ehci_acpi_attach(device_t parent, device_t self, void *aux) return; } - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); done: acpi_resource_cleanup(&res); diff --git a/sys/dev/acpi/ipmi_acpi.c b/sys/dev/acpi/ipmi_acpi.c index bd56ad1887c..e7e380fa0d6 100644 --- a/sys/dev/acpi/ipmi_acpi.c +++ b/sys/dev/acpi/ipmi_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi_acpi.c,v 1.4 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: ipmi_acpi.c,v 1.5 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipmi_acpi.c,v 1.4 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi_acpi.c,v 1.5 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -156,7 +156,7 @@ ipmi_acpi_attach(device_t parent, device_t self, void *opaque) if (reg2 > ia->iaa_if_iobase) ia->iaa_if_iospacing = reg2 - ia->iaa_if_iobase; - config_found_ia(self, "ipmibus", ia, 0); + config_found(self, ia, NULL, CFARG_EOL); break; case IPMI_IF_SSIF: diff --git a/sys/dev/acpi/smbus_acpi.c b/sys/dev/acpi/smbus_acpi.c index 34a921fb2e8..c9e2d527637 100644 --- a/sys/dev/acpi/smbus_acpi.c +++ b/sys/dev/acpi/smbus_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: smbus_acpi.c,v 1.15 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: smbus_acpi.c,v 1.16 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.15 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.16 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -173,7 +173,7 @@ acpi_smbus_attach(device_t parent, device_t self, void *aux) iba.iba_tag = &sc->sc_i2c_tag; - (void)config_found_ia(self, "i2cbus", &iba, iicbus_print); + config_found(self, &iba, iicbus_print, CFARG_EOL); } static int diff --git a/sys/dev/acpi/virtio_acpi.c b/sys/dev/acpi/virtio_acpi.c index 53112e37da3..6df1ae69eb3 100644 --- a/sys/dev/acpi/virtio_acpi.c +++ b/sys/dev/acpi/virtio_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_acpi.c,v 1.7 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: virtio_acpi.c,v 1.8 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.7 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.8 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -160,7 +160,7 @@ virtio_acpi_rescan(device_t self, const char *ifattr, const int *locs) memset(&va, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, ifattr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(vsc)) return 0; diff --git a/sys/dev/acpi/wmi/wmi_acpi.c b/sys/dev/acpi/wmi/wmi_acpi.c index 90a0d31b8ea..7fc38c75829 100644 --- a/sys/dev/acpi/wmi/wmi_acpi.c +++ b/sys/dev/acpi/wmi/wmi_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_acpi.c,v 1.17 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: wmi_acpi.c,v 1.18 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen@iki.fi> @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.17 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.18 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -149,9 +149,10 @@ acpi_wmi_rescan(device_t self, const char *ifattr, const int *locators) { struct acpi_wmi_softc *sc = device_private(self); - if (ifattr_match(ifattr, "acpiwmibus") && sc->sc_child == NULL) - sc->sc_child = config_found_ia(self, "acpiwmibus", - NULL, acpi_wmi_print); + if (sc->sc_child == NULL) { + sc->sc_child = + config_found(self, NULL, acpi_wmi_print, CFARG_EOL); + } return 0; } diff --git a/sys/dev/acpi/wss_acpi.c b/sys/dev/acpi/wss_acpi.c index 55caf5caee8..47b5c5ecbbf 100644 --- a/sys/dev/acpi/wss_acpi.c +++ b/sys/dev/acpi/wss_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: wss_acpi.c,v 1.33 2020/05/04 20:06:38 jdolecek Exp $ */ +/* $NetBSD: wss_acpi.c,v 1.34 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca> @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.33 2020/05/04 20:06:38 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.34 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -187,7 +187,7 @@ wss_acpi_attach(device_t parent, device_t self, void *aux) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - config_found(self, &arg, audioprint); + config_found(self, &arg, audioprint, CFARG_EOL); out: acpi_resource_cleanup(&res); diff --git a/sys/dev/acpi/xhci_acpi.c b/sys/dev/acpi/xhci_acpi.c index a35295357b9..a4879a7041b 100644 --- a/sys/dev/acpi/xhci_acpi.c +++ b/sys/dev/acpi/xhci_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: xhci_acpi.c,v 1.11 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: xhci_acpi.c,v 1.12 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.11 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.12 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -160,8 +160,9 @@ xhci_acpi_attach(device_t parent, device_t self, void *aux) return; } - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); - sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); + sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint, + CFARG_EOL); done: acpi_resource_cleanup(&res); diff --git a/sys/dev/adb/adb_bus.c b/sys/dev/adb/adb_bus.c index 374601b158e..8888ca595b6 100644 --- a/sys/dev/adb/adb_bus.c +++ b/sys/dev/adb/adb_bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_bus.c,v 1.10 2014/11/08 17:21:51 macallan Exp $ */ +/* $NetBSD: adb_bus.c,v 1.11 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_bus.c,v 1.10 2014/11/08 17:21:51 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_bus.c,v 1.11 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -168,7 +168,8 @@ nadb_init(device_t dev) sc->sc_devtable[i].original_addr, sc->sc_devtable[i].handler_id); aaa.dev = &sc->sc_devtable[i]; - if (config_found(sc->sc_dev, &aaa, nadb_devprint)) { + if (config_found(sc->sc_dev, &aaa, nadb_devprint, + CFARG_EOL)) { devmask |= (1 << i); } else { aprint_normal(" not configured\n"); diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index 71ebd51fe09..74264ee47ff 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_kbd.c,v 1.30 2020/08/31 17:54:18 macallan Exp $ */ +/* $NetBSD: adb_kbd.c,v 1.31 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.30 2020/08/31 17:54:18 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.31 2021/04/24 23:36:52 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -383,7 +383,9 @@ adbkbd_attach(device_t parent, device_t self, void *aux) a.accessops = &adbkbd_accessops; a.accesscookie = sc; - sc->sc_wskbddev = config_found_ia(self, "wskbddev", &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, + CFARG_IATTR, "wskbddev", + CFARG_EOL); #ifdef ADBKBD_EMUL_USB sc->sc_emul_usb = TRUE; wskbd_set_evtrans(sc->sc_wskbddev, adb_to_usb, 128); @@ -393,8 +395,9 @@ adbkbd_attach(device_t parent, device_t self, void *aux) /* attach the mouse device */ am.accessops = &adbkms_accessops; am.accesscookie = sc; - sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &am, - wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &am, wsmousedevprint, + CFARG_IATTR, "wsmousedev", + CFARG_EOL); #endif adbkbd_setup_sysctl(sc); diff --git a/sys/dev/adb/adb_ktm.c b/sys/dev/adb/adb_ktm.c index 8465c0f202c..4fe525e143b 100644 --- a/sys/dev/adb/adb_ktm.c +++ b/sys/dev/adb/adb_ktm.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_ktm.c,v 1.2 2019/09/15 16:16:36 macallan Exp $ */ +/* $NetBSD: adb_ktm.c,v 1.3 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2019 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_ktm.c,v 1.2 2019/09/15 16:16:36 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_ktm.c,v 1.3 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -136,7 +136,7 @@ ktm_attach(device_t parent, device_t self, void *aux) a.accessops = &ktm_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); } static int diff --git a/sys/dev/adb/adb_ms.c b/sys/dev/adb/adb_ms.c index 963070d04d7..81b357e24e8 100644 --- a/sys/dev/adb/adb_ms.c +++ b/sys/dev/adb/adb_ms.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_ms.c,v 1.19 2019/09/05 21:29:22 macallan Exp $ */ +/* $NetBSD: adb_ms.c,v 1.20 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.19 2019/09/05 21:29:22 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.20 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -247,7 +247,7 @@ adbms_attach(device_t parent, device_t self, void *aux) a.accessops = &adbms_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); } diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 847e1ab620f..bcde797d3d2 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.160 2020/10/03 22:32:50 riastradh Exp $ */ +/* $NetBSD: ata.c,v 1.161 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.160 2020/10/03 22:32:50 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.161 2021/04/24 23:36:52 thorpej Exp $"); #include "opt_ata.h" @@ -205,8 +205,9 @@ ata_channel_attach(struct ata_channel *chp) KASSERT(chp->ch_queue != NULL); - chp->atabus = config_found_ia(chp->ch_atac->atac_dev, "ata", chp, - atabusprint); + chp->atabus = config_found(chp->ch_atac->atac_dev, chp, atabusprint, + CFARG_IATTR, "ata", + CFARG_EOL); } /* @@ -372,8 +373,10 @@ atabusconfig_thread(void *arg) adev.adev_bustype = atac->atac_bustype_ata; adev.adev_channel = chp->ch_channel; adev.adev_drv_data = &chp->ch_drive[i]; - chp->ch_drive[i].drv_softc = config_found_ia(atabus_sc->sc_dev, - "ata_hl", &adev, ataprint); + chp->ch_drive[i].drv_softc = config_found(atabus_sc->sc_dev, + &adev, ataprint, + CFARG_IATTR, "ata_hl", + CFARG_EOL); if (chp->ch_drive[i].drv_softc != NULL) { ata_probe_caps(&chp->ch_drive[i]); } else { diff --git a/sys/dev/ata/ata_raid.c b/sys/dev/ata/ata_raid.c index 0da644648f8..0ef2e1be730 100644 --- a/sys/dev/ata/ata_raid.c +++ b/sys/dev/ata/ata_raid.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.43 2020/08/25 13:42:09 skrll Exp $ */ +/* $NetBSD: ata_raid.c,v 1.44 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43 2020/08/25 13:42:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.44 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -114,7 +114,7 @@ ataraidattach(int count) /* ARGSUSED */ static int -ataraid_rescan(device_t self, const char *attr, const int *flags) +ataraid_rescan(device_t self, const char *ifattr, const int *locs) { finalize_done = 0; @@ -215,8 +215,10 @@ ataraid_attach(device_t parent, device_t self, void *aux) locs[ATARAIDCF_VENDTYPE] = aai->aai_type; locs[ATARAIDCF_UNIT] = aai->aai_arrayno; - config_found_sm_loc(self, "ataraid", locs, aai, - ataraid_print, config_stdsubmatch); + config_found(self, aai, ataraid_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } diff --git a/sys/dev/audio/audio.c b/sys/dev/audio/audio.c index a3f2422dd5e..b9dfe62ebca 100644 --- a/sys/dev/audio/audio.c +++ b/sys/dev/audio/audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.91 2021/02/14 03:41:13 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.92 2021/04/24 23:36:52 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91 2021/02/14 03:41:13 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.92 2021/04/24 23:36:52 thorpej Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -1111,7 +1111,7 @@ audioattach(device_t parent, device_t self, void *aux) audio_mlog_init(); #endif - audiorescan(self, "audio", NULL); + audiorescan(self, NULL, NULL); sc->sc_exlock = 0; return; @@ -1403,21 +1403,21 @@ static int audiosearch(device_t parent, cfdata_t cf, const int *locs, void *aux) { - if (config_match(parent, cf, aux)) - config_attach_loc(parent, cf, locs, aux, NULL); + if (config_probe(parent, cf, aux)) + config_attach(parent, cf, aux, NULL, + CFARG_EOL); return 0; } static int -audiorescan(device_t self, const char *ifattr, const int *flags) +audiorescan(device_t self, const char *ifattr, const int *locators) { struct audio_softc *sc = device_private(self); - if (!ifattr_match(ifattr, "audio")) - return 0; - - config_search_loc(audiosearch, sc->sc_dev, "audio", NULL, NULL); + config_search(sc->sc_dev, NULL, + CFARG_SEARCH, audiosearch, + CFARG_EOL); return 0; } @@ -1440,7 +1440,7 @@ audio_attach_mi(const struct audio_hw_if *ahwp, void *hdlp, device_t dev) arg.type = AUDIODEV_TYPE_AUDIO; arg.hwif = ahwp; arg.hdl = hdlp; - return config_found(dev, &arg, audioprint); + return config_found(dev, &arg, audioprint, CFARG_EOL); } /* diff --git a/sys/dev/bi/bi.c b/sys/dev/bi/bi.c index 241e7bac106..c87e866bf55 100644 --- a/sys/dev/bi/bi.c +++ b/sys/dev/bi/bi.c @@ -1,4 +1,4 @@ -/* $NetBSD: bi.c,v 1.25 2010/12/15 00:08:43 matt Exp $ */ +/* $NetBSD: bi.c,v 1.26 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bi.c,v 1.25 2010/12/15 00:08:43 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bi.c,v 1.26 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -142,6 +142,6 @@ bi_attach(struct bi_softc *sc) } ba.ba_nodenr = nodenr; ba.ba_ivec = sc->sc_lastiv + 64 + 4 * nodenr; /* all on spl5 */ - config_found(sc->sc_dev, &ba, bi_print); + config_found(sc->sc_dev, &ba, bi_print, CFARG_EOL); } } diff --git a/sys/dev/bi/kdb.c b/sys/dev/bi/kdb.c index b38ba9341ca..c52b4451753 100644 --- a/sys/dev/bi/kdb.c +++ b/sys/dev/bi/kdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: kdb.c,v 1.47 2010/01/16 18:43:34 dyoung Exp $ */ +/* $NetBSD: kdb.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.47 2010/01/16 18:43:34 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -210,7 +210,7 @@ err2: bus_dmamem_unmap(sc->sc_dmat, sc->sc_kdb, KDB_WL(BIREG_BCICSR, KDB_RL(BIREG_BCICSR) | BCI_STOPEN | BCI_IDENTEN | BCI_UINTEN | BCI_INTEN); KDB_WL(BIREG_UINTRCSR, ba->ba_ivec); - config_found(sc->sc_dev, &ma, kdbprint); + config_found(sc->sc_dev, &ma, kdbprint, CFARG_EOL); } void diff --git a/sys/dev/bluetooth/bthidev.c b/sys/dev/bluetooth/bthidev.c index f2828542880..64ed1d06145 100644 --- a/sys/dev/bluetooth/bthidev.c +++ b/sys/dev/bluetooth/bthidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.32 2020/06/11 02:39:31 thorpej Exp $ */ +/* $NetBSD: bthidev.c,v 1.33 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.32 2020/06/11 02:39:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.33 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -319,8 +319,11 @@ bthidev_attach(device_t parent, device_t self, void *aux) locs[BTHIDBUSCF_REPORTID] = rep; - dev = config_found_sm_loc(self, "bthidbus", - locs, &bha, bthidev_print, config_stdsubmatch); + dev = config_found(self, &bha, bthidev_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "bthidbus", + CFARG_LOCATORS, locs, + CFARG_EOL); if (dev != NULL) { hidev = device_private(dev); hidev->sc_dev = dev; diff --git a/sys/dev/bluetooth/bthub.c b/sys/dev/bluetooth/bthub.c index 1d27bfe25a9..3938186b6f2 100644 --- a/sys/dev/bluetooth/bthub.c +++ b/sys/dev/bluetooth/bthub.c @@ -1,4 +1,4 @@ -/* $NetBSD: bthub.c,v 1.24 2020/06/11 02:39:31 thorpej Exp $ */ +/* $NetBSD: bthub.c,v 1.25 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.24 2020/06/11 02:39:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.25 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -238,7 +238,7 @@ bthub_pioctl(dev_t devno, unsigned long cmd, prop_dictionary_t dict, if (dev != NULL) return EADDRINUSE; - dev = config_found(self, dict, bthub_print); + dev = config_found(self, dict, bthub_print, CFARG_EOL); if (dev == NULL) return ENXIO; diff --git a/sys/dev/bluetooth/btkbd.c b/sys/dev/bluetooth/btkbd.c index ed929f1ad65..2f1b1590492 100644 --- a/sys/dev/bluetooth/btkbd.c +++ b/sys/dev/bluetooth/btkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: btkbd.c,v 1.19 2020/03/14 04:49:33 maxv Exp $ */ +/* $NetBSD: btkbd.c,v 1.20 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.19 2020/03/14 04:49:33 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.20 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/callout.h> @@ -236,7 +236,7 @@ btkbd_attach(device_t parent, device_t self, void *aux) wska.accessops = &btkbd_accessops; wska.accesscookie = sc; - sc->sc_wskbd = config_found(self, &wska, wskbddevprint); + sc->sc_wskbd = config_found(self, &wska, wskbddevprint, CFARG_EOL); pmf_device_register(self, NULL, NULL); } diff --git a/sys/dev/bluetooth/btmagic.c b/sys/dev/bluetooth/btmagic.c index 678a0dc521b..f1f58a9b104 100644 --- a/sys/dev/bluetooth/btmagic.c +++ b/sys/dev/bluetooth/btmagic.c @@ -1,4 +1,4 @@ -/* $NetBSD: btmagic.c,v 1.19 2020/06/11 02:39:31 thorpej Exp $ */ +/* $NetBSD: btmagic.c,v 1.20 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.19 2020/06/11 02:39:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.20 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -406,7 +406,7 @@ btmagic_attach(device_t parent, device_t self, void *aux) */ wsma.accessops = &btmagic_wsmouse_accessops; wsma.accesscookie = self; - sc->sc_wsmouse = config_found(self, &wsma, wsmousedevprint); + sc->sc_wsmouse = config_found(self, &wsma, wsmousedevprint, CFARG_EOL); if (sc->sc_wsmouse == NULL) { aprint_error_dev(self, "failed to attach wsmouse\n"); return; diff --git a/sys/dev/bluetooth/btms.c b/sys/dev/bluetooth/btms.c index b19d481938a..e702e623530 100644 --- a/sys/dev/bluetooth/btms.c +++ b/sys/dev/bluetooth/btms.c @@ -1,4 +1,4 @@ -/* $NetBSD: btms.c,v 1.13 2017/12/10 17:03:07 bouyer Exp $ */ +/* $NetBSD: btms.c,v 1.14 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btms.c,v 1.13 2017/12/10 17:03:07 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btms.c,v 1.14 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -327,7 +327,7 @@ btms_attach(device_t parent, device_t self, void *aux) wsma.accessops = &btms_wsmouse_accessops; wsma.accesscookie = sc; - sc->sc_wsmouse = config_found(self, &wsma, wsmousedevprint); + sc->sc_wsmouse = config_found(self, &wsma, wsmousedevprint, CFARG_EOL); pmf_device_register(self, NULL, NULL); } diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index d8612f99a90..4f6b73bf02f 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cardbus.c,v 1.110 2020/06/12 15:34:20 thorpej Exp $ */ +/* $NetBSD: cardbus.c,v 1.111 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999 and 2000 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.110 2020/06/12 15:34:20 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.111 2021/04/24 23:36:53 thorpej Exp $"); #include "opt_cardbus.h" @@ -604,8 +604,10 @@ cardbus_rescan(device_t self, const char *ifattr, locs[CARDBUSCF_FUNCTION] = function; - if ((csc = config_found_sm_loc(sc->sc_dev, "cardbus", locs, - &ca, cardbusprint, config_stdsubmatch)) == NULL) { + if ((csc = config_found(sc->sc_dev, &ca, cardbusprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL)) == NULL) { /* do not match */ disable_function(sc, function); sc->sc_funcs[function] = NULL; diff --git a/sys/dev/cardbus/cardslot.c b/sys/dev/cardbus/cardslot.c index b8ef8919135..77bf50bd0b7 100644 --- a/sys/dev/cardbus/cardslot.c +++ b/sys/dev/cardbus/cardslot.c @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.58 2021/04/17 01:19:48 mrg Exp $ */ +/* $NetBSD: cardslot.c,v 1.59 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.58 2021/04/17 01:19:48 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.59 2021/04/24 23:36:53 thorpej Exp $"); #include "opt_cardslot.h" @@ -137,8 +137,9 @@ cardslotattach(device_t parent, device_t self, void *aux) DPRINTF(("%s attaching CardBus bus...\n", device_xname(self))); if (cba != NULL) { - csc = device_private(config_found_ia(self, "cbbus", cba, - cardslot_cb_print)); + csc = device_private(config_found(self, cba, cardslot_cb_print, + CFARG_IATTR, "cbbus", + CFARG_EOL)); if (csc) { /* cardbus found */ DPRINTF(("%s: found cardbus on %s\n", __func__, @@ -148,9 +149,10 @@ cardslotattach(device_t parent, device_t self, void *aux) } if (pa != NULL) { - sc->sc_16_softc = config_found_sm_loc(self, "pcmciabus", NULL, - pa, cardslot_16_print, - cardslot_16_submatch); + sc->sc_16_softc = config_found(self, pa, cardslot_16_print, + CFARG_SUBMATCH, cardslot_16_submatch, + CFARG_IATTR, "pcmciabus", + CFARG_EOL); if (sc->sc_16_softc) { /* pcmcia 16-bit bus found */ DPRINTF(("%s: found 16-bit pcmcia bus\n", __func__)); diff --git a/sys/dev/cardbus/ehci_cardbus.c b/sys/dev/cardbus/ehci_cardbus.c index 6e9923cdc48..3a82c0d3d2b 100644 --- a/sys/dev/cardbus/ehci_cardbus.c +++ b/sys/dev/cardbus/ehci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_cardbus.c,v 1.35 2018/04/09 16:21:10 jakllsch Exp $ */ +/* $NetBSD: ehci_cardbus.c,v 1.36 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.35 2018/04/09 16:21:10 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.36 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -202,7 +202,8 @@ ehci_cardbus_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); } int diff --git a/sys/dev/cardbus/ohci_cardbus.c b/sys/dev/cardbus/ohci_cardbus.c index 274005843c5..8bd1efe6b8f 100644 --- a/sys/dev/cardbus/ohci_cardbus.c +++ b/sys/dev/cardbus/ohci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci_cardbus.c,v 1.44 2018/04/09 16:21:10 jakllsch Exp $ */ +/* $NetBSD: ohci_cardbus.c,v 1.45 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.44 2018/04/09 16:21:10 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.45 2021/04/24 23:36:53 thorpej Exp $"); #include "ehci_cardbus.h" @@ -166,7 +166,8 @@ ohci_cardbus_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); } int diff --git a/sys/dev/cardbus/rbus_ppb.c b/sys/dev/cardbus/rbus_ppb.c index f1bba3473c7..4404aebed03 100644 --- a/sys/dev/cardbus/rbus_ppb.c +++ b/sys/dev/cardbus/rbus_ppb.c @@ -1,4 +1,4 @@ -/* $NetBSD: rbus_ppb.c,v 1.47 2019/03/05 08:16:53 msaitoh Exp $ */ +/* $NetBSD: rbus_ppb.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.47 2019/03/05 08:16:53 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -695,7 +695,7 @@ ppb_cardbus_attach(device_t parent, device_t self, void *aux) /*pba.pba_intrswiz = parent_sc->sc_intrswiz; */ pba.pba_intrtag = psc->sc_pa.pa_intrtag; - config_found_ia(self, "pcibus", &pba, rppbprint); + config_found(self, &pba, rppbprint, CFARG_EOL); } int diff --git a/sys/dev/cardbus/uhci_cardbus.c b/sys/dev/cardbus/uhci_cardbus.c index fe6481a1560..43781404125 100644 --- a/sys/dev/cardbus/uhci_cardbus.c +++ b/sys/dev/cardbus/uhci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci_cardbus.c,v 1.25 2018/04/09 16:21:10 jakllsch Exp $ */ +/* $NetBSD: uhci_cardbus.c,v 1.26 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1998-2005 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.25 2018/04/09 16:21:10 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.26 2021/04/24 23:36:53 thorpej Exp $"); #include "ehci_cardbus.h" @@ -169,7 +169,8 @@ uhci_cardbus_attach(device_t parent, device_t self, void *aux) #endif /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); } static int diff --git a/sys/dev/dec/dzkbd.c b/sys/dev/dec/dzkbd.c index 83b4367487e..1512ff4b6ab 100644 --- a/sys/dev/dec/dzkbd.c +++ b/sys/dev/dec/dzkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: dzkbd.c,v 1.28 2019/11/10 21:16:34 chs Exp $ */ +/* $NetBSD: dzkbd.c,v 1.29 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.28 2019/11/10 21:16:34 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.29 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -190,7 +190,7 @@ dzkbd_attach(device_t parent, device_t self, void *aux) a.accessops = &dzkbd_accessops; a.accesscookie = dzkbd; - dzkbd->sc_wskbddev = config_found(self, &a, wskbddevprint); + dzkbd->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); } int diff --git a/sys/dev/dec/dzms.c b/sys/dev/dec/dzms.c index b358b6d16bc..66a8498ae58 100644 --- a/sys/dev/dec/dzms.c +++ b/sys/dev/dec/dzms.c @@ -1,4 +1,4 @@ -/* $NetBSD: dzms.c,v 1.22 2012/10/27 17:18:15 chs Exp $ */ +/* $NetBSD: dzms.c,v 1.23 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.22 2012/10/27 17:18:15 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.23 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -135,7 +135,8 @@ dzms_attach(device_t parent, device_t self, void *aux) dzms->sc_enabled = 0; dzms->sc_selftest = 0; - dzms->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + dzms->sc_wsmousedev = config_found(self, &a, wsmousedevprint, + CFARG_EOL); } static int diff --git a/sys/dev/eisa/ahb.c b/sys/dev/eisa/ahb.c index 223e4f31a54..2a39bb5c219 100644 --- a/sys/dev/eisa/ahb.c +++ b/sys/dev/eisa/ahb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahb.c,v 1.65 2021/01/27 04:35:15 thorpej Exp $ */ +/* $NetBSD: ahb.c,v 1.66 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.65 2021/01/27 04:35:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.66 2021/04/24 23:36:53 thorpej Exp $"); #include "opt_ddb.h" @@ -266,7 +266,7 @@ ahbattach(device_t parent, device_t self, void *aux) /* * ask the adapter what subunits are present */ - config_found(self, &sc->sc_channel, scsiprint); + config_found(self, &sc->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/eisa/eisa.c b/sys/dev/eisa/eisa.c index 5cddc43c084..5aedca40801 100644 --- a/sys/dev/eisa/eisa.c +++ b/sys/dev/eisa/eisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $ */ +/* $NetBSD: eisa.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.48 2021/04/24 23:36:53 thorpej Exp $"); #include "opt_eisaverbose.h" @@ -181,8 +181,10 @@ eisaattach(device_t parent, device_t self, void *aux) locs[EISACF_SLOT] = slot; /* Attach matching device. */ - config_found_sm_loc(self, "eisa", locs, &ea, - eisaprint, config_stdsubmatch); + config_found(self, &ea, eisaprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } diff --git a/sys/dev/eisa/mlx_eisa.c b/sys/dev/eisa/mlx_eisa.c index f673f30d1b1..47c424adeea 100644 --- a/sys/dev/eisa/mlx_eisa.c +++ b/sys/dev/eisa/mlx_eisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $ */ +/* $NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -190,7 +190,7 @@ mlx_eisa_attach(device_t parent, device_t self, void *aux) } static int -mlx_eisa_rescan(device_t self, const char *attr, const int *flag) +mlx_eisa_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1); diff --git a/sys/dev/fdt/dwc2_fdt.c b/sys/dev/fdt/dwc2_fdt.c index 25c81713cb4..d24d72136bf 100644 --- a/sys/dev/fdt/dwc2_fdt.c +++ b/sys/dev/fdt/dwc2_fdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2_fdt.c,v 1.10 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: dwc2_fdt.c,v 1.11 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.10 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.11 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -204,7 +204,7 @@ dwc2_fdt_deferred(device_t self) return; } sc->sc_dwc2.sc_child = config_found(sc->sc_dwc2.sc_dev, - &sc->sc_dwc2.sc_bus, usbctlprint); + &sc->sc_dwc2.sc_bus, usbctlprint, CFARG_EOL); } static void diff --git a/sys/dev/fdt/dwc3_fdt.c b/sys/dev/fdt/dwc3_fdt.c index ff280dafc71..719c519e588 100644 --- a/sys/dev/fdt/dwc3_fdt.c +++ b/sys/dev/fdt/dwc3_fdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dwc3_fdt.c,v 1.13 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: dwc3_fdt.c,v 1.14 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.13 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.14 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -327,6 +327,7 @@ dwc3_fdt_attach(device_t parent, device_t self, void *aux) return; } - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); - sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); + sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint, + CFARG_EOL); } diff --git a/sys/dev/fdt/ehci_fdt.c b/sys/dev/fdt/ehci_fdt.c index 05bb2db4845..565616d564d 100644 --- a/sys/dev/fdt/ehci_fdt.c +++ b/sys/dev/fdt/ehci_fdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_fdt.c,v 1.6 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: ehci_fdt.c,v 1.7 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_fdt.c,v 1.6 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_fdt.c,v 1.7 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -150,5 +150,5 @@ ehci_fdt_attach(device_t parent, device_t self, void *aux) pmf_device_register1(self, NULL, NULL, ehci_shutdown); - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); } diff --git a/sys/dev/fdt/fdt_i2c.c b/sys/dev/fdt/fdt_i2c.c index 888251571e8..3d69aeca3a8 100644 --- a/sys/dev/fdt/fdt_i2c.c +++ b/sys/dev/fdt/fdt_i2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_i2c.c,v 1.9 2020/12/23 16:02:11 thorpej Exp $ */ +/* $NetBSD: fdt_i2c.c,v 1.10 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.9 2020/12/23 16:02:11 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.10 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -122,7 +122,9 @@ fdtbus_attach_i2cbus(device_t dev, int phandle, i2c_tag_t tag, cfprint_t print) props = device_properties(dev); prop_dictionary_set_bool(props, "i2c-no-indirect-config", true); - ret = config_found_ia(dev, "i2cbus", &iba, print); + ret = config_found(dev, &iba, print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); if (iba.iba_child_devices) prop_object_release(iba.iba_child_devices); diff --git a/sys/dev/fdt/fdt_spi.c b/sys/dev/fdt/fdt_spi.c index 737c4179d70..03d4b7c63f0 100644 --- a/sys/dev/fdt/fdt_spi.c +++ b/sys/dev/fdt/fdt_spi.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_spi.c,v 1.1 2019/08/13 16:46:49 tnn Exp $ */ +/* $NetBSD: fdt_spi.c,v 1.2 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdt_spi.c,v 1.1 2019/08/13 16:46:49 tnn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_spi.c,v 1.2 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -104,7 +104,9 @@ fdtbus_attach_spibus(device_t dev, int phandle, cfprint_t print) prop_object_retain(sba.sba_child_devices); prop_object_release(devs); - ret = config_found_ia(dev, "spibus", &sba, print); + ret = config_found(dev, &sba, print, + CFARG_IATTR, "spibus", + CFARG_EOL); if (sba.sba_child_devices) prop_object_release(sba.sba_child_devices); diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c index dcc5c10806c..49bf6c50a2e 100644 --- a/sys/dev/fdt/fdtbus.c +++ b/sys/dev/fdt/fdtbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdtbus.c,v 1.40 2021/02/05 17:20:32 thorpej Exp $ */ +/* $NetBSD: fdtbus.c,v 1.41 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.40 2021/02/05 17:20:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.41 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -345,7 +345,11 @@ fdt_scan_best(struct fdt_softc *sc, struct fdt_node *node) [FDTCF_PASS] = pass }; fdt_init_attach_args(&sc->sc_faa, node, true, &faa); - cf = config_search_loc(fdt_scan_submatch, node->n_bus, "fdt", locs, &faa); + cf = config_search(node->n_bus, &faa, + CFARG_SUBMATCH, fdt_scan_submatch, + CFARG_IATTR, "fdt", + CFARG_LOCATORS, locs, + CFARG_EOL); if (cf == NULL) continue; match = config_match(node->n_bus, cf, &faa); @@ -389,14 +393,22 @@ fdt_scan(struct fdt_softc *sc, int pass) fdt_pre_attach(node); if (quiet) { - node->n_dev = config_attach_loc(node->n_bus, node->n_cf, locs, - &faa, fdtbus_print); + node->n_dev = config_attach(node->n_bus, node->n_cf, + &faa, fdtbus_print, + CFARG_LOCATORS, locs, + CFARG_DEVHANDLE, devhandle_from_of(node->n_phandle), + CFARG_EOL); } else { /* * Default pass. */ - node->n_dev = config_found_sm_loc(node->n_bus, "fdt", locs, - &faa, fdtbus_print, fdt_scan_submatch); + node->n_dev = config_found(node->n_bus, &faa, + fdtbus_print, + CFARG_SUBMATCH, fdt_scan_submatch, + CFARG_IATTR, "fdt", + CFARG_LOCATORS, locs, + CFARG_DEVHANDLE, devhandle_from_of(node->n_phandle), + CFARG_EOL); } if (node->n_dev != NULL) @@ -550,20 +562,3 @@ fdtbus_print(void *aux, const char *pnp) return UNCONF; } - -void -fdtbus_device_register(device_t dev, void *aux) -{ - /* All we do here is set the devhandle in the device_t. */ - int phandle = -1; - - if (device_attached_to_iattr(dev, "fdt")) { - const struct fdt_attach_args *faa = aux; - phandle = faa->faa_phandle; - } else { - return; - } - KASSERT(phandle != -1); - - of_device_register(dev, phandle); -} diff --git a/sys/dev/fdt/fdtvar.h b/sys/dev/fdt/fdtvar.h index efc090548d0..0864d160a34 100644 --- a/sys/dev/fdt/fdtvar.h +++ b/sys/dev/fdt/fdtvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: fdtvar.h,v 1.69 2021/02/04 22:14:08 thorpej Exp $ */ +/* $NetBSD: fdtvar.h,v 1.70 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -436,7 +436,6 @@ void fdt_remove_bycompat(const char *[]); int fdt_find_with_property(const char *, int *); int fdtbus_print(void *, const char *); -void fdtbus_device_register(device_t, void *); bus_dma_tag_t fdtbus_dma_tag_create(int, const struct fdt_dma_range *, u_int); diff --git a/sys/dev/fdt/gpiokeys.c b/sys/dev/fdt/gpiokeys.c index 18d95354b03..26f1d30ec70 100644 --- a/sys/dev/fdt/gpiokeys.c +++ b/sys/dev/fdt/gpiokeys.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpiokeys.c,v 1.9 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: gpiokeys.c,v 1.10 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpiokeys.c,v 1.9 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpiokeys.c,v 1.10 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -265,8 +265,8 @@ gpiokeys_attach(device_t parent, device_t self, void *aux) a.keymap = &gpiokeys_keymapdata; a.accessops = &gpiokeys_accessops; a.accesscookie = sc; - sc->sc_wskbddev = config_found_ia(self, "wskbddev", &a, - wskbddevprint); + sc->sc_wskbddev = + config_found(self, &a, wskbddevprint, CFARG_EOL); } callout_init(&sc->sc_tick, CALLOUT_MPSAFE); diff --git a/sys/dev/fdt/ohci_fdt.c b/sys/dev/fdt/ohci_fdt.c index 32a1165c664..d11e65ceded 100644 --- a/sys/dev/fdt/ohci_fdt.c +++ b/sys/dev/fdt/ohci_fdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci_fdt.c,v 1.5 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: ohci_fdt.c,v 1.6 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci_fdt.c,v 1.5 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci_fdt.c,v 1.6 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -146,5 +146,5 @@ ohci_fdt_attach(device_t parent, device_t self, void *aux) pmf_device_register1(self, NULL, NULL, ohci_shutdown); - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); } diff --git a/sys/dev/fdt/virtio_mmio_fdt.c b/sys/dev/fdt/virtio_mmio_fdt.c index f5da1f4db68..72233d2a7d0 100644 --- a/sys/dev/fdt/virtio_mmio_fdt.c +++ b/sys/dev/fdt/virtio_mmio_fdt.c @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mmio_fdt.c,v 1.7 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: virtio_mmio_fdt.c,v 1.8 2021/04/24 23:36:53 thorpej Exp $ */ /* * Copyright (c) 2018 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.7 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.8 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -105,7 +105,7 @@ virtio_mmio_fdt_attach(device_t parent, device_t self, void *aux) msc->sc_free_interrupts = virtio_mmio_fdt_free_interrupts; virtio_mmio_common_attach(msc); - virtio_mmio_fdt_rescan(self, "virtio", NULL); + virtio_mmio_fdt_rescan(self, NULL, NULL); } /* ARGSUSED */ @@ -123,7 +123,7 @@ virtio_mmio_fdt_rescan(device_t self, const char *attr, const int *scan_flags) memset(&va, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, attr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(vsc)) return 0; diff --git a/sys/dev/flash/flash.c b/sys/dev/flash/flash.c index a13bf9ef95d..c94c77f19a1 100644 --- a/sys/dev/flash/flash.c +++ b/sys/dev/flash/flash.c @@ -1,4 +1,4 @@ -/* $NetBSD: flash.c,v 1.15 2019/12/26 04:53:11 msaitoh Exp $ */ +/* $NetBSD: flash.c,v 1.16 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.15 2019/12/26 04:53:11 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.16 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -240,7 +240,9 @@ flash_attach_mi(struct flash_interface * const flash_if, device_t device) #endif arg.flash_if = flash_if; - return config_found_ia(device, "flashbus", &arg, flash_print); + return config_found(device, &arg, flash_print, + CFARG_IATTR, "flashbus", + CFARG_EOL); } /** diff --git a/sys/dev/flash/flash_mtdparts.c b/sys/dev/flash/flash_mtdparts.c index 3ea308359d4..6c1562366de 100644 --- a/sys/dev/flash/flash_mtdparts.c +++ b/sys/dev/flash/flash_mtdparts.c @@ -1,4 +1,4 @@ -/* $NetBSD: flash_mtdparts.c,v 1.1 2017/11/13 17:35:58 jmcneill Exp $ */ +/* $NetBSD: flash_mtdparts.c,v 1.2 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: flash_mtdparts.c,v 1.1 2017/11/13 17:35:58 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: flash_mtdparts.c,v 1.2 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -48,7 +48,9 @@ flash_attach_partition(struct flash_interface *flash_if, device_t parent, faa.flash_if = flash_if; faa.partinfo = *part; - config_found_ia(parent, "flashbus", &faa, flash_print); + config_found(parent, &faa, flash_print, + CFARG_IATTR, "flashbus", + CFARG_EOL); } static flash_size_t diff --git a/sys/dev/gpib/cs80bus.c b/sys/dev/gpib/cs80bus.c index b076866debb..649b5f44ddb 100644 --- a/sys/dev/gpib/cs80bus.c +++ b/sys/dev/gpib/cs80bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs80bus.c,v 1.17 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: cs80bus.c,v 1.18 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.17 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.18 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -134,8 +134,9 @@ cs80busattach(device_t parent, device_t self, void *aux) ca.ca_slave = slave; ca.ca_id = id; - (void)config_search_ia(cs80bussearch, sc->sc_dev, "cs80bus", - &ca); + config_search(sc->sc_dev, &ca, + CFARG_SEARCH, cs80bussearch, + CFARG_EOL); } } @@ -159,7 +160,7 @@ cs80bussearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) DPRINTF(DBG_FOLLOW, ("cs80bussearch: id=0x%x slave=%d punit=%d\n", ca->ca_id, ca->ca_slave, ca->ca_punit)); - if (config_match(parent, cf, ca) > 0) { + if (config_probe(parent, cf, ca)) { DPRINTF(DBG_FOLLOW, ("cs80bussearch: got id=0x%x slave=%d punit %d\n", @@ -187,7 +188,7 @@ cs80bussearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) /* * This device is allowed; attach it. */ - config_attach(parent, cf, ca, cs80busprint); + config_attach(parent, cf, ca, cs80busprint, CFARG_EOL); } out: return (0); diff --git a/sys/dev/gpib/gpib.c b/sys/dev/gpib/gpib.c index 4541160fdd2..622f4ed8957 100644 --- a/sys/dev/gpib/gpib.c +++ b/sys/dev/gpib/gpib.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpib.c,v 1.24 2019/11/10 21:16:34 chs Exp $ */ +/* $NetBSD: gpib.c,v 1.25 2021/04/24 23:36:53 thorpej Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.24 2019/11/10 21:16:34 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.25 2021/04/24 23:36:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -140,13 +140,16 @@ gpibattach(device_t parent, device_t self, void *aux) for (address=0; address<GPIB_NDEVS; address++) { ga.ga_ic = sc->sc_ic; ga.ga_address = address; - (void) config_search_ia(gpibsubmatch1, sc->sc_dev, "gpib", - &ga); + config_search(sc->sc_dev, &ga, + CFARG_SEARCH, gpibsubmatch1, + CFARG_EOL); } /* attach the wild-carded devices - probably protocol busses */ ga.ga_ic = sc->sc_ic; - (void) config_search_ia(gpibsubmatch2, sc->sc_dev, "gpib", &ga); + config_search(sc->sc_dev, &ga, + CFARG_SEARCH, gpibsubmatch2, + CFARG_EOL); } int @@ -161,10 +164,10 @@ gpibsubmatch1(device_t parent, cfdata_t cf, const int *ldesc, void *aux) if (cf->cf_loc[GPIBCF_ADDRESS] == sc->sc_myaddr) return (0); - if (config_match(parent, cf, ga) > 0) { + if (config_probe(parent, cf, ga)) { if (gpib_alloc(sc, ga->ga_address)) return (0); - config_attach(parent, cf, ga, gpibprint); + config_attach(parent, cf, ga, gpibprint, CFARG_EOL); return (0); } return (0); @@ -179,8 +182,8 @@ gpibsubmatch2(device_t parent, cfdata_t cf, const int *ldesc, void *aux) return (0); ga->ga_address = GPIBCF_ADDRESS_DEFAULT; - if (config_match(parent, cf, ga) > 0) { - config_attach(parent, cf, ga, gpibdevprint); + if (config_probe(parent, cf, ga)) { + config_attach(parent, cf, ga, gpibdevprint, CFARG_EOL); return (0); } return (0); diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c index d57693f85b5..590ffdd548b 100644 --- a/sys/dev/gpio/gpio.c +++ b/sys/dev/gpio/gpio.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.64 2019/10/20 09:35:18 tnn Exp $ */ +/* $NetBSD: gpio.c,v 1.65 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64 2019/10/20 09:35:18 tnn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.65 2021/04/24 23:36:54 thorpej Exp $"); /* * General Purpose Input/Output framework. @@ -189,9 +189,10 @@ gpio_childdetached(device_t self, device_t child) static int gpio_rescan(device_t self, const char *ifattr, const int *locators) { - struct gpio_softc *sc = device_private(self); - config_search_loc(gpio_search, self, ifattr, locators, sc); + config_search(self, NULL, + CFARG_SEARCH, gpio_search, + CFARG_EOL); return 0; } @@ -268,7 +269,7 @@ gpio_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) struct gpio_attach_args ga; size_t namlen; - ga.ga_gpio = aux; + ga.ga_gpio = device_private(parent); ga.ga_offset = cf->cf_loc[GPIOCF_OFFSET]; ga.ga_mask = cf->cf_loc[GPIOCF_MASK]; ga.ga_flags = cf->cf_loc[GPIOCF_FLAG]; @@ -276,8 +277,8 @@ gpio_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) ga.ga_dvname = kmem_alloc(namlen, KM_SLEEP); strcpy(ga.ga_dvname, cf->cf_name); - if (config_match(parent, cf, &ga) > 0) - config_attach(parent, cf, &ga, gpio_print); + if (config_probe(parent, cf, &ga)) + config_attach(parent, cf, &ga, gpio_print, CFARG_EOL); kmem_free(ga.ga_dvname, namlen); return 0; } @@ -852,10 +853,14 @@ gpio_ioctl(struct gpio_softc *sc, u_long cmd, void *data, int flag, locs[GPIOCF_MASK] = ga.ga_mask; locs[GPIOCF_FLAG] = ga.ga_flags; - cf = config_search_loc(NULL, sc->sc_dev, "gpio", locs, &ga); + cf = config_search(sc->sc_dev, &ga, + CFARG_LOCATORS, locs, + CFARG_EOL); if (cf != NULL) { - dv = config_attach_loc(sc->sc_dev, cf, locs, &ga, - gpiobus_print); + dv = config_attach(sc->sc_dev, cf, &ga, + gpiobus_print, + CFARG_LOCATORS, locs, + CFARG_EOL); #ifdef COMPAT_50 if (dv != NULL) { gdev = kmem_alloc(sizeof(struct gpio_dev), diff --git a/sys/dev/gpio/gpioiic.c b/sys/dev/gpio/gpioiic.c index 80377c41229..5f5f8c7e5ee 100644 --- a/sys/dev/gpio/gpioiic.c +++ b/sys/dev/gpio/gpioiic.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpioiic.c,v 1.9 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: gpioiic.c,v 1.10 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: gpioiic.c,v 1.8 2008/11/24 12:12:12 mbalmer Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.9 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.10 2021/04/24 23:36:54 thorpej Exp $"); /* * I2C bus bit-banging through GPIO pins. @@ -192,7 +192,7 @@ gpioiic_attach(device_t parent, device_t self, void *aux) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c_tag; - sc->sc_i2c_dev = config_found(self, &iba, iicbus_print); + sc->sc_i2c_dev = config_found(self, &iba, iicbus_print, CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error("%s: could not establish power handler\n", diff --git a/sys/dev/gpio/gpioow.c b/sys/dev/gpio/gpioow.c index eda10f8ec58..5df57619f51 100644 --- a/sys/dev/gpio/gpioow.c +++ b/sys/dev/gpio/gpioow.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpioow.c,v 1.17 2019/12/06 07:12:38 maxv Exp $ */ +/* $NetBSD: gpioow.c,v 1.18 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: gpioow.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.17 2019/12/06 07:12:38 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.18 2021/04/24 23:36:54 thorpej Exp $"); /* * 1-Wire bus bit-banging through GPIO pin. @@ -149,7 +149,7 @@ gpioow_attach(device_t parent, device_t self, void *aux) memset(&oba, 0, sizeof(oba)); oba.oba_bus = &sc->sc_ow_bus; - sc->sc_ow_dev = config_found(self, &oba, onewirebus_print); + sc->sc_ow_dev = config_found(self, &oba, onewirebus_print, CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error("%s: could not establish power handler\n", diff --git a/sys/dev/gpio/gpiosim.c b/sys/dev/gpio/gpiosim.c index 90fbb35442a..07abff6a373 100644 --- a/sys/dev/gpio/gpiosim.c +++ b/sys/dev/gpio/gpiosim.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpiosim.c,v 1.21 2017/10/28 04:53:56 riastradh Exp $ */ +/* $NetBSD: gpiosim.c,v 1.22 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: gpiosim.c,v 1.1 2008/11/23 18:46:49 mbalmer Exp $ */ /* @@ -142,7 +142,7 @@ gpiosim_attach(device_t parent, device_t self, void *aux) CTL_CREATE, CTL_EOL); aprint_normal(": simulating %d pins\n", GPIOSIM_NPINS); - sc->sc_gdev = config_found_ia(self, "gpiobus", &gba, gpiobus_print); + sc->sc_gdev = config_found(self, &gba, gpiobus_print, CFARG_EOL); } static int diff --git a/sys/dev/hdaudio/hdaudio.c b/sys/dev/hdaudio/hdaudio.c index c36947b7744..bd89d753329 100644 --- a/sys/dev/hdaudio/hdaudio.c +++ b/sys/dev/hdaudio/hdaudio.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio.c,v 1.13 2020/12/28 19:31:43 jmcneill Exp $ */ +/* $NetBSD: hdaudio.c,v 1.14 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk> @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.13 2020/12/28 19:31:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.14 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -689,8 +689,10 @@ hdaudio_attach_fg(struct hdaudio_function_group *fg, prop_array_t config) locs[0] = fg->fg_nid; - fg->fg_device = config_found_sm_loc(sc->sc_dev, "hdaudiobus", - locs, args, hdaudio_config_print, config_stdsubmatch); + fg->fg_device = config_found(sc->sc_dev, args, hdaudio_config_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); prop_object_release(args); } @@ -946,9 +948,6 @@ hdaudio_rescan(struct hdaudio_softc *sc, const char *ifattr, const int *locs) struct hdaudio_function_group *fg; unsigned int codec; - if (!ifattr_match(ifattr, "hdaudiobus")) - return 0; - for (codec = 0; codec < HDAUDIO_MAX_CODECS; codec++) { co = &sc->sc_codec[codec]; fg = co->co_fg; diff --git a/sys/dev/hid/hidms.c b/sys/dev/hid/hidms.c index 33053f1e3a6..e2342190680 100644 --- a/sys/dev/hid/hidms.c +++ b/sys/dev/hid/hidms.c @@ -1,4 +1,4 @@ -/* $NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $ */ +/* $NetBSD: hidms.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -249,7 +249,8 @@ hidms_attach(device_t self, struct hidms *ms, a.accessops = ops; a.accesscookie = device_private(self); - ms->hidms_wsmousedev = config_found(self, &a, wsmousedevprint); + ms->hidms_wsmousedev = config_found(self, &a, wsmousedevprint, + CFARG_EOL); return; } diff --git a/sys/dev/hil/hil.c b/sys/dev/hil/hil.c index 546b5583a70..bc2088f1d38 100644 --- a/sys/dev/hil/hil.c +++ b/sys/dev/hil/hil.c @@ -1,4 +1,4 @@ -/* $NetBSD: hil.c,v 1.3 2018/09/03 16:29:31 riastradh Exp $ */ +/* $NetBSD: hil.c,v 1.4 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: hil.c,v 1.24 2010/11/20 16:45:46 miod Exp $ */ /* * Copyright (c) 2003, 2004, Miodrag Vallat. @@ -539,8 +539,9 @@ hilconfig(struct hil_softc *sc, u_int knowndevs) memcpy(ha.ha_info, sc->sc_cmdbuf, len); sc->sc_devices[id] = - config_found_sm_loc(sc->sc_dev, "hil", NULL, - &ha, hildevprint, hilsubmatch); + config_found(sc->sc_dev, &ha, hildevprint, + CFARG_SUBMATCH, hilsubmatch, + CFARG_EOL); #if NHILKBD > 0 /* diff --git a/sys/dev/hil/hilkbd.c b/sys/dev/hil/hilkbd.c index 0abe9c56d7c..d472f2c439c 100644 --- a/sys/dev/hil/hilkbd.c +++ b/sys/dev/hil/hilkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hilkbd.c,v 1.4 2017/04/08 17:04:56 tsutsui Exp $ */ +/* $NetBSD: hilkbd.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: hilkbd.c,v 1.14 2009/01/21 21:53:59 grange Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. @@ -203,7 +203,7 @@ hilkbdattach(device_t parent, device_t self, void *aux) sc->sc_console = sc->sc_enabled = 0; } - sc->sc_wskbddev = config_found(self, &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); /* * If this is an old keyboard with a numeric pad but no ``num lock'' diff --git a/sys/dev/hil/hilms.c b/sys/dev/hil/hilms.c index d0944e5e71d..6e9d8e9411d 100644 --- a/sys/dev/hil/hilms.c +++ b/sys/dev/hil/hilms.c @@ -1,4 +1,4 @@ -/* $NetBSD: hilms.c,v 1.2 2011/02/15 11:05:51 tsutsui Exp $ */ +/* $NetBSD: hilms.c,v 1.3 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: hilms.c,v 1.5 2007/04/10 22:37:17 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. @@ -161,7 +161,7 @@ hilmsattach(device_t parent, device_t self, void *aux) a.accessops = &hilms_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); } int diff --git a/sys/dev/hpc/bivideo.c b/sys/dev/hpc/bivideo.c index d76c0a9e38c..a6e38dc27a3 100644 --- a/sys/dev/hpc/bivideo.c +++ b/sys/dev/hpc/bivideo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bivideo.c,v 1.34 2017/06/13 19:13:55 spz Exp $ */ +/* $NetBSD: bivideo.c,v 1.35 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 1999-2001 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.34 2017/06/13 19:13:55 spz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.35 2021/04/24 23:36:54 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -195,7 +195,7 @@ bivideoattach(device_t parent, device_t self, void *aux) ha.ha_ndspconf = 1; ha.ha_dspconflist = &sc->sc_dspconf; - config_found(self, &ha, hpcfbprint); + config_found(self, &ha, hpcfbprint, CFARG_EOL); } int diff --git a/sys/dev/hpc/btnmgr.c b/sys/dev/hpc/btnmgr.c index 4a299fdd2bb..c66cd448c55 100644 --- a/sys/dev/hpc/btnmgr.c +++ b/sys/dev/hpc/btnmgr.c @@ -1,4 +1,4 @@ -/* $NetBSD: btnmgr.c,v 1.29 2016/09/06 06:27:17 skrll Exp $ */ +/* $NetBSD: btnmgr.c,v 1.30 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 1999 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.29 2016/09/06 06:27:17 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.30 2021/04/24 23:36:54 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_btnmgr.h" @@ -219,7 +219,7 @@ btnmgrattach(device_t parent, wa.accessops = &btnmgr_wskbd_accessops; wa.accesscookie = sc; - sc->sc_wskbddev = config_found(self, &wa, wskbddevprint); + sc->sc_wskbddev = config_found(self, &wa, wskbddevprint, CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "unable to establish power handler\n"); diff --git a/sys/dev/hpc/hpcapm.c b/sys/dev/hpc/hpcapm.c index 9ab4cfc9909..fd5aeb07ee1 100644 --- a/sys/dev/hpc/hpcapm.c +++ b/sys/dev/hpc/hpcapm.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcapm.c,v 1.22 2017/10/28 04:53:56 riastradh Exp $ */ +/* $NetBSD: hpcapm.c,v 1.23 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2000 Takemura Shin @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.22 2017/10/28 04:53:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.23 2021/04/24 23:36:54 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcapm.h" @@ -149,7 +149,7 @@ hpcapm_attach(device_t parent, device_t self, void *aux) aaa.accesscookie = sc; aaa.apm_detail = 0x0102; - sc->sc_apmdev = config_found_ia(self, "apmdevif", &aaa, apmprint); + sc->sc_apmdev = config_found(self, &aaa, apmprint, CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "unable to establish power handler\n"); diff --git a/sys/dev/hpc/hpcfb.c b/sys/dev/hpc/hpcfb.c index f01c40da898..38be56a1ea2 100644 --- a/sys/dev/hpc/hpcfb.c +++ b/sys/dev/hpc/hpcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfb.c,v 1.60 2015/04/07 01:24:32 ozaki-r Exp $ */ +/* $NetBSD: hpcfb.c,v 1.61 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 1999 @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.60 2015/04/07 01:24:32 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.61 2021/04/24 23:36:54 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -324,7 +324,8 @@ hpcfbattach(device_t parent, device_t self, void *aux) wa.accessops = &hpcfb_accessops; wa.accesscookie = sc; - sc->sc_wsdisplay = config_found(self, &wa, wsemuldisplaydevprint); + sc->sc_wsdisplay = config_found(self, &wa, wsemuldisplaydevprint, + CFARG_EOL); #ifdef HPCFB_JUMP /* diff --git a/sys/dev/hpc/hpcioman.c b/sys/dev/hpc/hpcioman.c index b653a025402..d1cd723fe00 100644 --- a/sys/dev/hpc/hpcioman.c +++ b/sys/dev/hpc/hpcioman.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcioman.c,v 1.19 2012/10/27 17:18:17 chs Exp $ */ +/* $NetBSD: hpcioman.c,v 1.20 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpcioman.c,v 1.19 2012/10/27 17:18:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpcioman.c,v 1.20 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,7 +73,9 @@ hpcioman_attach(device_t parent, device_t self, void *aux) { printf("\n"); - config_search_ia(hpcioman_search, self, "hpcioman", aux); + config_search(self, aux, + CFARG_SEARCH, hpcioman_search, + CFARG_EOL); } int @@ -153,7 +155,7 @@ hpcioman_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) } hma.hma_connect = cf->cf_connect; - config_attach(parent, cf, &hma, hpcioman_print); + config_attach(parent, cf, &hma, hpcioman_print, CFARG_EOL); return (0); } diff --git a/sys/dev/hpc/hpckbd.c b/sys/dev/hpc/hpckbd.c index 4df83a26718..2d4a519bf6f 100644 --- a/sys/dev/hpc/hpckbd.c +++ b/sys/dev/hpc/hpckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpckbd.c,v 1.35 2018/09/18 14:57:32 uwe Exp $ */ +/* $NetBSD: hpckbd.c,v 1.36 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.35 2018/09/18 14:57:32 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.36 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -183,7 +183,8 @@ hpckbd_attach(device_t parent, device_t self, void *aux) wa.keymap = &hpckbd_keymapdata; wa.accessops = &hpckbd_accessops; wa.accesscookie = sc->sc_core; - sc->sc_core->hc_wskbddev = config_found(self, &wa, wskbddevprint); + sc->sc_core->hc_wskbddev = config_found(self, &wa, wskbddevprint, + CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "unable to establish power handler\n"); diff --git a/sys/dev/hpc/hpf1275a_tty.c b/sys/dev/hpc/hpf1275a_tty.c index 0cba7e6b84c..6ad2365548e 100644 --- a/sys/dev/hpc/hpf1275a_tty.c +++ b/sys/dev/hpc/hpf1275a_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpf1275a_tty.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $ */ +/* $NetBSD: hpf1275a_tty.c,v 1.30 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2004 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.29 2017/10/28 04:53:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.30 2021/04/24 23:36:54 thorpej Exp $"); #include "opt_wsdisplay_compat.h" @@ -271,7 +271,7 @@ hpf1275a_attach(device_t parent, device_t self, void *aux) #ifdef WSDISPLAY_COMPAT_RAWKBD sc->sc_rawkbd = 0; #endif - sc->sc_wskbd = config_found(self, &wska, wskbddevprint); + sc->sc_wskbd = config_found(self, &wska, wskbddevprint, CFARG_EOL); } diff --git a/sys/dev/hyperv/genfb_vmbus.c b/sys/dev/hyperv/genfb_vmbus.c index 797fc43cb22..be53f9dc826 100644 --- a/sys/dev/hyperv/genfb_vmbus.c +++ b/sys/dev/hyperv/genfb_vmbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_vmbus.c,v 1.1 2019/05/24 14:28:48 nonaka Exp $ */ +/* $NetBSD: genfb_vmbus.c,v 1.2 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb_vmbus.c,v 1.1 2019/05/24 14:28:48 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb_vmbus.c,v 1.2 2021/04/24 23:36:54 thorpej Exp $"); #include "opt_wsfb.h" #include "opt_genfb.h" @@ -114,7 +114,9 @@ genfb_vmbus_attach(device_t parent, device_t self, void *aux) return; /* now try to attach a DRM */ - config_found_ia(self, "drm", aux, genfb_vmbus_drm_print); + config_found(self, aux, genfb_vmbus_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int diff --git a/sys/dev/hyperv/hvkbd.c b/sys/dev/hyperv/hvkbd.c index e38cfd265e3..fa13a0f738c 100644 --- a/sys/dev/hyperv/hvkbd.c +++ b/sys/dev/hyperv/hvkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hvkbd.c,v 1.7 2021/01/29 04:38:18 nonaka Exp $ */ +/* $NetBSD: hvkbd.c,v 1.8 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2017 Microsoft Corp. @@ -36,7 +36,7 @@ #endif /* _KERNEL_OPT */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.7 2021/01/29 04:38:18 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.8 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -237,7 +237,7 @@ hvkbd_attach(device_t parent, device_t self, void *aux) a.keymap = &hvkbd_keymapdata; a.accessops = &hvkbd_accessops; a.accesscookie = sc; - sc->sc_wskbddev = config_found(self, &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); return; free_buf: diff --git a/sys/dev/hyperv/hvs.c b/sys/dev/hyperv/hvs.c index b7d74957a48..bee86e00b55 100644 --- a/sys/dev/hyperv/hvs.c +++ b/sys/dev/hyperv/hvs.c @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.4 2020/05/25 10:14:58 nonaka Exp $ */ +/* $NetBSD: hvs.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.4 2020/05/25 10:14:58 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -391,7 +391,8 @@ hvs_attach(device_t parent, device_t self, void *aux) chan->chan_flags = SCSIPI_CHAN_NOSETTLE; chan->chan_defquirks |= PQUIRK_ONLYBIG; - sc->sc_scsibus = config_found(self, &sc->sc_channel, scsiprint); + sc->sc_scsibus = config_found(self, &sc->sc_channel, scsiprint, + CFARG_EOL); /* * If the driver has successfully attached to an IDE device, diff --git a/sys/dev/hyperv/vmbus.c b/sys/dev/hyperv/vmbus.c index 5dee76f961f..f908854e249 100644 --- a/sys/dev/hyperv/vmbus.c +++ b/sys/dev/hyperv/vmbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: vmbus.c,v 1.12 2021/01/29 04:38:34 nonaka Exp $ */ +/* $NetBSD: vmbus.c,v 1.13 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.12 2021/01/29 04:38:34 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.13 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2202,8 +2202,8 @@ vmbus_process_devq(void *arg) vaa.aa_chan = ch; vaa.aa_iot = sc->sc_iot; vaa.aa_memt = sc->sc_memt; - ch->ch_dev = config_found_ia(sc->sc_dev, - "hypervvmbus", &vaa, vmbus_attach_print); + ch->ch_dev = config_found(sc->sc_dev, + &vaa, vmbus_attach_print, CFARG_EOL); break; case VMBUS_DEV_TYPE_DETACH: diff --git a/sys/dev/i2c/as3722.c b/sys/dev/i2c/as3722.c index e1c14eb2551..bdf945daf07 100644 --- a/sys/dev/i2c/as3722.c +++ b/sys/dev/i2c/as3722.c @@ -1,4 +1,4 @@ -/* $NetBSD: as3722.c,v 1.22 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: as3722.c,v 1.23 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -29,7 +29,7 @@ #include "opt_fdt.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: as3722.c,v 1.22 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: as3722.c,v 1.23 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -514,7 +514,7 @@ as3722_regulator_attach(struct as3722_softc *sc) continue; raa.reg_def = regdef; raa.reg_phandle = child; - config_found(sc->sc_dev, &raa, NULL); + config_found(sc->sc_dev, &raa, NULL, CFARG_EOL); } } diff --git a/sys/dev/i2c/axp20x.c b/sys/dev/i2c/axp20x.c index e1f060f7182..80e8f24f9bd 100644 --- a/sys/dev/i2c/axp20x.c +++ b/sys/dev/i2c/axp20x.c @@ -1,4 +1,4 @@ -/* $NetBSD: axp20x.c,v 1.19 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: axp20x.c,v 1.20 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.19 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.20 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -813,6 +813,6 @@ axp20x_fdt_attach(struct axp20x_softc *sc) for (child = OF_child(regulators_phandle); child; child = OF_peer(child)) { struct axp20xreg_attach_args reg = { .reg_phandle = child }; - config_found(sc->sc_dev, ®, NULL); + config_found(sc->sc_dev, ®, NULL, CFARG_EOL); } } diff --git a/sys/dev/i2c/axppmic.c b/sys/dev/i2c/axppmic.c index 225b77ee8e3..a8531c3c500 100644 --- a/sys/dev/i2c/axppmic.c +++ b/sys/dev/i2c/axppmic.c @@ -1,4 +1,4 @@ -/* $NetBSD: axppmic.c,v 1.33 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: axppmic.c,v 1.34 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2014-2018 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.33 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.34 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1052,7 +1052,7 @@ axppmic_attach(device_t parent, device_t self, void *aux) continue; aaa.reg_ctrl = ctrl; aaa.reg_phandle = child; - config_found(sc->sc_dev, &aaa, NULL); + config_found(sc->sc_dev, &aaa, NULL, CFARG_EOL); } } diff --git a/sys/dev/i2c/gttwsi_core.c b/sys/dev/i2c/gttwsi_core.c index c76e20c011a..f779e13ecae 100644 --- a/sys/dev/i2c/gttwsi_core.c +++ b/sys/dev/i2c/gttwsi_core.c @@ -1,4 +1,4 @@ -/* $NetBSD: gttwsi_core.c,v 1.16 2020/02/15 23:42:01 thorpej Exp $ */ +/* $NetBSD: gttwsi_core.c,v 1.17 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2008 Eiji Kawauchi. * All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.16 2020/02/15 23:42:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.17 2021/04/24 23:36:54 thorpej Exp $"); #include "locators.h" #include <sys/param.h> @@ -163,7 +163,9 @@ gttwsi_config_children(device_t self) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - (void) config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); } int diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c index 956759d9a72..7b53659af87 100644 --- a/sys/dev/i2c/i2c.c +++ b/sys/dev/i2c/i2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.77 2021/01/25 12:18:18 jmcneill Exp $ */ +/* $NetBSD: i2c.c,v 1.78 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77 2021/01/25 12:18:18 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -343,7 +343,7 @@ iic_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) * us from having to poke at the bus to see if anything * is there. */ - match_result = config_match(parent, cf, &ia); + match_result = config_probe(parent, cf, &ia);/*XXX*/ if (match_result <= 0) continue; @@ -358,7 +358,7 @@ iic_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) continue; sc->sc_devices[ia.ia_addr] = - config_attach(parent, cf, &ia, iic_print); + config_attach(parent, cf, &ia, iic_print, CFARG_EOL); } return 0; @@ -380,7 +380,10 @@ iic_child_detach(device_t parent, device_t child) static int iic_rescan(device_t self, const char *ifattr, const int *locators) { - config_search_ia(iic_search, self, ifattr, NULL); + config_search(self, NULL, + CFARG_SEARCH, iic_search, + CFARG_LOCATORS, locators, + CFARG_EOL); return 0; } @@ -489,9 +492,10 @@ iic_attach(device_t parent, device_t self, void *aux) "address @ 0x%02x\n", addr); } else if (sc->sc_devices[addr] == NULL) { sc->sc_devices[addr] = - config_found_sm_loc(self, "iic", - loc, &ia, iic_print_direct, - NULL); + config_found(self, &ia, + iic_print_direct, + CFARG_LOCATORS, loc, + CFARG_EOL); } } diff --git a/sys/dev/i2c/i2cmux.c b/sys/dev/i2c/i2cmux.c index 5f88cec68e2..e05bffdb894 100644 --- a/sys/dev/i2c/i2cmux.c +++ b/sys/dev/i2c/i2cmux.c @@ -1,4 +1,4 @@ -/* $NetBSD: i2cmux.c,v 1.4 2021/01/26 00:19:53 jmcneill Exp $ */ +/* $NetBSD: i2cmux.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i2cmux.c,v 1.4 2021/01/26 00:19:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2cmux.c,v 1.5 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/types.h> #include <sys/device.h> @@ -201,7 +201,7 @@ iicmux_attach_bus(struct iicmux_softc * const sc, .iba_tag = &bus->controller, .iba_child_devices = acpi_enter_i2c_devs(NULL, ad) }; - config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); } break; #endif default: diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c index 4b2ea6dfdcd..5b746e6387c 100644 --- a/sys/dev/i2c/ihidev.c +++ b/sys/dev/i2c/ihidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: ihidev.c,v 1.18 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: ihidev.c,v 1.19 2021/04/24 23:36:54 thorpej Exp $ */ /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */ /*- @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.18 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.19 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -218,8 +218,10 @@ ihidev_attach(device_t parent, device_t self, void *aux) /* Look for a driver claiming all report IDs first. */ iha.reportid = IHIDEV_CLAIM_ALLREPORTID; locs[IHIDBUSCF_REPORTID] = IHIDEV_CLAIM_ALLREPORTID; - dev = config_found_sm_loc(self, "ihidbus", locs, &iha, - ihidev_print, ihidev_submatch); + dev = config_found(self, &iha, ihidev_print, + CFARG_SUBMATCH, ihidev_submatch, + CFARG_LOCATORS, locs, + CFARG_EOL); if (dev != NULL) { for (repid = 0; repid < sc->sc_nrepid; repid++) sc->sc_subdevs[repid] = device_private(dev); @@ -237,8 +239,10 @@ ihidev_attach(device_t parent, device_t self, void *aux) iha.reportid = repid; locs[IHIDBUSCF_REPORTID] = repid; - dev = config_found_sm_loc(self, "ihidbus", locs, - &iha, ihidev_print, ihidev_submatch); + dev = config_found(self, &iha, ihidev_print, + CFARG_SUBMATCH, ihidev_submatch, + CFARG_LOCATORS, locs, + CFARG_EOL); sc->sc_subdevs[repid] = device_private(dev); } diff --git a/sys/dev/i2c/motoi2c.c b/sys/dev/i2c/motoi2c.c index be70a0fe35c..e58a04c8704 100644 --- a/sys/dev/i2c/motoi2c.c +++ b/sys/dev/i2c/motoi2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: motoi2c.c,v 1.10 2021/01/25 12:08:47 jmcneill Exp $ */ +/* $NetBSD: motoi2c.c,v 1.11 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: motoi2c.c,v 1.10 2021/01/25 12:08:47 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: motoi2c.c,v 1.11 2021/04/24 23:36:54 thorpej Exp $"); #if defined(__arm__) || defined(__aarch64__) #include "opt_fdt.h" @@ -134,7 +134,9 @@ motoi2c_attach_common(device_t self, struct motoi2c_softc *sc, iicbus_print); } else #endif - config_found_ia(self, "i2cbus", &iba, iicbus_print); + config_found(self, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); } static int diff --git a/sys/dev/i2c/rkpmic.c b/sys/dev/i2c/rkpmic.c index 5957a8f464e..82f3ced0fb9 100644 --- a/sys/dev/i2c/rkpmic.c +++ b/sys/dev/i2c/rkpmic.c @@ -1,4 +1,4 @@ -/* $NetBSD: rkpmic.c,v 1.12 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: rkpmic.c,v 1.13 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rkpmic.c,v 1.12 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rkpmic.c,v 1.13 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -525,7 +525,7 @@ rkpmic_attach(device_t parent, device_t self, void *aux) continue; raa.reg_ctrl = &sc->sc_conf->ctrl[n]; raa.reg_phandle = child; - config_found(self, &raa, NULL); + config_found(self, &raa, NULL, CFARG_EOL); } } diff --git a/sys/dev/i2c/tcakp.c b/sys/dev/i2c/tcakp.c index 5dfcd98ef4c..4e7e386f8f7 100644 --- a/sys/dev/i2c/tcakp.c +++ b/sys/dev/i2c/tcakp.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcakp.c,v 1.15 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: tcakp.c,v 1.16 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca> @@ -29,7 +29,7 @@ #include "opt_fdt.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcakp.c,v 1.15 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcakp.c,v 1.16 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -416,7 +416,7 @@ tcakp_attach(device_t parent, device_t self, void *aux) a.accessops = &tcakp_accessops; a.accesscookie = sc; - sc->sc_wskbddev = config_found_ia(self, "wskbddev", &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); } static int diff --git a/sys/dev/i2c/tps65217pmic.c b/sys/dev/i2c/tps65217pmic.c index 1de9f133ad2..8de28c541fd 100644 --- a/sys/dev/i2c/tps65217pmic.c +++ b/sys/dev/i2c/tps65217pmic.c @@ -1,4 +1,4 @@ -/* $NetBSD: tps65217pmic.c,v 1.18 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: tps65217pmic.c,v 1.19 2021/04/24 23:36:54 thorpej Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include "opt_fdt.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.18 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.19 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -962,7 +962,7 @@ tps65217pmic_regulator_attach(struct tps65217pmic_softc *sc) raa.reg_param = param; raa.reg_phandle = child; - config_found(sc->sc_dev, &raa, NULL); + config_found(sc->sc_dev, &raa, NULL, CFARG_EOL); } } diff --git a/sys/dev/i2c/w83795g.c b/sys/dev/i2c/w83795g.c index 9fb52276986..005c046454b 100644 --- a/sys/dev/i2c/w83795g.c +++ b/sys/dev/i2c/w83795g.c @@ -1,4 +1,4 @@ -/* $NetBSD: w83795g.c,v 1.3 2018/06/16 21:22:13 thorpej Exp $ */ +/* $NetBSD: w83795g.c,v 1.4 2021/04/24 23:36:54 thorpej Exp $ */ /* * Copyright (c) 2013 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: w83795g.c,v 1.3 2018/06/16 21:22:13 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: w83795g.c,v 1.4 2021/04/24 23:36:54 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -263,7 +263,7 @@ w83795g_attach(device_t parent, device_t self, void *aux) if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - config_found(self, &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, CFARG_EOL); } static void diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c index 8472aa0fd77..1be4d4e477a 100644 --- a/sys/dev/i2o/iop.c +++ b/sys/dev/i2o/iop.c @@ -1,4 +1,4 @@ -/* $NetBSD: iop.c,v 1.90 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: iop.c,v 1.91 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.90 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.91 2021/04/24 23:36:55 thorpej Exp $"); #include "iop.h" @@ -583,8 +583,10 @@ iop_config_interrupts(device_t self) ia.ia_class = I2O_CLASS_ANY; ia.ia_tid = I2O_TID_IOP; locs[IOPCF_TID] = I2O_TID_IOP; - config_found_sm_loc(self, "iop", locs, &ia, iop_print, - config_stdsubmatch); + config_found(self, &ia, iop_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); /* * Start device configuration. @@ -814,8 +816,10 @@ iop_configure_devices(struct iop_softc *sc, int mask, int maskval) locs[IOPCF_TID] = ia.ia_tid; - dv = config_found_sm_loc(sc->sc_dev, "iop", locs, &ia, - iop_print, config_stdsubmatch); + dv = config_found(sc->sc_dev, &ia, iop_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); if (dv != NULL) { sc->sc_tidmap[i].it_flags |= IT_CONFIGURED; strcpy(sc->sc_tidmap[i].it_dvname, device_xname(dv)); diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c index 7fb44168d3c..963e6f5e207 100644 --- a/sys/dev/i2o/iopsp.c +++ b/sys/dev/i2o/iopsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopsp.c,v 1.38 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: iopsp.c,v 1.39 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.38 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.39 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -199,7 +199,7 @@ iopsp_attach(device_t parent, device_t self, void *aux) aprint_error_dev(sc->sc_dev, "configure failed\n"); goto bad; } - config_found(self, &sc->sc_channel, scsiprint); + config_found(self, &sc->sc_channel, scsiprint, CFARG_EOL); return; bad: diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index 790eb250a5e..76821acedbc 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $NetBSD: aac.c,v 1.47 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: aac.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.47 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -210,8 +210,10 @@ aac_devscan(struct aac_softc *sc) locs[AACCF_UNIT] = i; - config_found_sm_loc(sc->sc_dv, "aac", locs, &aaca, - aac_print, config_stdsubmatch); + config_found(sc->sc_dv, &aaca, aac_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } return 0; } diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index 84e87cee00f..e6a55a92c5d 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $NetBSD: adv.c,v 1.50 2019/12/15 16:48:27 tsutsui Exp $ */ +/* $NetBSD: adv.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $ */ /* * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.50 2019/12/15 16:48:27 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -487,7 +487,7 @@ adv_attach(ASC_SOFTC *sc) adapt->adapt_openings = i; adapt->adapt_max_periph = adapt->adapt_openings; - sc->sc_child = config_found(sc->sc_dev, chan, scsiprint); + sc->sc_child = config_found(sc->sc_dev, chan, scsiprint, CFARG_EOL); } int diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 47a5c3098c3..1f70003d59b 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $NetBSD: adw.c,v 1.56 2019/12/15 16:48:27 tsutsui Exp $ */ +/* $NetBSD: adw.c,v 1.57 2021/04/24 23:36:55 thorpej Exp $ */ /* * Generic driver for the Advanced Systems Inc. SCSI controllers @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.56 2019/12/15 16:48:27 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.57 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -516,7 +516,7 @@ adw_attach(ADW_SOFTC *sc) chan->chan_nluns = 8; chan->chan_id = sc->chip_scsi_id; - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } diff --git a/sys/dev/ic/aha.c b/sys/dev/ic/aha.c index eac106659bd..bed70b8bb22 100644 --- a/sys/dev/ic/aha.c +++ b/sys/dev/ic/aha.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha.c,v 1.63 2016/07/14 04:19:27 msaitoh Exp $ */ +/* $NetBSD: aha.c,v 1.64 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.63 2016/07/14 04:19:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.64 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -278,7 +278,7 @@ aha_attach(struct aha_softc *sc, struct aha_probe_data *apd) /* * ask the adapter what subunits are present */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } static void diff --git a/sys/dev/ic/ahcisata_core.c b/sys/dev/ic/ahcisata_core.c index f959c7d175e..c0919f5c130 100644 --- a/sys/dev/ic/ahcisata_core.c +++ b/sys/dev/ic/ahcisata_core.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.97 2021/03/04 07:29:40 skrll Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.98 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.97 2021/03/04 07:29:40 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.98 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/types.h> #include <sys/malloc.h> @@ -1804,8 +1804,9 @@ ahci_atapibus_attach(struct atabus_softc * ata_sc) chan->chan_max_periph = 1; chan->chan_ntargets = 1; chan->chan_nluns = 1; - chp->atapibus = config_found_ia(ata_sc->sc_dev, "atapi", chan, - atapiprint); + chp->atapibus = config_found(ata_sc->sc_dev, chan, atapiprint, + CFARG_IATTR, "atapi", + CFARG_EOL); } static void diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index 2f2a19dc68b..e40c43afec9 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic6360.c,v 1.102 2018/09/03 16:29:31 riastradh Exp $ */ +/* $NetBSD: aic6360.c,v 1.103 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Charles M. Hannum. All rights reserved. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.102 2018/09/03 16:29:31 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.103 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -293,7 +293,8 @@ aicattach(struct aic_softc *sc) /* * Ask the adapter what subunits are present */ - sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint, + CFARG_EOL); scsipi_adapter_delref(adapt); } diff --git a/sys/dev/ic/aic79xx_osm.c b/sys/dev/ic/aic79xx_osm.c index 63f049bb477..1c7e776edd0 100644 --- a/sys/dev/ic/aic79xx_osm.c +++ b/sys/dev/ic/aic79xx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx_osm.c,v 1.34 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: aic79xx_osm.c,v 1.35 2021/04/24 23:36:55 thorpej Exp $ */ /* * Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.34 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.35 2021/04/24 23:36:55 thorpej Exp $"); #include <dev/ic/aic79xx_osm.h> #include <dev/ic/aic79xx_inline.h> @@ -100,7 +100,8 @@ ahd_attach(struct ahd_softc *ahd) ahd->sc_channel.chan_id = ahd->our_id; ahd->sc_channel.chan_flags |= SCSIPI_CHAN_CANGROW; - ahd->sc_child = config_found(ahd->sc_dev, &ahd->sc_channel, scsiprint); + ahd->sc_child = config_found(ahd->sc_dev, &ahd->sc_channel, scsiprint, + CFARG_EOL); ahd_intr_enable(ahd, TRUE); diff --git a/sys/dev/ic/aic7xxx_osm.c b/sys/dev/ic/aic7xxx_osm.c index 205c65ba9eb..5a234639a7a 100644 --- a/sys/dev/ic/aic7xxx_osm.c +++ b/sys/dev/ic/aic7xxx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_osm.c,v 1.39 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: aic7xxx_osm.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $ */ /* * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.39 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $"); #include <dev/ic/aic7xxx_osm.h> #include <dev/ic/aic7xxx_inline.h> @@ -110,16 +110,16 @@ ahc_attach(struct ahc_softc *ahc) if ((ahc->flags & AHC_PRIMARY_CHANNEL) == 0) { ahc->sc_child = config_found(ahc->sc_dev, - &ahc->sc_channel, scsiprint); + &ahc->sc_channel, scsiprint, CFARG_EOL); if (ahc->features & AHC_TWIN) ahc->sc_child_b = config_found(ahc->sc_dev, - &ahc->sc_channel_b, scsiprint); + &ahc->sc_channel_b, scsiprint, CFARG_EOL); } else { if (ahc->features & AHC_TWIN) ahc->sc_child = config_found(ahc->sc_dev, - &ahc->sc_channel_b, scsiprint); + &ahc->sc_channel_b, scsiprint, CFARG_EOL); ahc->sc_child_b = config_found(ahc->sc_dev, - &ahc->sc_channel, scsiprint); + &ahc->sc_channel, scsiprint, CFARG_EOL); } ahc_intr_enable(ahc, TRUE); diff --git a/sys/dev/ic/apple_smc.c b/sys/dev/ic/apple_smc.c index 1b99962243c..70c676ad769 100644 --- a/sys/dev/ic/apple_smc.c +++ b/sys/dev/ic/apple_smc.c @@ -1,4 +1,4 @@ -/* $NetBSD: apple_smc.c,v 1.6 2014/04/25 23:54:59 riastradh Exp $ */ +/* $NetBSD: apple_smc.c,v 1.7 2021/04/24 23:36:55 thorpej Exp $ */ /* * Apple System Management Controller @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6 2014/04/25 23:54:59 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.7 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -81,7 +81,7 @@ apple_smc_attach(struct apple_smc_tag *smc) #endif /* Attach any children. */ - (void)apple_smc_rescan(smc, APPLE_SMC_BUS, NULL); + (void)apple_smc_rescan(smc, NULL, NULL); } int @@ -108,8 +108,9 @@ apple_smc_rescan(struct apple_smc_tag *smc, const char *ifattr, { /* Let autoconf(9) do the work of finding new children. */ - (void)config_search_loc(&apple_smc_search, smc->smc_dev, APPLE_SMC_BUS, - locators, smc); + config_search(smc->smc_dev, smc, + CFARG_SEARCH, apple_smc_search, + CFARG_EOL); return 0; } @@ -144,12 +145,14 @@ apple_smc_search(device_t parent, cfdata_t cf, const int *locators, void *aux) return 0; /* If this device doesn't match, don't attach it. */ - if (!config_match(parent, cf, aux)) + if (!config_probe(parent, cf, aux)) return 0; /* Looks hunky-dory. Attach. */ asa.asa_smc = smc; - (void)config_attach_loc(parent, cf, locators, &asa, NULL); + config_attach(parent, cf, &asa, NULL, + CFARG_LOCATORS, locators, + CFARG_EOL); return 0; } diff --git a/sys/dev/ic/atppc.c b/sys/dev/ic/atppc.c index 016d2261342..b49f439d6f5 100644 --- a/sys/dev/ic/atppc.c +++ b/sys/dev/ic/atppc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc.c,v 1.37 2020/11/16 00:12:13 msaitoh Exp $ */ +/* $NetBSD: atppc.c,v 1.38 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.37 2020/11/16 00:12:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.38 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_atppc.h" @@ -235,7 +235,7 @@ atppc_sc_attach(struct atppc_softc *lsc) /* Configure child of the device. */ lsc->child = config_found(lsc->sc_dev, &(sc_parport_adapter), - atppc_print); + atppc_print, CFARG_EOL); return; } diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index eeec909dcc7..33391956fb7 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $ */ +/* $NetBSD: bha.c,v 1.78 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.78 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -200,7 +200,7 @@ bha_attach(struct bha_softc *sc) if (bha_init(sc) != 0) return; - (void) config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + (void) config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index bd3fdf80706..1b6c5e5b4c5 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $NetBSD: cac.c,v 1.61 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: cac.c,v 1.62 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.61 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.62 2021/04/24 23:36:55 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "bio.h" @@ -194,7 +194,7 @@ cac_init(struct cac_softc *sc, const char *intrstr, int startfw) /* Attach our units */ sc->sc_unitmask = 0; - cac_rescan(sc->sc_dev, "cac", 0); + cac_rescan(sc->sc_dev, NULL, NULL); /* Set our `shutdownhook' before we start any device activity. */ if (cac_sdh == NULL) @@ -217,11 +217,11 @@ cac_init(struct cac_softc *sc, const char *intrstr, int startfw) } int -cac_rescan(device_t self, const char *attr, const int *flags) +cac_rescan(device_t self, const char *attr, const int *locs) { struct cac_softc *sc; struct cac_attach_args caca; - int locs[CACCF_NLOCS]; + int mlocs[CACCF_NLOCS]; int i; sc = device_private(self); @@ -230,10 +230,12 @@ cac_rescan(device_t self, const char *attr, const int *flags) continue; caca.caca_unit = i; - locs[CACCF_UNIT] = i; + mlocs[CACCF_UNIT] = i; - if (config_found_sm_loc(self, attr, locs, &caca, cac_print, - config_stdsubmatch)) + if (config_found(self, &caca, cac_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, mlocs, + CFARG_EOL) != NULL) sc->sc_unitmask |= 1 << i; } return 0; diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index d02954a9cb5..8a42db15e75 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.50 2020/07/16 14:39:33 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.50 2020/07/16 14:39:33 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $"); #include "bio.h" @@ -472,7 +472,7 @@ ciss_attach(struct ciss_softc *sc) sc->sc_adapter.adapt_minphys = cissminphys; sc->sc_adapter.adapt_ioctl = ciss_scsi_ioctl; sc->sc_adapter.adapt_nchannels = 1; - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); #if 0 sc->sc_link_raw.adapter_softc = sc; @@ -480,7 +480,7 @@ ciss_attach(struct ciss_softc *sc) sc->sc_link_raw.adapter = &ciss_raw_switch; sc->sc_link_raw.adapter_target = sc->ndrives; sc->sc_link_raw.adapter_buswidth = sc->ndrives; - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); #endif #if NBIO > 0 diff --git a/sys/dev/ic/cpc700.c b/sys/dev/ic/cpc700.c index a3b71a7986c..28347ac15e5 100644 --- a/sys/dev/ic/cpc700.c +++ b/sys/dev/ic/cpc700.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpc700.c,v 1.21 2020/07/07 03:38:49 thorpej Exp $ */ +/* $NetBSD: cpc700.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpc700.c,v 1.21 2020/07/07 03:38:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpc700.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $"); #include "pci.h" #include "opt_pci.h" @@ -170,8 +170,10 @@ cpc_attach(device_t self, pci_chipset_tag_t pc, bus_space_tag_t mem, aa.cba.cpca_name = devs[i].name; aa.cba.cpca_addr = devs[i].addr; aa.cba.cpca_irq = devs[i].irq; - config_found_sm_loc(self, "cpcbus", NULL, &aa.cba, - cpc_print, cpc_submatch); + config_found(self, &aa.cba, cpc_print, + CFARG_SUBMATCH, cpc_submatch, + CFARG_IATTR, "cpcbus", + CFARG_EOL); } tag = pci_make_tag(pc, 0, 0, 0); @@ -206,7 +208,9 @@ cpc_attach(device_t self, pci_chipset_tag_t pc, bus_space_tag_t mem, pci_configure_bus(0, pcires, 0, 32); #endif - config_found_ia(self, "pcibus", &aa.pba, pcibusprint); + config_found(self, &aa.pba, pcibusprint, + CFARG_IATTR, "pcibus", + CFARG_EOL); /* Restore error triggers, and clear errors */ pci_conf_write(pc, tag, CPC_PCI_BRDGERR, erren | CPC_PCI_CLEARERR); diff --git a/sys/dev/ic/ct65550.c b/sys/dev/ic/ct65550.c index 5d983150fe7..0afaf0e34d5 100644 --- a/sys/dev/ic/ct65550.c +++ b/sys/dev/ic/ct65550.c @@ -1,4 +1,4 @@ -/* $NetBSD: ct65550.c,v 1.13 2017/02/03 20:09:49 macallan Exp $ */ +/* $NetBSD: ct65550.c,v 1.14 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2006 Michael Lorenz @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.13 2017/02/03 20:09:49 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.14 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -307,7 +307,7 @@ chipsfb_do_attach(struct chipsfb_softc *sc) aa.accessops = &chipsfb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } static int diff --git a/sys/dev/ic/depca.c b/sys/dev/ic/depca.c index d13d3cf53be..f93e9a286d7 100644 --- a/sys/dev/ic/depca.c +++ b/sys/dev/ic/depca.c @@ -1,4 +1,4 @@ -/* $NetBSD: depca.c,v 1.17 2008/04/28 20:23:49 martin Exp $ */ +/* $NetBSD: depca.c,v 1.18 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: depca.c,v 1.17 2008/04/28 20:23:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: depca.c,v 1.18 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -121,7 +121,7 @@ depca_attach(struct depca_softc *sc) da.da_name = "le"; - (void)config_found(sc->sc_dev, &da, depca_print); + (void)config_found(sc->sc_dev, &da, depca_print, CFARG_EOL); } int diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c index b1f219557a2..7bcd46201d8 100644 --- a/sys/dev/ic/dpt.c +++ b/sys/dev/ic/dpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpt.c,v 1.75 2018/09/03 16:29:31 riastradh Exp $ */ +/* $NetBSD: dpt.c,v 1.76 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.75 2018/09/03 16:29:31 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.76 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -491,7 +491,7 @@ dpt_init(struct dpt_softc *sc, const char *intrstr) chan->chan_ntargets = maxtarget + 1; chan->chan_nluns = ec->ec_maxlun + 1; chan->chan_id = sc->sc_hbaid[i]; - config_found(sc->sc_dev, chan, scsiprint); + config_found(sc->sc_dev, chan, scsiprint, CFARG_EOL); } } diff --git a/sys/dev/ic/dwc_mmc.c b/sys/dev/ic/dwc_mmc.c index a8391cfda81..df6de62267a 100644 --- a/sys/dev/ic/dwc_mmc.c +++ b/sys/dev/ic/dwc_mmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_mmc.c,v 1.26 2020/03/20 17:20:30 skrll Exp $ */ +/* $NetBSD: dwc_mmc.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.26 2020/03/20 17:20:30 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -192,7 +192,7 @@ dwc_mmc_attach_i(device_t self) if (sc->sc_card_detect) saa.saa_caps |= SMC_CAPS_POLL_CARD_DET; - sc->sc_sdmmc_dev = config_found(self, &saa, NULL); + sc->sc_sdmmc_dev = config_found(self, &saa, NULL, CFARG_EOL); } static void diff --git a/sys/dev/ic/esiop.c b/sys/dev/ic/esiop.c index b5242d7a0d7..7b0c0bb8c23 100644 --- a/sys/dev/ic/esiop.c +++ b/sys/dev/ic/esiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: esiop.c,v 1.57 2013/11/02 13:59:14 gson Exp $ */ +/* $NetBSD: esiop.c,v 1.58 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2002 Manuel Bouyer. @@ -28,7 +28,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.57 2013/11/02 13:59:14 gson Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.58 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -196,7 +196,7 @@ esiop_attach(struct esiop_softc *sc) esiop_dump_script(sc); #endif - config_found(sc->sc_c.sc_dev, &sc->sc_c.sc_chan, scsiprint); + config_found(sc->sc_c.sc_dev, &sc->sc_c.sc_chan, scsiprint, CFARG_EOL); } void diff --git a/sys/dev/ic/gcscpcib.c b/sys/dev/ic/gcscpcib.c index 1a12557b1cb..c68d5731562 100644 --- a/sys/dev/ic/gcscpcib.c +++ b/sys/dev/ic/gcscpcib.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcscpcib.c,v 1.3 2012/03/02 12:56:51 nonaka Exp $ */ +/* $NetBSD: gcscpcib.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: gcscpcib.c,v 1.6 2007/11/17 17:02:47 mbalmer Exp $ */ /* @@ -24,7 +24,7 @@ * AMD CS5535/CS5536 series LPC bridge also containing timer, watchdog and GPIO. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gcscpcib.c,v 1.3 2012/03/02 12:56:51 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gcscpcib.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $"); #include "gpio.h" @@ -190,7 +190,9 @@ gpio: #if NGPIO > 0 /* Attach GPIO framework */ if (gpio) - config_found_ia(self, "gpiobus", &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, + CFARG_IATTR, "gpiobus", + CFARG_EOL); #endif /* Register Watchdog timer to SMW */ diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c index 50a7c3e6fb0..6122649170b 100644 --- a/sys/dev/ic/i82365.c +++ b/sys/dev/ic/i82365.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82365.c,v 1.116 2013/10/13 06:55:34 riz Exp $ */ +/* $NetBSD: i82365.c,v 1.117 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2004 Charles M. Hannum. All rights reserved. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.116 2013/10/13 06:55:34 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.117 2021/04/24 23:36:55 thorpej Exp $"); #define PCICDEBUG @@ -411,8 +411,10 @@ pcic_attach_socket(struct pcic_handle *h) locs[PCMCIABUSCF_CONTROLLER] = h->chip; locs[PCMCIABUSCF_SOCKET] = h->socket; - h->pcmcia = config_found_sm_loc(sc->dev, "pcmciabus", locs, &paa, - pcic_print, config_stdsubmatch); + h->pcmcia = config_found(sc->dev, &paa, pcic_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); if (h->pcmcia == NULL) { h->flags &= ~PCIC_FLAG_SOCKETP; return; diff --git a/sys/dev/ic/icp.c b/sys/dev/ic/icp.c index d9aa6d87fba..de45f4c242b 100644 --- a/sys/dev/ic/icp.c +++ b/sys/dev/ic/icp.c @@ -1,4 +1,4 @@ -/* $NetBSD: icp.c,v 1.34 2020/08/14 09:26:40 chs Exp $ */ +/* $NetBSD: icp.c,v 1.35 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.34 2020/08/14 09:26:40 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.35 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -365,8 +365,10 @@ icp_init(struct icp_softc *icp, const char *intrstr) locs[ICPCF_UNIT] = j + ICPA_UNIT_SCSI; icp->icp_children[icpa.icpa_unit] = - config_found_sm_loc(icp->icp_dv, "icp", locs, - &icpa, icp_print, config_stdsubmatch); + config_found(icp->icp_dv, &icpa, icp_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } @@ -383,8 +385,10 @@ icp_init(struct icp_softc *icp, const char *intrstr) locs[ICPCF_UNIT] = j; icp->icp_children[icpa.icpa_unit] = - config_found_sm_loc(icp->icp_dv, "icp", locs, - &icpa, icp_print, config_stdsubmatch); + config_found(icp->icp_dv, &icpa, icp_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } @@ -508,8 +512,11 @@ icp_rescan(struct icp_softc *icp, int unit) locs[ICPCF_UNIT] = unit; - icp->icp_children[unit] = config_found_sm_loc(icp->icp_dv, - "icp", locs, &icpa, icp_print, config_stdsubmatch); + icp->icp_children[unit] = + config_found(icp->icp_dv, &icpa, icp_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } icp_recompute_openings(icp); diff --git a/sys/dev/ic/icpsp.c b/sys/dev/ic/icpsp.c index f7f0ff311f7..25e8568b82b 100644 --- a/sys/dev/ic/icpsp.c +++ b/sys/dev/ic/icpsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: icpsp.c,v 1.26 2014/03/07 13:19:26 skrll Exp $ */ +/* $NetBSD: icpsp.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icpsp.c,v 1.26 2014/03/07 13:19:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icpsp.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -123,7 +123,7 @@ icpsp_attach(device_t parent, device_t self, void *aux) sc->sc_channel.chan_id = icp->icp_bus_id[sc->sc_busno]; sc->sc_channel.chan_flags = SCSIPI_CHAN_NOSETTLE; - config_found(self, &sc->sc_channel, scsiprint); + config_found(self, &sc->sc_channel, scsiprint, CFARG_EOL); } void diff --git a/sys/dev/ic/igsfb.c b/sys/dev/ic/igsfb.c index ef404fd2ab2..994150cc24e 100644 --- a/sys/dev/ic/igsfb.c +++ b/sys/dev/ic/igsfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: igsfb.c,v 1.58 2018/03/14 18:58:32 maya Exp $ */ +/* $NetBSD: igsfb.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2002, 2003 Valeriy E. Ushakov @@ -31,7 +31,7 @@ * Integraphics Systems IGA 168x and CyberPro series. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.58 2018/03/14 18:58:32 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -215,7 +215,7 @@ igsfb_attach_subr(struct igsfb_softc *sc, int isconsole) waa.accessops = &igsfb_accessops; waa.accesscookie = &dc->dc_vd; - config_found(sc->sc_dev, &waa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &waa, wsemuldisplaydevprint, CFARG_EOL); } diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c index 499b89af4d6..2501e26e3a7 100644 --- a/sys/dev/ic/iha.c +++ b/sys/dev/ic/iha.c @@ -1,4 +1,4 @@ -/* $NetBSD: iha.c,v 1.43 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: iha.c,v 1.44 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2001, 2002 Izumi Tsutsui @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.43 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.44 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -615,7 +615,7 @@ iha_attach(struct iha_softc *sc) /* * Now try to attach all the sub devices. */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/ic/isp_netbsd.c b/sys/dev/ic/isp_netbsd.c index 62f923a4eb5..bfba9b68928 100644 --- a/sys/dev/ic/isp_netbsd.c +++ b/sys/dev/ic/isp_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: isp_netbsd.c,v 1.96 2020/12/05 17:33:53 thorpej Exp $ */ +/* $NetBSD: isp_netbsd.c,v 1.97 2021/04/24 23:36:55 thorpej Exp $ */ /* * Platform (NetBSD) dependent common attachment code for Qlogic adapters. */ @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.96 2020/12/05 17:33:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.97 2021/04/24 23:36:55 thorpej Exp $"); #include <dev/ic/isp_netbsd.h> #include <dev/ic/isp_ioctl.h> @@ -177,7 +177,8 @@ isp_config_interrupts(device_t self) * And attach children (if any). */ for (i = 0; i < isp->isp_osinfo.adapter.adapt_nchannels; i++) { - config_found(self, &isp->isp_osinfo.chan[i], scsiprint); + config_found(self, &isp->isp_osinfo.chan[i], scsiprint, + CFARG_EOL); } } diff --git a/sys/dev/ic/mb89352.c b/sys/dev/ic/mb89352.c index 071dee6a6ce..9e0524b1d04 100644 --- a/sys/dev/ic/mb89352.c +++ b/sys/dev/ic/mb89352.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb89352.c,v 1.58 2021/03/06 05:37:18 tsutsui Exp $ */ +/* $NetBSD: mb89352.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ /*- @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.58 2021/03/06 05:37:18 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $"); #ifdef DDB #define integrate @@ -305,7 +305,7 @@ spc_attach(struct spc_softc *sc) /* * ask the adapter what subunits are present */ - sc->sc_child = config_found(sc->sc_dev, chan, scsiprint); + sc->sc_child = config_found(sc->sc_dev, chan, scsiprint, CFARG_EOL); scsipi_adapter_delref(adapt); } diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 824b9f03c7b..8169d720455 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.63 2020/01/07 06:12:09 maxv Exp $ */ +/* $NetBSD: mfi.c,v 1.64 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63 2020/01/07 06:12:09 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.64 2021/04/24 23:36:55 thorpej Exp $"); #include "bio.h" @@ -909,8 +909,7 @@ mfi_rescan(device_t self, const char *ifattr, const int *locators) if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found_sm_loc(self, ifattr, locators, &sc->sc_chan, - scsiprint, NULL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; } @@ -1246,7 +1245,7 @@ mfi_attach(struct mfi_softc *sc, enum mfi_iop iop) chan->chan_ntargets = MFI_MAX_LD; chan->chan_id = MFI_MAX_LD; - mfi_rescan(sc->sc_dev, "scsi", NULL); + mfi_rescan(sc->sc_dev, NULL, NULL); /* enable interrupts */ mfi_intr_enable(sc); diff --git a/sys/dev/ic/mlx.c b/sys/dev/ic/mlx.c index 51722287460..e0e9f6cf066 100644 --- a/sys/dev/ic/mlx.c +++ b/sys/dev/ic/mlx.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlx.c,v 1.68 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: mlx.c,v 1.69 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.68 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.69 2021/04/24 23:36:55 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "ld.h" @@ -627,8 +627,10 @@ mlx_configure(struct mlx_softc *mlx, int waitok) locs[MLXCF_UNIT] = i; - ms->ms_dv = config_found_sm_loc(mlx->mlx_dv, "mlx", locs, - &mlxa, mlx_print, config_stdsubmatch); + ms->ms_dv = config_found(mlx->mlx_dv, &mlxa, mlx_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); nunits += (ms->ms_dv != NULL); } diff --git a/sys/dev/ic/mpt_netbsd.c b/sys/dev/ic/mpt_netbsd.c index fd099b6ae82..e4dcb4b5428 100644 --- a/sys/dev/ic/mpt_netbsd.c +++ b/sys/dev/ic/mpt_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.37 2020/09/15 17:21:39 mlelstv Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.38 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.37 2020/09/15 17:21:39 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.38 2021/04/24 23:36:55 thorpej Exp $"); #include "bio.h" @@ -158,7 +158,7 @@ mpt_scsipi_attach(mpt_softc_t *mpt) * errors */ mpt->sc_scsibus_dv = config_found(mpt->sc_dev, &mpt->sc_channel, - scsiprint); + scsiprint, CFARG_EOL); #if NBIO > 0 if (mpt_is_raid(mpt)) { diff --git a/sys/dev/ic/mvsata.c b/sys/dev/ic/mvsata.c index 61979df6efd..6d9bb10be00 100644 --- a/sys/dev/ic/mvsata.c +++ b/sys/dev/ic/mvsata.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvsata.c,v 1.58 2020/12/25 12:33:03 skrll Exp $ */ +/* $NetBSD: mvsata.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.58 2020/12/25 12:33:03 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.59 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_mvsata.h" @@ -741,8 +741,9 @@ mvsata_atapibus_attach(struct atabus_softc *ata_sc) chan->chan_ntargets = 1; chan->chan_nluns = 1; - chp->atapibus = - config_found_ia(ata_sc->sc_dev, "atapi", chan, atapiprint); + chp->atapibus = config_found(ata_sc->sc_dev, chan, atapiprint, + CFARG_IATTR, "atapi", + CFARG_EOL); } static void diff --git a/sys/dev/ic/ncr5380sbc.c b/sys/dev/ic/ncr5380sbc.c index 998ca2a6cbd..b177daa70b3 100644 --- a/sys/dev/ic/ncr5380sbc.c +++ b/sys/dev/ic/ncr5380sbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380sbc.c,v 1.67 2017/01/11 07:16:48 skrll Exp $ */ +/* $NetBSD: ncr5380sbc.c,v 1.68 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.67 2017/01/11 07:16:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.68 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -2588,7 +2588,7 @@ ncr5380_attach(struct ncr5380_softc *sc) /* * Ask the adapter what subunits are present */ - (void)config_found(sc->sc_dev, chan, scsiprint); + (void)config_found(sc->sc_dev, chan, scsiprint, CFARG_EOL); scsipi_adapter_delref(adapt); } diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 0635d68ceaf..c4af7b7b9a3 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9x.c,v 1.153 2020/04/13 00:27:17 chs Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.154 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.153 2020/04/13 00:27:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.154 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -295,7 +295,8 @@ ncr53c9x_attach(struct ncr53c9x_softc *sc) /* * Now try to attach all the sub-devices */ - sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint, + CFARG_EOL); scsipi_adapter_delref(adapt); callout_reset(&sc->sc_watchdog, 60 * hz, ncr53c9x_watch, sc); diff --git a/sys/dev/ic/ninjascsi32.c b/sys/dev/ic/ninjascsi32.c index 0e0bfb9367b..8115e26354c 100644 --- a/sys/dev/ic/ninjascsi32.c +++ b/sys/dev/ic/ninjascsi32.c @@ -1,4 +1,4 @@ -/* $NetBSD: ninjascsi32.c,v 1.26 2018/03/22 14:07:42 rin Exp $ */ +/* $NetBSD: ninjascsi32.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2004, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.26 2018/03/22 14:07:42 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.27 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -666,7 +666,8 @@ njsc32_attach(struct njsc32_softc *sc) sc->sc_channel.chan_nluns = NJSC32_NLU; sc->sc_channel.chan_id = NJSC32_INITIATOR_ID; - sc->sc_scsi = config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + sc->sc_scsi = config_found(sc->sc_dev, &sc->sc_channel, scsiprint, + CFARG_EOL); } int diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 13e254fb98d..f371baeb0a0 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.54 2020/12/27 16:52:01 jmcneill Exp $ */ +/* $NetBSD: nvme.c,v 1.55 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54 2020/12/27 16:52:01 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.55 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54 2020/12/27 16:52:01 jmcneill Exp $"); #include <dev/ic/nvmeio.h> #include "ioconf.h" +#include "locators.h" #define B4_CHK_RDY_DELAY_MS 2300 /* workaround controller bug */ @@ -447,7 +448,7 @@ nvme_attach(struct nvme_softc *sc) /* probe subdevices */ sc->sc_namespaces = kmem_zalloc(sizeof(*sc->sc_namespaces) * sc->sc_nn, KM_SLEEP); - nvme_rescan(sc->sc_dev, "nvme", &i); + nvme_rescan(sc->sc_dev, NULL, NULL); return 0; @@ -467,7 +468,7 @@ free_admin_q: } int -nvme_rescan(device_t self, const char *attr, const int *flags) +nvme_rescan(device_t self, const char *ifattr, const int *locs) { struct nvme_softc *sc = device_private(self); struct nvme_attach_args naa; @@ -475,7 +476,7 @@ nvme_rescan(device_t self, const char *attr, const int *flags) struct nvme_namespace *ns; uint64_t cap; int ioq_entries = nvme_ioq_size; - int i; + int i, mlocs[NVMECF_NLOCS]; int error; cap = nvme_read8(sc, NVME_CAP); @@ -511,13 +512,18 @@ nvme_rescan(device_t self, const char *attr, const int *flags) continue; } + mlocs[NVMECF_NSID] = i; + memset(&naa, 0, sizeof(naa)); naa.naa_nsid = i; naa.naa_qentries = (ioq_entries - 1) * sc->sc_nq; naa.naa_maxphys = sc->sc_mdts; naa.naa_typename = sc->sc_modelname; - sc->sc_namespaces[i - 1].dev = config_found(sc->sc_dev, &naa, - nvme_print); + sc->sc_namespaces[i - 1].dev = + config_found(sc->sc_dev, &naa, nvme_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, mlocs, + CFARG_EOL); } return 0; } diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index b084e768731..dd97f326fd3 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.16 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: oosiop.c,v 1.17 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.16 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.17 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -240,7 +240,7 @@ oosiop_attach(struct oosiop_softc *sc) /* * Now try to attach all the sub devices. */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } static int diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index cfc10c0f8e3..fc2e8da7d0b 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: osiop.c,v 1.41 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: osiop.c,v 1.42 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. @@ -95,7 +95,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.41 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.42 2021/04/24 23:36:55 thorpej Exp $"); /* #define OSIOP_DEBUG */ @@ -329,7 +329,7 @@ osiop_attach(struct osiop_softc *sc) /* * Now try to attach all the sub devices. */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/ic/pca9564.c b/sys/dev/ic/pca9564.c index 8f5af2e4674..df5762b23fc 100644 --- a/sys/dev/ic/pca9564.c +++ b/sys/dev/ic/pca9564.c @@ -1,4 +1,4 @@ -/* $NetBSD: pca9564.c,v 1.3 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: pca9564.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2010 NONAKA Kimihiro <nonaka@netbsd.org> @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pca9564.c,v 1.3 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pca9564.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -113,7 +113,7 @@ pca9564_attach(struct pca9564_softc *sc) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - (void) config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); } static int diff --git a/sys/dev/ic/pcf8584.c b/sys/dev/ic/pcf8584.c index 15799481452..c6b4b7dab5b 100644 --- a/sys/dev/ic/pcf8584.c +++ b/sys/dev/ic/pcf8584.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcf8584.c,v 1.17 2019/12/23 15:29:36 thorpej Exp $ */ +/* $NetBSD: pcf8584.c,v 1.18 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: pcf8584.c,v 1.9 2007/10/20 18:46:21 kettenis Exp $ */ /* @@ -99,7 +99,7 @@ pcfiic_attach(struct pcfiic_softc *sc, i2c_addr_t addr, u_int8_t clock, bzero(&iba, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - config_found(sc->sc_dev, &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); } int diff --git a/sys/dev/ic/pl061.c b/sys/dev/ic/pl061.c index b3d8d80d2c3..c0ea0e4f805 100644 --- a/sys/dev/ic/pl061.c +++ b/sys/dev/ic/pl061.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl061.c,v 1.2 2018/10/21 18:31:14 jmcneill Exp $ */ +/* $NetBSD: pl061.c,v 1.3 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2018 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pl061.c,v 1.2 2018/10/21 18:31:14 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl061.c,v 1.3 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -76,8 +76,7 @@ plgpio_attach(struct plgpio_softc *sc) gba.gba_npins = 8; #if NGPIO > 0 - (void)config_found_ia(sc->sc_dev, "gpiobus", &gba, - gpiobus_print); + config_found(sc->sc_dev, &gba, gpiobus_print, CFARG_EOL); #endif } diff --git a/sys/dev/ic/pl181.c b/sys/dev/ic/pl181.c index 4083bae4544..d77add18a6e 100644 --- a/sys/dev/ic/pl181.c +++ b/sys/dev/ic/pl181.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl181.c,v 1.7 2019/06/12 10:16:52 skrll Exp $ */ +/* $NetBSD: pl181.c,v 1.8 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.7 2019/06/12 10:16:52 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.8 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -145,7 +145,7 @@ plmmc_init(struct plmmc_softc *sc) sc->sc_max_freq / 1000 : sc->sc_clock_freq / 1000; saa.saa_caps = SMC_CAPS_4BIT_MODE; - sc->sc_sdmmc_dev = config_found(sc->sc_dev, &saa, NULL); + sc->sc_sdmmc_dev = config_found(sc->sc_dev, &saa, NULL, CFARG_EOL); } static int diff --git a/sys/dev/ic/rtsx.c b/sys/dev/ic/rtsx.c index 739db453107..f9a51b1c430 100644 --- a/sys/dev/ic/rtsx.c +++ b/sys/dev/ic/rtsx.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtsx.c,v 1.4 2019/12/19 16:25:13 kamil Exp $ */ +/* $NetBSD: rtsx.c,v 1.5 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: rtsx.c,v 1.10 2014/08/19 17:55:03 phessler Exp $ */ /* @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.4 2019/12/19 16:25:13 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.5 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -239,7 +239,7 @@ rtsx_attach(struct rtsx_softc *sc, bus_space_tag_t iot, saa.saa_clkmax = 25000; saa.saa_caps = SMC_CAPS_DMA|SMC_CAPS_4BIT_MODE; - sc->sc_sdmmc = config_found(sc->sc_dev, &saa, NULL); + sc->sc_sdmmc = config_found(sc->sc_dev, &saa, NULL, CFARG_EOL); if (sc->sc_sdmmc == NULL) goto destroy_dmamap_cmd; diff --git a/sys/dev/ic/siisata.c b/sys/dev/ic/siisata.c index 202b2edb500..eacf3db780c 100644 --- a/sys/dev/ic/siisata.c +++ b/sys/dev/ic/siisata.c @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.46 2021/01/11 16:48:35 skrll Exp $ */ +/* $NetBSD: siisata.c,v 1.47 2021/04/24 23:36:55 thorpej Exp $ */ /* from ahcisata_core.c */ @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.46 2021/01/11 16:48:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.47 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -1545,8 +1545,9 @@ siisata_atapibus_attach(struct atabus_softc *ata_sc) chan->chan_ntargets = 1; chan->chan_nluns = 1; - chp->atapibus = config_found_ia(ata_sc->sc_dev, "atapi", chan, - atapiprint); + chp->atapibus = config_found(ata_sc->sc_dev, chan, atapiprint, + CFARG_IATTR, "atapi", + CFARG_EOL); } void diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 06a7e98f5a5..279710f179f 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.100 2013/11/02 13:59:14 gson Exp $ */ +/* $NetBSD: siop.c,v 1.101 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -28,7 +28,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.100 2013/11/02 13:59:14 gson Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.101 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -173,7 +173,7 @@ siop_attach(struct siop_softc *sc) siop_dump_script(sc); #endif - config_found(sc->sc_c.sc_dev, &sc->sc_c.sc_chan, scsiprint); + config_found(sc->sc_c.sc_dev, &sc->sc_c.sc_chan, scsiprint, CFARG_EOL); } void diff --git a/sys/dev/ic/sl811hs.c b/sys/dev/ic/sl811hs.c index c206742b8c0..64d4dc8f6a3 100644 --- a/sys/dev/ic/sl811hs.c +++ b/sys/dev/ic/sl811hs.c @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hs.c,v 1.104 2020/09/30 05:04:54 simonb Exp $ */ +/* $NetBSD: sl811hs.c,v 1.105 2021/04/24 23:36:55 thorpej Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.104 2020/09/30 05:04:54 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.105 2021/04/24 23:36:55 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_slhci.h" @@ -1271,7 +1271,8 @@ slhci_attach(struct slhci_softc *sc) t->flags |= F_ACTIVE; /* Attach usb and uhub. */ - sc->sc_child = config_found(SC_DEV(sc), &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(SC_DEV(sc), &sc->sc_bus, usbctlprint, + CFARG_EOL); if (!sc->sc_child) return -1; diff --git a/sys/dev/ic/spic.c b/sys/dev/ic/spic.c index 68e3a9f3f1d..826ee3c9e14 100644 --- a/sys/dev/ic/spic.c +++ b/sys/dev/ic/spic.c @@ -1,4 +1,4 @@ -/* $NetBSD: spic.c,v 1.19 2013/10/17 21:24:24 christos Exp $ */ +/* $NetBSD: spic.c,v 1.20 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.19 2013/10/17 21:24:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.20 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -268,7 +268,8 @@ spic_attach(struct spic_softc *sc) a.accessops = &spic_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(sc->sc_dev, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(sc->sc_dev, &a, wsmousedevprint, + CFARG_EOL); sc->sc_smpsw[SPIC_PSWITCH_LID].smpsw_name = "spiclid0"; sc->sc_smpsw[SPIC_PSWITCH_LID].smpsw_type = PSWITCH_TYPE_LID; diff --git a/sys/dev/ic/ssdfb.c b/sys/dev/ic/ssdfb.c index 76289bf9c9d..bee09a95472 100644 --- a/sys/dev/ic/ssdfb.c +++ b/sys/dev/ic/ssdfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ssdfb.c,v 1.12 2020/09/05 16:30:11 riastradh Exp $ */ +/* $NetBSD: ssdfb.c,v 1.13 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.12 2020/09/05 16:30:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.13 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -364,7 +364,7 @@ ssdfb_attach(struct ssdfb_softc *sc, int flags) .accesscookie = sc }; sc->sc_wsdisplay = - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); return; out: diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 0a10cbe17a9..ce424c720ce 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.29 2021/03/14 08:13:58 skrll Exp $ */ +/* $NetBSD: sti.c,v 1.30 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.29 2021/03/14 08:13:58 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.30 2021/04/24 23:36:55 thorpej Exp $"); #include "wsdisplay.h" @@ -766,7 +766,8 @@ sti_end_attach(struct sti_softc *sc) sc->sc_flags |= STI_ATTACHED; } - config_found(sc->sc_dev, &waa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &waa, wsemuldisplaydevprint, + CFARG_EOL); } #endif } diff --git a/sys/dev/ic/sunscpal.c b/sys/dev/ic/sunscpal.c index 7c8a4081707..47f88e94f1c 100644 --- a/sys/dev/ic/sunscpal.c +++ b/sys/dev/ic/sunscpal.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunscpal.c,v 1.27 2017/01/11 07:16:48 skrll Exp $ */ +/* $NetBSD: sunscpal.c,v 1.28 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2001 Matthew Fredette @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunscpal.c,v 1.27 2017/01/11 07:16:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunscpal.c,v 1.28 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -2087,7 +2087,7 @@ sunscpal_attach(struct sunscpal_softc *sc, int options) /* * Ask the adapter what subunits are present */ - (void)config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + (void)config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); scsipi_adapter_delref(&sc->sc_adapter); } diff --git a/sys/dev/ic/tcic2.c b/sys/dev/ic/tcic2.c index eb525fc04ed..0583cd926ff 100644 --- a/sys/dev/ic/tcic2.c +++ b/sys/dev/ic/tcic2.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcic2.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $ */ +/* $NetBSD: tcic2.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1998, 1999 Christoph Badura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.39 2018/09/03 16:29:31 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -416,8 +416,10 @@ tcic_attach_socket(struct tcic_handle *h) locs[PCMCIABUSCF_CONTROLLER] = 0; locs[PCMCIABUSCF_SOCKET] = h->sock; - h->pcmcia = config_found_sm_loc(h->sc->sc_dev, "pcmciabus", locs, &paa, - tcic_print, config_stdsubmatch); + h->pcmcia = config_found(h->sc->sc_dev, &paa, tcic_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); /* if there's actually a pcmcia device attached, initialize the slot */ diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index ea6be7fbef1..59bc2cac348 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $NetBSD: uha.c,v 1.47 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: uha.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uha.c,v 1.47 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uha.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $"); #undef UHADEBUG #ifdef DDB @@ -191,7 +191,7 @@ uha_attach(struct uha_softc *sc, struct uha_probe_data *upd) /* * ask the adapter what subunits are present */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } integrate void diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index 24d92c26def..5c3a6c155c0 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.118 2020/04/24 22:31:35 ad Exp $ */ +/* $NetBSD: vga.c,v 1.119 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.118 2020/04/24 22:31:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.119 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_vga.h" /* for WSCONS_SUPPORT_PCVTFONTS */ @@ -657,7 +657,9 @@ vga_common_attach(struct vga_softc *sc, bus_space_tag_t iot, aa.accessops = &vga_accessops; aa.accesscookie = vc; - config_found_ia(sc->sc_dev, "wsemuldisplaydev", &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); } int diff --git a/sys/dev/ic/vga_raster.c b/sys/dev/ic/vga_raster.c index e5df9b6c9f4..a14ad6f0e36 100644 --- a/sys/dev/ic/vga_raster.c +++ b/sys/dev/ic/vga_raster.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.48 2020/04/24 22:31:36 ad Exp $ */ +/* $NetBSD: vga_raster.c,v 1.49 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.48 2020/04/24 22:31:36 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.49 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_vga.h" #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -548,7 +548,9 @@ vga_common_attach(struct vga_softc *sc, bus_space_tag_t iot, aa.accessops = &vga_raster_accessops; aa.accesscookie = vc; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); } int diff --git a/sys/dev/ic/w83l518d_sdmmc.c b/sys/dev/ic/w83l518d_sdmmc.c index f559cc30206..ab65c0bcffd 100644 --- a/sys/dev/ic/w83l518d_sdmmc.c +++ b/sys/dev/ic/w83l518d_sdmmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: w83l518d_sdmmc.c,v 1.4 2020/05/11 14:55:20 jdc Exp $ */ +/* $NetBSD: w83l518d_sdmmc.c,v 1.5 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2009 Jared D. McNeill <jmcneill@invisible.ca> @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.4 2020/05/11 14:55:20 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.5 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -185,7 +185,7 @@ wb_sdmmc_attach(struct wb_softc *wb) if (!ISSET(wb->wb_quirks, WB_QUIRK_1BIT)) saa.saa_caps = SMC_CAPS_4BIT_MODE; - wb->wb_sdmmc_dev = config_found(wb->wb_dev, &saa, NULL); + wb->wb_sdmmc_dev = config_found(wb->wb_dev, &saa, NULL, CFARG_EOL); } int diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c index 081a5676c84..ab7d28e81c8 100644 --- a/sys/dev/ic/wd33c93.c +++ b/sys/dev/ic/wd33c93.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd33c93.c,v 1.28 2019/02/10 17:13:33 christos Exp $ */ +/* $NetBSD: wd33c93.c,v 1.29 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.28 2019/02/10 17:13:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.29 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -233,7 +233,7 @@ wd33c93_attach(struct wd33c93_softc *sc) } sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, - scsiprint); + scsiprint, CFARG_EOL); scsipi_adapter_delref(&sc->sc_adapter); } diff --git a/sys/dev/ieee1394/files.ieee1394 b/sys/dev/ieee1394/files.ieee1394 index 3f6789a72da..2b875a9ebcc 100644 --- a/sys/dev/ieee1394/files.ieee1394 +++ b/sys/dev/ieee1394/files.ieee1394 @@ -1,4 +1,4 @@ -# $NetBSD: files.ieee1394,v 1.10 2006/04/30 12:11:58 kiyohara Exp $ +# $NetBSD: files.ieee1394,v 1.11 2021/04/24 23:36:55 thorpej Exp $ file dev/ieee1394/fwohci.c fwohci @@ -15,6 +15,6 @@ device fwip: arp, ieee1394, ifnet attach fwip at ieee1394if file dev/ieee1394/if_fwip.c fwip -device sbp { }: scsi +device sbp: scsi attach sbp at ieee1394if file dev/ieee1394/sbp.c sbp diff --git a/sys/dev/ieee1394/firewire.c b/sys/dev/ieee1394/firewire.c index 14db77bb12b..87de4bbdfca 100644 --- a/sys/dev/ieee1394/firewire.c +++ b/sys/dev/ieee1394/firewire.c @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.c,v 1.50 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: firewire.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.50 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.51 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -246,7 +246,7 @@ firewireattach(device_t parent, device_t self, void *aux) faa.name = "fwip"; faa.fc = fc; faa.fwdev = NULL; - devlist->dev = config_found(sc->dev, &faa, firewire_print); + devlist->dev = config_found(sc->dev, &faa, firewire_print, CFARG_EOL); if (devlist->dev == NULL) free(devlist, M_DEVBUF); else @@ -2041,8 +2041,10 @@ fw_attach_dev(struct firewire_comm *fc) fwa.name = fw_get_devclass(fwdev); fwa.fwdev = fwdev; - fwdev->dev = config_found_sm_loc(sc->dev, "ieee1394if", - locs, &fwa, firewire_print, config_stdsubmatch); + fwdev->dev = config_found(sc->dev, &fwa, firewire_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); if (fwdev->dev == NULL) { free(devlist, M_DEVBUF); break; diff --git a/sys/dev/ieee1394/fwohci.c b/sys/dev/ieee1394/fwohci.c index 4c3511f69ec..46d4eb4c1f2 100644 --- a/sys/dev/ieee1394/fwohci.c +++ b/sys/dev/ieee1394/fwohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwohci.c,v 1.144 2019/10/28 18:38:43 joerg Exp $ */ +/* $NetBSD: fwohci.c,v 1.145 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa @@ -37,7 +37,7 @@ * */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.144 2019/10/28 18:38:43 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.145 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -503,7 +503,8 @@ fwohci_attach(struct fwohci_softc *sc) fwohci_reset(sc); sc->fc.bdev = - config_found(sc->fc.dev, __UNCONST("ieee1394if"), fwohci_print); + config_found(sc->fc.dev, __UNCONST("ieee1394if"), fwohci_print, + CFARG_EOL); return 0; } diff --git a/sys/dev/ieee1394/sbp.c b/sys/dev/ieee1394/sbp.c index f8955936412..121c915ffb1 100644 --- a/sys/dev/ieee1394/sbp.c +++ b/sys/dev/ieee1394/sbp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbp.c,v 1.39 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: sbp.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sbp.c,v 1.39 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbp.c,v 1.40 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> @@ -517,7 +517,8 @@ sbpattach(device_t parent, device_t self, void *aux) sc_channel->chan_nluns = target->num_lun; /* We set nluns 0 now */ sc_channel->chan_id = 1; - sc->sc_bus = config_found(sc->sc_fd.dev, sc_channel, scsiprint); + sc->sc_bus = config_found(sc->sc_fd.dev, sc_channel, scsiprint, + CFARG_EOL); if (sc->sc_bus == NULL) { aprint_error_dev(self, "attach failed\n"); return; diff --git a/sys/dev/isa/addcom_isa.c b/sys/dev/isa/addcom_isa.c index 83b675141f1..f5fad7b2d22 100644 --- a/sys/dev/isa/addcom_isa.c +++ b/sys/dev/isa/addcom_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: addcom_isa.c,v 1.21 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: addcom_isa.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2000 Michael Graff. All rights reserved. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: addcom_isa.c,v 1.21 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: addcom_isa.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -224,7 +224,8 @@ addcomattach(device_t parent, device_t self, void *aux) - SLAVE_IOBASE_OFFSET; ca.ca_noien = 0; - sc->sc_slaves[i] = config_found(self, &ca, commultiprint); + sc->sc_slaves[i] = config_found(self, &ca, commultiprint, + CFARG_EOL); if (sc->sc_slaves[i] != NULL) sc->sc_alive |= 1 << i; } diff --git a/sys/dev/isa/ast.c b/sys/dev/isa/ast.c index c20e3aa0f28..4f658ca2add 100644 --- a/sys/dev/isa/ast.c +++ b/sys/dev/isa/ast.c @@ -1,4 +1,4 @@ -/* $NetBSD: ast.c,v 1.66 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: ast.c,v 1.67 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.66 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.67 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -178,7 +178,7 @@ astattach(device_t parent, device_t self, void *aux) ca.ca_iobase = sc->sc_iobase + i * COM_NPORTS; ca.ca_noien = 1; - slave = config_found(self, &ca, commultiprint); + slave = config_found(self, &ca, commultiprint, CFARG_EOL); if (slave != NULL) { sc->sc_alive |= 1 << i; sc->sc_slaves[i] = device_private(slave); diff --git a/sys/dev/isa/boca.c b/sys/dev/isa/boca.c index b878e3ad168..b6b9c63d0f7 100644 --- a/sys/dev/isa/boca.c +++ b/sys/dev/isa/boca.c @@ -1,4 +1,4 @@ -/* $NetBSD: boca.c,v 1.55 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: boca.c,v 1.56 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: boca.c,v 1.55 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: boca.c,v 1.56 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -180,7 +180,8 @@ bocaattach(device_t parent, device_t self, void *aux) ca.ca_iobase = sc->sc_iobase + i * COM_NPORTS; ca.ca_noien = 0; - sc->sc_slaves[i] = config_found(self, &ca, commultiprint); + sc->sc_slaves[i] = config_found(self, &ca, commultiprint, + CFARG_EOL); if (sc->sc_slaves[i] != NULL) sc->sc_alive |= 1 << i; } diff --git a/sys/dev/isa/cec.c b/sys/dev/isa/cec.c index 4f0e930a9c0..06ab52e32cc 100644 --- a/sys/dev/isa/cec.c +++ b/sys/dev/isa/cec.c @@ -1,4 +1,4 @@ -/* $NetBSD: cec.c,v 1.14 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: cec.c,v 1.15 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cec.c,v 1.14 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cec.c,v 1.15 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -232,7 +232,8 @@ cecattach(device_t parent, device_t self, void *aux) ga.ga_ic = &cec_ic; ga.ga_address = sc->sc_myaddr; sc->sc_gpib = - (struct gpib_softc *)config_found(self, &ga, gpibdevprint); + (struct gpib_softc *)config_found(self, &ga, gpibdevprint, + CFARG_EOL); } int diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c index 321d5f2aa2c..7f831686033 100644 --- a/sys/dev/isa/ega.c +++ b/sys/dev/isa/ega.c @@ -1,4 +1,4 @@ -/* $NetBSD: ega.c,v 1.30 2012/10/27 17:18:24 chs Exp $ */ +/* $NetBSD: ega.c,v 1.31 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1999 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ega.c,v 1.30 2012/10/27 17:18:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ega.c,v 1.31 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -520,7 +520,7 @@ ega_attach(device_t parent, device_t self, void *aux) aa.accessops = &ega_accessops; aa.accesscookie = dc; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); } diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c index 7783c17aee2..6567a0125f0 100644 --- a/sys/dev/isa/ess.c +++ b/sys/dev/isa/ess.c @@ -1,4 +1,4 @@ -/* $NetBSD: ess.c,v 1.86 2019/06/08 08:02:38 isaki Exp $ */ +/* $NetBSD: ess.c,v 1.87 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright 1997 @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.86 2019/06/08 08:02:38 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.87 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1045,7 +1045,7 @@ skip: arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(sc->sc_dev, &arg, audioprint); + (void)config_found(sc->sc_dev, &arg, audioprint, CFARG_EOL); #if NJOY_ESS > 0 if (sc->sc_model == ESS_1888 && enablejoy) { @@ -1056,7 +1056,7 @@ skip: ess_write_mix_reg(sc, 0x40, m40); arg.type = AUDIODEV_TYPE_AUX; - (void)config_found(sc->sc_dev, &arg, audioprint); + (void)config_found(sc->sc_dev, &arg, audioprint, CFARG_EOL); } #endif diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 5cf0c2f515c..aa4584cf7cf 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.114 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: fd.c,v 1.115 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1998, 2003, 2008 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.114 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.115 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -452,7 +452,7 @@ fdcfinishattach(device_t self) if (fdc->sc_present & (1 << fa.fa_drive)) { fa.fa_deftype = fdc->sc_knownfds[fa.fa_drive]; config_found(fdc->sc_dev, (void *)&fa, - fdprint); + fdprint, CFARG_EOL); } } else { #if defined(atari) @@ -461,14 +461,18 @@ fdcfinishattach(device_t self) */ fa.fa_deftype = &fd_types[2]; /* Atari also configures ISA fdc(4) as "fdcisa" */ - (void)config_found_ia(fdc->sc_dev, "fdcisa", (void *)&fa, fdprint); + config_found(fdc->sc_dev, &fa, fdprint, + CFARG_IATTR, "fdcisa", + CFARG_EOL); #else /* * Default to 1.44MB on Alpha and BeBox. How do we tell * on these platforms? */ fa.fa_deftype = &fd_types[0]; - (void)config_found_ia(fdc->sc_dev, "fdc", (void *)&fa, fdprint); + config_found(fdc->sc_dev, &fa, fdprint, + CFARG_IATTR, "fdc", + CFARG_EOL); #endif } } diff --git a/sys/dev/isa/if_le_isa.c b/sys/dev/isa/if_le_isa.c index e44d043dce9..c02bd47ca77 100644 --- a/sys/dev/isa/if_le_isa.c +++ b/sys/dev/isa/if_le_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_isa.c,v 1.49 2010/11/13 13:52:03 uebayasi Exp $ */ +/* $NetBSD: if_le_isa.c,v 1.50 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_isa.c,v 1.49 2010/11/13 13:52:03 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_isa.c,v 1.50 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -262,7 +262,7 @@ le_dummyattach(device_t parent, device_t self, void *aux) aprint_normal("\n"); - config_found(self, aux, 0); + config_found(self, aux, 0, CFARG_EOL); } int diff --git a/sys/dev/isa/ioat66.c b/sys/dev/isa/ioat66.c index b044e7ae134..2132dc4b3a6 100644 --- a/sys/dev/isa/ioat66.c +++ b/sys/dev/isa/ioat66.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioat66.c,v 1.22 2016/07/14 04:19:27 msaitoh Exp $ */ +/* $NetBSD: ioat66.c,v 1.23 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ioat66.c,v 1.22 2016/07/14 04:19:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioat66.c,v 1.23 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -179,7 +179,8 @@ ioat66attach(device_t parent, device_t self, void *aux) ca.ca_iobase = ioatbases[i]; ca.ca_noien = 0; - sc->sc_slaves[i] = config_found(self, &ca, commultiprint); + sc->sc_slaves[i] = config_found(self, &ca, commultiprint, + CFARG_EOL); if (sc->sc_slaves[i] != NULL) sc->sc_alive |= 1 << i; } diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c index 35f1be67cad..f8b2ffabd0f 100644 --- a/sys/dev/isa/isa.c +++ b/sys/dev/isa/isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa.c,v 1.138 2010/08/21 17:08:15 jmcneill Exp $ */ +/* $NetBSD: isa.c,v 1.139 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138 2010/08/21 17:08:15 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.139 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -86,9 +86,13 @@ isaattach(device_t parent, device_t self, void *aux) struct isa_softc *sc = device_private(self); struct isabus_attach_args *iba = aux; static const int wildcard[ISACF_NLOCS] = { - ISACF_PORT_DEFAULT, ISACF_SIZE_DEFAULT, - ISACF_IOMEM_DEFAULT, ISACF_IOSIZ_DEFAULT, - ISACF_IRQ_DEFAULT, ISACF_DRQ_DEFAULT, ISACF_DRQ2_DEFAULT + [ISACF_PORT] = ISACF_PORT_DEFAULT, + [ISACF_SIZE] = ISACF_SIZE_DEFAULT, + [ISACF_IOMEM] = ISACF_IOMEM_DEFAULT, + [ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT, + [ISACF_IRQ] = ISACF_IRQ_DEFAULT, + [ISACF_DRQ] = ISACF_DRQ_DEFAULT, + [ISACF_DRQ2] = ISACF_DRQ2_DEFAULT, }; TAILQ_INIT(&sc->sc_knowndevs); @@ -132,7 +136,7 @@ isaattach(device_t parent, device_t self, void *aux) isa_free_knowndevs(sc); /* Attach all indirect-config children. */ - isarescan(self, "isa", wildcard); + isarescan(self, NULL, wildcard); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); @@ -186,7 +190,10 @@ isarescan(device_t self, const char *ifattr, const int *locators) if (locs[ISACF_IOSIZ] == -1) locs[ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT; - config_search_loc(isasearch, self, ifattr, locs, NULL); + config_search(self, NULL, + CFARG_SEARCH, isasearch, + CFARG_LOCATORS, locs, + CFARG_EOL); return (0); } @@ -239,8 +246,9 @@ isa_attach_knowndevs(struct isa_softc *sc) /* XXX should setup locator array */ - ik->ik_claimed = config_found_sm_loc(sc->sc_dev, - "isa", 0, &ia, isaprint, isasubmatch); + ik->ik_claimed = config_found(sc->sc_dev, &ia, isaprint, + CFARG_SUBMATCH, isasubmatch, + CFARG_EOL); } } @@ -464,7 +472,7 @@ isasearch(device_t parent, cfdata_t cf, const int *slocs, void *aux) return (0); tryagain = 0; - if (config_match(parent, cf, &ia) > 0) { + if (config_probe(parent, cf, &ia)) { /* * This is not necessary for detach, but might * still be useful to collect device information. @@ -476,7 +484,9 @@ isasearch(device_t parent, cfdata_t cf, const int *slocs, void *aux) flocs[ISACF_IRQ] = ia.ia_irq[0].ir_irq; flocs[ISACF_DRQ] = ia.ia_drq[0].ir_drq; flocs[ISACF_DRQ2] = ia.ia_drq[1].ir_drq; - config_attach_loc(parent, cf, flocs, &ia, isaprint); + config_attach(parent, cf, &ia, isaprint, + CFARG_LOCATORS, flocs, + CFARG_EOL); tryagain = (cf->cf_fstate == FSTATE_STAR); } } while (tryagain); diff --git a/sys/dev/isa/moxa_isa.c b/sys/dev/isa/moxa_isa.c index b59f9303848..56ef3e83fea 100644 --- a/sys/dev/isa/moxa_isa.c +++ b/sys/dev/isa/moxa_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: moxa_isa.c,v 1.21 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: moxa_isa.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: moxa_isa.c,v 1.21 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: moxa_isa.c,v 1.22 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,7 +171,8 @@ moxa_isaattach(device_t parent, device_t self, void *aux) ca.ca_iobase = sc->sc_iobase + i * COM_NPORTS; ca.ca_noien = 1; - sc->sc_slaves[i] = config_found(self, &ca, commultiprint); + sc->sc_slaves[i] = config_found(self, &ca, commultiprint, + CFARG_EOL); if (sc->sc_slaves[i] != NULL) sc->sc_alive |= 1 << i; } diff --git a/sys/dev/isa/nct.c b/sys/dev/isa/nct.c index 1db757a4c67..83422915a94 100644 --- a/sys/dev/isa/nct.c +++ b/sys/dev/isa/nct.c @@ -1,4 +1,4 @@ -/* $NetBSD: nct.c,v 1.3 2020/04/01 18:34:22 ad Exp $ */ +/* $NetBSD: nct.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nct.c,v 1.3 2020/04/01 18:34:22 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nct.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -441,7 +441,7 @@ nct_attach(device_t parent, device_t self, void *aux) gba.gba_pins = sc->sc_pins; gba.gba_npins = NCT_NUM_PINS; - (void)config_found(sc->sc_dev, &gba, gpiobus_print); + (void)config_found(sc->sc_dev, &gba, gpiobus_print, CFARG_EOL); } /* diff --git a/sys/dev/isa/nsclpcsio_isa.c b/sys/dev/isa/nsclpcsio_isa.c index f3aee7a75b7..66c2aa7451a 100644 --- a/sys/dev/isa/nsclpcsio_isa.c +++ b/sys/dev/isa/nsclpcsio_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: nsclpcsio_isa.c,v 1.32 2017/03/29 09:04:36 msaitoh Exp $ */ +/* $NetBSD: nsclpcsio_isa.c,v 1.33 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2002 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.32 2017/03/29 09:04:36 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.33 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -401,7 +401,7 @@ nsclpcsio_isa_attach(device_t parent, device_t self, void *aux) gba.gba_gc = &sc->sc_gpio_gc; gba.gba_pins = sc->sc_gpio_pins; gba.gba_npins = SIO_GPIO_NPINS; - config_found_ia(self, "gpiobus", &gba, NULL); + config_found(self, &gba, NULL, CFARG_EOL); } #endif } diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c index be4fed4420e..6b35f1bf413 100644 --- a/sys/dev/isa/pcdisplay.c +++ b/sys/dev/isa/pcdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcdisplay.c,v 1.45 2020/04/24 22:31:35 ad Exp $ */ +/* $NetBSD: pcdisplay.c,v 1.46 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.45 2020/04/24 22:31:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.46 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -329,7 +329,7 @@ pcdisplay_attach(device_t parent, device_t self, void *aux) aa.accessops = &pcdisplay_accessops; aa.accesscookie = sc; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); } diff --git a/sys/dev/isa/pcppi.c b/sys/dev/isa/pcppi.c index 9a2fb3b3fbd..568ccb426dd 100644 --- a/sys/dev/isa/pcppi.c +++ b/sys/dev/isa/pcppi.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.45 2017/06/14 05:01:35 pgoyette Exp $ */ +/* $NetBSD: pcppi.c,v 1.46 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45 2017/06/14 05:01:35 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.46 2021/04/24 23:36:55 thorpej Exp $"); #include "attimer.h" @@ -233,21 +233,21 @@ pcppi_attach(struct pcppi_softc *sc) if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - pcppi_rescan(self, "pcppi", NULL); + pcppi_rescan(self, NULL, NULL); } int -pcppi_rescan(device_t self, const char *ifattr, const int *flags) +pcppi_rescan(device_t self, const char *ifattr, const int *locators) { struct pcppi_softc *sc = device_private(self); struct pcppi_attach_args pa; - if (!ifattr_match(ifattr, "pcppi")) - return 0; - pa.pa_cookie = sc; pa.pa_bell_func = pcppi_bell; - config_search_loc(pcppisearch, sc->sc_dv, "pcppi", NULL, &pa); + + config_search(sc->sc_dv, &pa, + CFARG_SEARCH, pcppisearch, + CFARG_EOL); return 0; } @@ -256,8 +256,10 @@ static int pcppisearch(device_t parent, cfdata_t cf, const int *locs, void *aux) { - if (config_match(parent, cf, aux)) - config_attach_loc(parent, cf, locs, aux, NULL); + if (config_probe(parent, cf, aux)) + config_attach(parent, cf, aux, NULL, + CFARG_LOCATORS, locs, + CFARG_EOL); return 0; } diff --git a/sys/dev/isa/ptcd.c b/sys/dev/isa/ptcd.c index 7dd82148bdb..2f7d44c6474 100644 --- a/sys/dev/isa/ptcd.c +++ b/sys/dev/isa/ptcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ptcd.c,v 1.3 2012/12/17 17:46:27 mbalmer Exp $ */ +/* $NetBSD: ptcd.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 2012 Marc Balmer <marc@msys.ch> @@ -143,7 +143,7 @@ ptcd_attach(device_t parent, device_t self, void *aux) gba.gba_npins = PTCD_NPINS; /* Attach GPIO framework */ - config_found_ia(self, "gpiobus", &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, CFARG_EOL); } int diff --git a/sys/dev/isa/rtfps.c b/sys/dev/isa/rtfps.c index 685044e9cff..e3da48b439e 100644 --- a/sys/dev/isa/rtfps.c +++ b/sys/dev/isa/rtfps.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtfps.c,v 1.60 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: rtfps.c,v 1.61 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtfps.c,v 1.60 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtfps.c,v 1.61 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -189,7 +189,8 @@ rtfpsattach(device_t parent, device_t self, void *aux) ca.ca_iobase = sc->sc_iobase + i * COM_NPORTS; ca.ca_noien = 0; - sc->sc_slaves[i] = config_found(self, &ca, commultiprint); + sc->sc_slaves[i] = config_found(self, &ca, commultiprint, + CFARG_EOL); if (sc->sc_slaves[i] != NULL) sc->sc_alive |= 1 << i; } diff --git a/sys/dev/isa/sb.c b/sys/dev/isa/sb.c index 67f5041a7fa..5ea74374f7e 100644 --- a/sys/dev/isa/sb.c +++ b/sys/dev/isa/sb.c @@ -1,4 +1,4 @@ -/* $NetBSD: sb.c,v 1.91 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: sb.c,v 1.92 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.91 2019/05/08 13:40:18 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.92 2021/04/24 23:36:55 thorpej Exp $"); #include "midi.h" @@ -263,7 +263,9 @@ sbattach(struct sbdsp_softc *sc) arg.type = AUDIODEV_TYPE_MPU; arg.hwif = 0; arg.hdl = 0; - sc->sc_mpudev = config_found_ia(sc->sc_dev, "sbdsp", &arg, audioprint); + sc->sc_mpudev = config_found(sc->sc_dev, &arg, audioprint, + CFARG_IATTR, "sbdsp", + CFARG_EOL); break; } #endif @@ -271,7 +273,9 @@ sbattach(struct sbdsp_softc *sc) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found_ia(sc->sc_dev, "sbdsp", &arg, audioprint); + config_found(sc->sc_dev, &arg, audioprint, + CFARG_IATTR, "sbdsp", + CFARG_EOL); } } diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c index f12b27b2de0..53595c284f0 100644 --- a/sys/dev/isa/seagate.c +++ b/sys/dev/isa/seagate.c @@ -1,4 +1,4 @@ -/* $NetBSD: seagate.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: seagate.c,v 1.75 2021/04/24 23:36:55 thorpej Exp $ */ /* * ST01/02, Future Domain TMC-885, TMC-950 SCSI driver @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.74 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.75 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -471,7 +471,7 @@ seaattach(device_t parent, device_t self, void *aux) /* * ask the adapter what subunits are present */ - config_found(self, &sea->sc_channel, scsiprint); + config_found(self, &sea->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/isa/soekrisgpio.c b/sys/dev/isa/soekrisgpio.c index 1d1b788d347..8fe66cbfc6e 100644 --- a/sys/dev/isa/soekrisgpio.c +++ b/sys/dev/isa/soekrisgpio.c @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: soekrisgpio.c,v 1.3 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: soekrisgpio.c,v 1.4 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -176,8 +176,8 @@ soekris_attach(device_t parent, device_t self, void *aux) gba2.gba_npins = SOEKRIS_NLEDS; #if NGPIO > 0 - (void)config_found(sc->sc_dev, &gba1, gpiobus_print); - (void)config_found(sc->sc_dev, &gba2, gpiobus_print); + (void)config_found(sc->sc_dev, &gba1, gpiobus_print, CFARG_EOL); + (void)config_found(sc->sc_dev, &gba2, gpiobus_print, CFARG_EOL); #endif } diff --git a/sys/dev/isa/tcom.c b/sys/dev/isa/tcom.c index ab84ed175d9..9f3610e60f0 100644 --- a/sys/dev/isa/tcom.c +++ b/sys/dev/isa/tcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcom.c,v 1.20 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: tcom.c,v 1.21 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcom.c,v 1.20 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcom.c,v 1.21 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -219,7 +219,7 @@ tcomattach(device_t parent, device_t self, void *aux) ca.ca_iobase = sc->sc_iobase + i * COM_NPORTS; ca.ca_noien = 0; - slave = config_found(self, &ca, commultiprint); + slave = config_found(self, &ca, commultiprint, CFARG_EOL); if (slave != NULL) { sc->sc_alive |= 1 << i; sc->sc_slaves[i] = device_private(slave); diff --git a/sys/dev/isa/tsdio.c b/sys/dev/isa/tsdio.c index 781b46c5651..393af8e548f 100644 --- a/sys/dev/isa/tsdio.c +++ b/sys/dev/isa/tsdio.c @@ -1,4 +1,4 @@ -/* $NetBSD: tsdio.c,v 1.11 2012/10/27 17:18:25 chs Exp $ */ +/* $NetBSD: tsdio.c,v 1.12 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tsdio.c,v 1.11 2012/10/27 17:18:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tsdio.c,v 1.12 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -122,7 +122,9 @@ tsdio_attach(device_t parent, device_t self, void *aux) /* * Attach sub-devices */ - config_search_ia(tsdio_search, self, "tsdio", NULL); + config_search(self, NULL, + CFARG_SEARCH, tsdio_search, + CFARG_EOL); } int @@ -134,8 +136,8 @@ tsdio_search(device_t parent, cfdata_t cf, const int *l, void *aux) sa.ta_iot = sc->sc_iot; sa.ta_ioh = sc->sc_ioh; - if (config_match(parent, cf, &sa) > 0) - config_attach(parent, cf, &sa, tsdio_print); + if (config_probe(parent, cf, &sa)) + config_attach(parent, cf, &sa, tsdio_print, CFARG_EOL); return (0); } diff --git a/sys/dev/isa/wbsio.c b/sys/dev/isa/wbsio.c index a30d8983082..dbf64aa3577 100644 --- a/sys/dev/isa/wbsio.c +++ b/sys/dev/isa/wbsio.c @@ -1,4 +1,4 @@ -/* $NetBSD: wbsio.c,v 1.25 2019/07/10 16:23:55 msaitoh Exp $ */ +/* $NetBSD: wbsio.c,v 1.26 2021/04/24 23:36:55 thorpej Exp $ */ /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ /* * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> @@ -332,12 +332,19 @@ wbsio_rescan(device_t self, const char *ifattr, const int *locators) #if NGPIO > 0 if (ifattr_match(ifattr, "gpiobus")) { - config_search_loc(wbsio_gpio_search, self, - ifattr, locators, NULL); + config_search(self, NULL, + CFARG_SEARCH, wbsio_gpio_search, + CFARG_IATTR, ifattr, + CFARG_LOCATORS, locators, + CFARG_EOL); return 0; } #endif - config_search_loc(wbsio_search, self, ifattr, locators, NULL); + config_search(self, NULL, + CFARG_SEARCH, wbsio_search, + CFARG_IATTR, ifattr, + CFARG_LOCATORS, locators, + CFARG_EOL); wbsio_wdog_attach(self); @@ -408,7 +415,8 @@ wbsio_search(device_t parent, cfdata_t cf, const int *slocs, void *aux) sc->sc_ia.ia_ndrq = 0; /* Store device-id to ia_aux */ sc->sc_ia.ia_aux = (void *)(uintptr_t)devid; - sc->sc_lm_dev = config_attach(parent, cf, &sc->sc_ia, wbsio_print); + sc->sc_lm_dev = config_attach(parent, cf, &sc->sc_ia, wbsio_print, + CFARG_EOL); return 0; } @@ -516,7 +524,8 @@ wbsio_gpio_search(device_t parent, cfdata_t cf, const int *slocs, void *aux) gba.gba_pins = sc->sc_gpio_pins; gba.gba_npins = WBSIO_GPIO_NPINS; - sc->sc_gpio_dev = config_attach(parent, cf, &gba, gpiobus_print); + sc->sc_gpio_dev = config_attach(parent, cf, &gba, gpiobus_print, + CFARG_EOL); return 0; } diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index e79fc17fe97..5d36dc8f7de 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $NetBSD: wds.c,v 1.77 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: wds.c,v 1.78 2021/04/24 23:36:55 thorpej Exp $ */ /* * XXX @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.77 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.78 2021/04/24 23:36:55 thorpej Exp $"); #include "opt_ddb.h" @@ -403,7 +403,7 @@ wds_attach(struct wds_softc *sc, struct wds_probe_data *wpd) /* * ask the adapter what subunits are present */ - config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint, CFARG_EOL); } integrate void diff --git a/sys/dev/isa/wss.c b/sys/dev/isa/wss.c index 009ff613ae6..05bc5003b6f 100644 --- a/sys/dev/isa/wss.c +++ b/sys/dev/isa/wss.c @@ -1,4 +1,4 @@ -/* $NetBSD: wss.c,v 1.74 2020/02/29 05:51:11 isaki Exp $ */ +/* $NetBSD: wss.c,v 1.75 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.74 2020/02/29 05:51:11 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss.c,v 1.75 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -161,7 +161,7 @@ wssattach(struct wss_softc *sc) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(ac->sc_dev, &arg, audioprint); + (void)config_found(ac->sc_dev, &arg, audioprint, CFARG_EOL); } } diff --git a/sys/dev/isa/ym.c b/sys/dev/isa/ym.c index 4199631f06c..2314b159b72 100644 --- a/sys/dev/isa/ym.c +++ b/sys/dev/isa/ym.c @@ -1,4 +1,4 @@ -/* $NetBSD: ym.c,v 1.47 2020/02/29 05:51:11 isaki Exp $ */ +/* $NetBSD: ym.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1999-2002, 2008 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.47 2020/02/29 05:51:11 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.48 2021/04/24 23:36:55 thorpej Exp $"); #include "mpu_ym.h" #include "opt_ym.h" @@ -258,7 +258,7 @@ ym_attach(struct ym_softc *sc) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(ac->sc_dev, &arg, audioprint); + (void)config_found(ac->sc_dev, &arg, audioprint, CFARG_EOL); } #if NMPU_YM > 0 @@ -267,7 +267,8 @@ ym_attach(struct ym_softc *sc) arg.type = AUDIODEV_TYPE_MPU; arg.hwif = 0; arg.hdl = 0; - sc->sc_mpudev = config_found(ac->sc_dev, &arg, audioprint); + sc->sc_mpudev = config_found(ac->sc_dev, &arg, audioprint, + CFARG_EOL); } #endif diff --git a/sys/dev/isapnp/isapnp.c b/sys/dev/isapnp/isapnp.c index cfca600f349..11b17992ac2 100644 --- a/sys/dev/isapnp/isapnp.c +++ b/sys/dev/isapnp/isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: isapnp.c,v 1.60 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: isapnp.c,v 1.61 2021/04/24 23:36:55 thorpej Exp $ */ /*- * Copyright (c) 1996, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.60 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.61 2021/04/24 23:36:55 thorpej Exp $"); #include "isadma.h" @@ -992,8 +992,9 @@ isapnp_callback(device_t self) isapnp_write_reg(sc, ISAPNP_ACTIVATE, 1); #ifdef _KERNEL - if (config_found_sm_loc(self, "isapnp", NULL, lpa, - isapnp_print, isapnp_submatch) == NULL) + if (config_found(self, lpa, isapnp_print, + CFARG_SUBMATCH, isapnp_submatch, + CFARG_EOL) == NULL) isapnp_write_reg(sc, ISAPNP_ACTIVATE, 0); #else isapnp_print(lpa, NULL); diff --git a/sys/dev/isapnp/wss_isapnp.c b/sys/dev/isapnp/wss_isapnp.c index 64d57904c6c..e891ca59799 100644 --- a/sys/dev/isapnp/wss_isapnp.c +++ b/sys/dev/isapnp/wss_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: wss_isapnp.c,v 1.28 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: wss_isapnp.c,v 1.29 2021/04/24 23:36:55 thorpej Exp $ */ /* * Copyright (c) 1997, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.28 2019/05/08 13:40:18 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.29 2021/04/24 23:36:55 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -174,6 +174,6 @@ wss_isapnp_attach(device_t parent, device_t self, void *aux) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(self, &arg, audioprint); + (void)config_found(self, &arg, audioprint, CFARG_EOL); } } diff --git a/sys/dev/iscsi/iscsi_main.c b/sys/dev/iscsi/iscsi_main.c index 69659fdb509..ea0a58dc9dd 100644 --- a/sys/dev/iscsi/iscsi_main.c +++ b/sys/dev/iscsi/iscsi_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_main.c,v 1.34 2021/03/07 12:30:03 mlelstv Exp $ */ +/* $NetBSD: iscsi_main.c,v 1.35 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -387,7 +387,7 @@ map_session(session_t *sess, device_t dev) chan->chan_nluns = 16; chan->chan_id = sess->s_id; - sess->s_child_dev = config_found(dev, chan, scsiprint); + sess->s_child_dev = config_found(dev, chan, scsiprint, CFARG_EOL); return sess->s_child_dev != NULL; } diff --git a/sys/dev/marvell/ehci_mv.c b/sys/dev/marvell/ehci_mv.c index 8c110d17bd2..ee0d72bb570 100644 --- a/sys/dev/marvell/ehci_mv.c +++ b/sys/dev/marvell/ehci_mv.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_mv.c,v 1.8 2019/12/26 04:53:12 msaitoh Exp $ */ +/* $NetBSD: ehci_mv.c,v 1.9 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_mv.c,v 1.8 2019/12/26 04:53:12 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_mv.c,v 1.9 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -246,7 +246,8 @@ mvusb_attach(device_t parent, device_t self, void *aux) } /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); } static void diff --git a/sys/dev/marvell/files.discovery b/sys/dev/marvell/files.discovery index 601af0394d3..a32097162e2 100644 --- a/sys/dev/marvell/files.discovery +++ b/sys/dev/marvell/files.discovery @@ -1,4 +1,4 @@ -# $NetBSD: files.discovery,v 1.22 2013/09/06 00:56:12 matt Exp $ +# $NetBSD: files.discovery,v 1.23 2021/04/24 23:36:56 thorpej Exp $ # # Config file and device description for machine-independent support for # the Marvell (formerly Galileo Technology) Discovery system controllers. @@ -23,8 +23,7 @@ defparam opt_marvell.h GT_MPSC_FREQUENCY GT_MPSC_CLOCK_SOURCE defparam opt_marvell.h GT_MPP_WATCHDOG defflag opt_marvell.h GT_DEVBUS GT_ECC GT_COMM GT_WATCHDOG -define gt { [unit = -1], [offset = -1], [irq = -1] } -device gt: gt +device gt { [unit = -1], [offset = -1], [irq = -1] } file dev/marvell/gt.c gt # PCI Interface @@ -38,8 +37,7 @@ file dev/marvell/mvpex.c mvpex & (mvpex_gt|mvpex_mbus) needs-flag attach mvpex at gt with mvpex_gt # Fast ethernet -define gfec { [port = -1], [irq = -1] } -device gfec: gfec +device gfec { [port = -1], [irq = -1] } attach gfec at gt device gfe: ether, ifnet, arp, mii attach gfe at gfec @@ -50,8 +48,7 @@ device gtmpsc: tty attach gtmpsc at gt file dev/marvell/gtmpsc.c gtmpsc needs-flag -define obio { [offset = -1], [size = 0], [irq = -1] } -device obio: obio +device obio { [offset = -1], [size = 0], [irq = -1] } attach obio at gt file dev/marvell/obio.c obio @@ -60,8 +57,7 @@ attach mvsata at gt with mvsata_gt file dev/marvell/mvsata_mv.c mvsata_gt | mvsata_mbus # Gigabit Ethernet Controller Interface -define mvgbec { [port = -1], [irq = -1] } -device mvgbec: mvgbec +device mvgbec { [port = -1], [irq = -1] } attach mvgbec at gt with mvgbec_gt device mvgbe: ether, ifnet, arp, mii attach mvgbe at mvgbec diff --git a/sys/dev/marvell/gt.c b/sys/dev/marvell/gt.c index f01384101db..362845bc9cb 100644 --- a/sys/dev/marvell/gt.c +++ b/sys/dev/marvell/gt.c @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.28 2016/10/09 14:50:54 christos Exp $ */ +/* $NetBSD: gt.c,v 1.29 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.28 2016/10/09 14:50:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.29 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_marvell.h" #include "gtmpsc.h" @@ -235,8 +235,9 @@ gt_attach_peripherals(struct gt_softc *sc) mva.mva_dmat = sc->sc_dmat; mva.mva_irq = gt_devs[i].irq; - config_found_sm_loc(sc->sc_dev, "gt", NULL, &mva, - gt_cfprint, gt_cfsearch); + config_found(sc->sc_dev, &mva, gt_cfprint, + CFARG_SUBMATCH, gt_cfsearch, + CFARG_EOL); } } diff --git a/sys/dev/marvell/gtpci.c b/sys/dev/marvell/gtpci.c index f75761cb1ee..3dcb8e71f51 100644 --- a/sys/dev/marvell/gtpci.c +++ b/sys/dev/marvell/gtpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtpci.c,v 1.34 2020/07/07 03:38:49 thorpej Exp $ */ +/* $NetBSD: gtpci.c,v 1.35 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2008, 2009 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.34 2020/07/07 03:38:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.35 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_pci.h" #include "pci.h" @@ -492,7 +492,7 @@ gtpci_pci_config(struct gtpci_softc *sc, bus_space_tag_t iot, pba.pba_flags |= PCI_FLAGS_MWI_OKAY; pba.pba_bus = GTPCI_P2PC_BUSNUMBER(p2pc); pba.pba_bridgetag = NULL; - config_found_ia(sc->sc_dev, "pcibus", &pba, NULL); + config_found(sc->sc_dev, &pba, NULL, CFARG_EOL); } diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c index afad116d05a..ef99ba63ef9 100644 --- a/sys/dev/marvell/if_gfe.c +++ b/sys/dev/marvell/if_gfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gfe.c,v 1.57 2020/09/05 16:30:11 riastradh Exp $ */ +/* $NetBSD: if_gfe.c,v 1.58 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.57 2020/09/05 16:30:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.58 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_inet.h" @@ -249,8 +249,9 @@ gfec_attach(device_t parent, device_t self, void *aux) gfea.mva_unit = i; gfea.mva_dmat = mva->mva_dmat; gfea.mva_irq = gfe_irqs[i]; - config_found_sm_loc(sc->sc_dev, "gfec", NULL, &gfea, - gfec_print, gfec_search); + config_found(sc->sc_dev, &gfea, gfec_print, + CFARG_SUBMATCH, gfec_search, + CFARG_EOL); } } diff --git a/sys/dev/marvell/if_mvgbe.c b/sys/dev/marvell/if_mvgbe.c index 707b9e5f72a..ab097a5d03f 100644 --- a/sys/dev/marvell/if_mvgbe.c +++ b/sys/dev/marvell/if_mvgbe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.59 2020/02/03 07:47:53 skrll Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.60 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.59 2020/02/03 07:47:53 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.60 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_multiprocessor.h" @@ -470,8 +470,9 @@ mvgbec_attach(device_t parent, device_t self, void *aux) gbea.mva_unit = j; gbea.mva_dmat = mva->mva_dmat; gbea.mva_irq = mvgbe_ports[i].irqs[j]; - child = config_found_sm_loc(csc->sc_dev, "mvgbec", NULL, - &gbea, mvgbec_print, mvgbec_search); + child = config_found(csc->sc_dev, &gbea, mvgbec_print, + CFARG_SUBMATCH, mvgbec_search, + CFARG_EOL); if (child) { port = device_private(child); mii = LIST_FIRST(&port->sc_mii.mii_phys); diff --git a/sys/dev/marvell/mvpex.c b/sys/dev/marvell/mvpex.c index 53f38d3b0e6..f81612ca65d 100644 --- a/sys/dev/marvell/mvpex.c +++ b/sys/dev/marvell/mvpex.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvpex.c,v 1.20 2020/07/07 03:38:49 thorpej Exp $ */ +/* $NetBSD: mvpex.c,v 1.21 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.20 2020/07/07 03:38:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.21 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_pci.h" #include "pci.h" @@ -434,7 +434,7 @@ mvpex_pci_config(struct mvpex_softc *sc, bus_space_tag_t iot, pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY; pba.pba_bus = MVPEX_STAT_PEXBUSNUM(stat); pba.pba_bridgetag = NULL; - config_found_ia(sc->sc_dev, "pcibus", &pba, NULL); + config_found(sc->sc_dev, &pba, NULL, CFARG_EOL); } diff --git a/sys/dev/marvell/mvsdio.c b/sys/dev/marvell/mvsdio.c index 7a8ec93f3bf..73e70b64c88 100644 --- a/sys/dev/marvell/mvsdio.c +++ b/sys/dev/marvell/mvsdio.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvsdio.c,v 1.6 2017/03/03 16:52:08 jakllsch Exp $ */ +/* $NetBSD: mvsdio.c,v 1.7 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvsdio.c,v 1.6 2017/03/03 16:52:08 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsdio.c,v 1.7 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_mvsdio.h" @@ -251,7 +251,7 @@ mvsdio_attach(device_t parent, device_t self, void *aux) #ifndef MVSDIO_CARD_DETECT saa.saa_caps |= SMC_CAPS_POLL_CARD_DET; #endif - sc->sc_sdmmc = config_found(sc->sc_dev, &saa, NULL); + sc->sc_sdmmc = config_found(sc->sc_dev, &saa, NULL, CFARG_EOL); } static int diff --git a/sys/dev/marvell/mvspi.c b/sys/dev/marvell/mvspi.c index dbc43f974d7..0cbdcee8e66 100644 --- a/sys/dev/marvell/mvspi.c +++ b/sys/dev/marvell/mvspi.c @@ -150,7 +150,7 @@ mvspi_attach(struct device *parent, struct device *self, void *aux) */ memset(&sba, 0, sizeof(sba)); sba.sba_controller = &sc->sc_spi; - (void) config_found_ia(self, "spibus", &sba, spibus_print); + config_found(self, &sba, spibus_print, CFARG_EOL); } int diff --git a/sys/dev/marvell/obio.c b/sys/dev/marvell/obio.c index 9b7956e09fa..4006ecdad01 100644 --- a/sys/dev/marvell/obio.c +++ b/sys/dev/marvell/obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.15 2010/07/11 08:43:36 kiyohara Exp $ */ +/* $NetBSD: obio.c,v 1.16 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.15 2010/07/11 08:43:36 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.16 2021/04/24 23:36:56 thorpej Exp $"); #include "opt_marvell.h" @@ -137,7 +137,9 @@ obio_attach(device_t parent, device_t self, void *aux) aprint_normal_dev(self, "addr %#x-%#x\n", GT_LowAddr_GET(datal), GT_HighAddr_GET(datah)); - config_search_ia(obio_cfsearch, self, "obio", NULL); + config_search(self, NULL, + CFARG_SEARCH, obio_cfsearch, + CFARG_EOL); } @@ -169,8 +171,8 @@ obio_cfsearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) oa.oa_size = cf->cf_loc[OBIOCF_SIZE]; oa.oa_irq = cf->cf_loc[OBIOCF_IRQ]; - if (config_match(parent, cf, &oa) > 0) - config_attach(parent, cf, &oa, obio_cfprint); + if (config_probe(parent, cf, &oa)) + config_attach(parent, cf, &oa, obio_cfprint, CFARG_EOL); return 0; } diff --git a/sys/dev/mca/edc_mca.c b/sys/dev/mca/edc_mca.c index 3bd2d6dd9c3..da0efd8b208 100644 --- a/sys/dev/mca/edc_mca.c +++ b/sys/dev/mca/edc_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: edc_mca.c,v 1.52 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: edc_mca.c,v 1.53 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.52 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.53 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -301,8 +301,10 @@ edc_mca_attach(device_t parent, device_t self, void *aux) locs[EDCCF_DRIVE] = devno; sc->sc_ed[devno] = device_private( - config_found_sm_loc(self, "edc", locs, &eda, NULL, - config_stdsubmatch)); + config_found(self, &eda, NULL, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL)); /* If initialization did not succeed, NULL the pointer. */ if (sc->sc_ed[devno] diff --git a/sys/dev/mca/mca.c b/sys/dev/mca/mca.c index 4df7a9e7d53..eb6904f2612 100644 --- a/sys/dev/mca/mca.c +++ b/sys/dev/mca/mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: mca.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: mca.c,v 1.33 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.32 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.33 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -153,8 +153,10 @@ mca_attach(device_t parent, device_t self, void *aux) if (ma.ma_pos[2] & MCA_POS2_ENABLE || mca_match_disabled(ma.ma_id)) - config_found_sm_loc(self, "mca", locs, &ma, - mca_print, config_stdsubmatch); + config_found(self, &ma, mca_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); else { mca_print(&ma, device_xname(self)); aprint_normal(" disabled\n"); diff --git a/sys/dev/midi.c b/sys/dev/midi.c index 438cd82e2b2..9f4524d98c0 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.91 2020/12/19 01:18:58 thorpej Exp $ */ +/* $NetBSD: midi.c,v 1.92 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.91 2020/12/19 01:18:58 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.92 2021/04/24 23:36:52 thorpej Exp $"); #ifdef _KERNEL_OPT #include "midi.h" @@ -1895,7 +1895,7 @@ midi_attach_mi(const struct midi_hw_if *mhwp, void *hdlp, device_t dev) arg.type = AUDIODEV_TYPE_MIDI; arg.hwif = mhwp; arg.hdl = hdlp; - return (config_found(dev, &arg, audioprint)); + return (config_found(dev, &arg, audioprint, CFARG_EOL)); } #endif /* NMIDI > 0 || NMIDIBUS > 0 */ diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index da181a6d5ea..ce0f6ffee45 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -1,4 +1,4 @@ -/* $NetBSD: mii.c,v 1.55 2020/03/15 23:04:50 thorpej Exp $ */ +/* $NetBSD: mii.c,v 1.56 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 1998, 2000, 2020 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.55 2020/03/15 23:04:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.56 2021/04/24 23:36:56 thorpej Exp $"); #define __IFMEDIA_PRIVATE @@ -172,8 +172,12 @@ mii_attach(device_t parent, struct mii_data *mii, int capmask, mii_unlock(mii); - child = device_private(config_found_sm_loc(parent, "mii", - locs, &ma, mii_print, config_stdsubmatch)); + child = device_private( + config_found(parent, &ma, mii_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "mii", + CFARG_LOCATORS, locs, + CFARG_EOL)); if (child) { /* Link it up in the parent's MII data. */ callout_init(&child->mii_nway_ch, 0); diff --git a/sys/dev/mscp/mscp.c b/sys/dev/mscp/mscp.c index 94d53b840c8..fe64f7477cb 100644 --- a/sys/dev/mscp/mscp.c +++ b/sys/dev/mscp/mscp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp.c,v 1.36 2012/10/27 17:18:26 chs Exp $ */ +/* $NetBSD: mscp.c,v 1.37 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.36 2012/10/27 17:18:26 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.37 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -496,7 +496,7 @@ mscp_worker(struct work *wk, void *dummy) da.da_mp = &mw->mw_mp; da.da_typ = mi->mi_type; - config_found(mi->mi_dev, (void *)&da, mscp_print); + config_found(mi->mi_dev, (void *)&da, mscp_print, CFARG_EOL); mutex_spin_enter(&mi->mi_mtx); SLIST_INSERT_HEAD(&mw->mw_mi->mi_freelist, mw, mw_list); diff --git a/sys/dev/mvme/mvmebus.c b/sys/dev/mvme/mvmebus.c index c9852c7874e..02ddc69678e 100644 --- a/sys/dev/mvme/mvmebus.c +++ b/sys/dev/mvme/mvmebus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvmebus.c,v 1.22 2021/04/15 01:57:11 mrg Exp $ */ +/* $NetBSD: mvmebus.c,v 1.23 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.22 2021/04/15 01:57:11 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.23 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -236,7 +236,7 @@ mvmebus_attach(struct mvmebus_softc *sc) vaa.va_bdt = &sc->sc_mvmedmat; vaa.va_slaveconfig = NULL; - config_found(sc->sc_dev, &vaa, 0); + config_found(sc->sc_dev, &vaa, 0, CFARG_EOL); } int diff --git a/sys/dev/mvme/pcctwo.c b/sys/dev/mvme/pcctwo.c index db2d1322b8b..386880ded40 100644 --- a/sys/dev/mvme/pcctwo.c +++ b/sys/dev/mvme/pcctwo.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcctwo.c,v 1.11 2012/10/27 17:18:27 chs Exp $ */ +/* $NetBSD: pcctwo.c,v 1.12 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcctwo.c,v 1.11 2012/10/27 17:18:27 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcctwo.c,v 1.12 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -103,7 +103,7 @@ pcctwo_init(struct pcctwo_softc *sc, const struct pcctwo_device *pd, int devoff) pd++; /* Attach the device if configured. */ - (void) config_found(sc->sc_dev, &npa, pcctwoprint); + (void) config_found(sc->sc_dev, &npa, pcctwoprint, CFARG_EOL); } } diff --git a/sys/dev/nand/nand.c b/sys/dev/nand/nand.c index d1e1c2e5eb1..da96a4beb45 100644 --- a/sys/dev/nand/nand.c +++ b/sys/dev/nand/nand.c @@ -1,4 +1,4 @@ -/* $NetBSD: nand.c,v 1.27 2017/11/13 17:36:39 jmcneill Exp $ */ +/* $NetBSD: nand.c,v 1.28 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -34,7 +34,7 @@ /* Common driver for NAND chips implementing the ONFI 2.2 specification */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.27 2017/11/13 17:36:39 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.28 2021/04/24 23:36:56 thorpej Exp $"); #include "locators.h" @@ -172,7 +172,9 @@ nand_attach(device_t parent, device_t self, void *aux) /* * Attach all our devices */ - config_search_ia(nand_search, self, NULL, NULL); + config_search(self, NULL, + CFARG_SEARCH, nand_search, + CFARG_EOL); return; error: @@ -208,8 +210,9 @@ nand_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) else faa.partinfo.part_flags = 0; - if (config_match(parent, cf, &faa)) { - if (config_attach(parent, cf, &faa, nand_print) != NULL) { + if (config_probe(parent, cf, &faa)) { + if (config_attach(parent, cf, &faa, nand_print, + CFARG_EOL) != NULL) { return 0; } else { return 1; @@ -284,7 +287,9 @@ nand_attach_mi(struct nand_interface *nand_if, device_t parent) } arg.naa_nand_if = nand_if; - return config_found_ia(parent, "nandbus", &arg, nand_print); + return config_found(parent, &arg, nand_print, + CFARG_IATTR, "nandbus", + CFARG_EOL); } /* default everything to reasonable values, to ease future api changes */ diff --git a/sys/dev/nor/nor.c b/sys/dev/nor/nor.c index 446c1b08a90..8408c9c0783 100644 --- a/sys/dev/nor/nor.c +++ b/sys/dev/nor/nor.c @@ -1,4 +1,4 @@ -/* $NetBSD: nor.c,v 1.5 2014/02/25 18:30:10 pooka Exp $ */ +/* $NetBSD: nor.c,v 1.6 2021/04/24 23:36:56 thorpej Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -34,7 +34,7 @@ /* Common driver for NOR chips implementing the ONFI CFI specification */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nor.c,v 1.5 2014/02/25 18:30:10 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nor.c,v 1.6 2021/04/24 23:36:56 thorpej Exp $"); #include "locators.h" #include "opt_nor.h" @@ -182,7 +182,9 @@ nor_attach(device_t parent, device_t self, void *aux) /* * Attach all our devices */ - config_search_ia(nor_search, self, NULL, NULL); + config_search(self, NULL, + CFARG_SEARCH, nor_search, + CFARG_EOL); return; @@ -217,8 +219,9 @@ nor_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) faa.flash_if = &sc->sc_flash_if; - if (config_match(parent, cf, &faa)) { - if (config_attach(parent, cf, &faa, nor_print) != NULL) { + if (config_probe(parent, cf, &faa)) { + if (config_attach(parent, cf, &faa, nor_print, + CFARG_EOL) != NULL) { return 0; } else { return 1; @@ -283,7 +286,9 @@ nor_attach_mi(struct nor_interface * const nor_if, device_t parent) arg.naa_nor_if = nor_if; - device_t dev = config_found_ia(parent, "norbus", &arg, nor_print); + device_t dev = config_found(parent, &arg, nor_print, + CFARG_IATTR, "norbus", + CFARG_EOL); return dev; } diff --git a/sys/dev/ofisa/ofisa.c b/sys/dev/ofisa/ofisa.c index 88664b1a322..1ef619f2c3e 100644 --- a/sys/dev/ofisa/ofisa.c +++ b/sys/dev/ofisa/ofisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofisa.c,v 1.30 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: ofisa.c,v 1.31 2021/04/24 23:36:56 thorpej Exp $ */ /* * Copyright 1997, 1998 @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.30 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.31 2021/04/24 23:36:56 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -131,7 +131,9 @@ ofisaattach(device_t parent, device_t self, void *aux) aa.dmat = iba.iba_dmat; aa.ic = iba.iba_ic; - config_found(self, &aa, ofisaprint); + config_found(self, &aa, ofisaprint, + CFARG_DEVHANDLE, devhandle_from_of(child), + CFARG_EOL); } } diff --git a/sys/dev/ofw/ofbus.c b/sys/dev/ofw/ofbus.c index 3946234a3cf..7c2c9eafd8c 100644 --- a/sys/dev/ofw/ofbus.c +++ b/sys/dev/ofw/ofbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofbus.c,v 1.26 2017/03/10 00:26:43 macallan Exp $ */ +/* $NetBSD: ofbus.c,v 1.27 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofbus.c,v 1.26 2017/03/10 00:26:43 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofbus.c,v 1.27 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -116,7 +116,9 @@ ofbus_attach(device_t parent, device_t dev, void *aux) strlcpy(oba2.oba_ofname, name, sizeof(oba2.oba_ofname)); } - config_found(dev, &oba2, ofbus_print); + config_found(dev, &oba2, ofbus_print, + CFARG_DEVHANDLE, devhandle_from_of(child), + CFARG_EOL); } } @@ -141,7 +143,9 @@ ofbus_attach(device_t parent, device_t dev, void *aux) strlcpy(oba2.oba_ofname, name, sizeof(oba2.oba_ofname)); } - config_found(dev, &oba2, ofbus_print); + config_found(dev, &oba2, ofbus_print, + CFARG_DEVHANDLE, devhandle_from_of(child), + CFARG_EOL); } } diff --git a/sys/dev/ofw/ofw_subr.c b/sys/dev/ofw/ofw_subr.c index 408a26f8548..2af5c1f5237 100644 --- a/sys/dev/ofw/ofw_subr.c +++ b/sys/dev/ofw/ofw_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_subr.c,v 1.57 2021/02/05 17:17:59 thorpej Exp $ */ +/* $NetBSD: ofw_subr.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.57 2021/02/05 17:17:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -517,14 +517,6 @@ of_get_mode_string(char *buffer, int len) return buffer; } -void -of_device_register(device_t dev, int phandle) -{ - - /* All we do here is set the devhandle in the device_t. */ - device_set_handle(dev, devhandle_from_of(phandle)); -} - /* * of_device_from_phandle -- * diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index 1754f6268db..34eee8e53bc 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.h,v 1.46 2021/02/06 16:07:13 thorpej Exp $ */ +/* $NetBSD: openfirm.h,v 1.47 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -124,7 +124,6 @@ int of_find_bycompat(int, const char *); int of_getnode_byname(int, const char *); bool of_to_uint32_prop(prop_dictionary_t, int, const char *, const char *); bool of_to_dataprop(prop_dictionary_t, int, const char *, const char *); -void of_device_register(device_t, int); device_t of_device_from_phandle(int); int *of_network_decode_media(int, int *, int *); diff --git a/sys/dev/onewire/onewire.c b/sys/dev/onewire/onewire.c index fe0b25bca16..9c7842a782e 100644 --- a/sys/dev/onewire/onewire.c +++ b/sys/dev/onewire/onewire.c @@ -1,4 +1,4 @@ -/* $NetBSD: onewire.c,v 1.20 2020/04/14 15:36:02 kre Exp $ */ +/* $NetBSD: onewire.c,v 1.21 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: onewire.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */ /*- @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: onewire.c,v 1.20 2020/04/14 15:36:02 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: onewire.c,v 1.21 2021/04/24 23:36:57 thorpej Exp $"); /* * 1-Wire bus driver. @@ -529,7 +529,8 @@ onewire_scan(struct onewire_softc *sc) mutex_exit(&sc->sc_lock); KERNEL_LOCK(1, NULL); /* XXXSMP */ - d->d_dev = config_found(sc->sc_dev, &oa, onewire_print); + d->d_dev = config_found(sc->sc_dev, &oa, onewire_print, + CFARG_EOL); KERNEL_UNLOCK_ONE(NULL); /* XXXSMP */ mutex_enter(&sc->sc_lock); diff --git a/sys/dev/pci/aac_pci.c b/sys/dev/pci/aac_pci.c index 789901e81ec..01924e32d27 100644 --- a/sys/dev/pci/aac_pci.c +++ b/sys/dev/pci/aac_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: aac_pci.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -617,7 +617,7 @@ aac_pci_attach(device_t parent, device_t self, void *aux) /* ARGSUSED */ static int -aac_pci_rescan(device_t self, const char *attr, const int *flags) +aac_pci_rescan(device_t self, const char *ifattr, const int *locs) { return aac_devscan(device_private(self)); diff --git a/sys/dev/pci/alipm.c b/sys/dev/pci/alipm.c index 650cebdc854..a504db734a6 100644 --- a/sys/dev/pci/alipm.c +++ b/sys/dev/pci/alipm.c @@ -1,4 +1,4 @@ -/* $NetBSD: alipm.c,v 1.11 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: alipm.c,v 1.12 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: alipm.c,v 1.13 2007/05/03 12:19:01 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: alipm.c,v 1.11 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: alipm.c,v 1.12 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -210,7 +210,7 @@ alipm_attach(device_t parent, device_t self, void *aux) memset(&iba, 0, sizeof iba); iba.iba_tag = &sc->sc_smb_tag; - (void)config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); return; diff --git a/sys/dev/pci/amdpm_smbus.c b/sys/dev/pci/amdpm_smbus.c index 89a87b515c4..a7641f4ab75 100644 --- a/sys/dev/pci/amdpm_smbus.c +++ b/sys/dev/pci/amdpm_smbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: amdpm_smbus.c,v 1.23 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: amdpm_smbus.c,v 1.24 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2005 Anil Gopinath (anil_public@yahoo.com) @@ -32,7 +32,7 @@ * AMD-8111 HyperTransport I/O Hub */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: amdpm_smbus.c,v 1.23 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdpm_smbus.c,v 1.24 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -75,7 +75,7 @@ amdpm_smbus_attach(struct amdpm_softc *sc) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - (void)config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); } static int diff --git a/sys/dev/pci/amr.c b/sys/dev/pci/amr.c index 6c1b9896088..892cee8270d 100644 --- a/sys/dev/pci/amr.c +++ b/sys/dev/pci/amr.c @@ -1,4 +1,4 @@ -/* $NetBSD: amr.c,v 1.65 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: amr.c,v 1.66 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.65 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.66 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -487,7 +487,7 @@ amr_attach(device_t parent, device_t self, void *aux) amr_sdh = shutdownhook_establish(amr_shutdown, NULL); /* Attach sub-devices. */ - amr_rescan(self, "amr", 0); + amr_rescan(self, NULL, NULL); SIMPLEQ_INIT(&amr->amr_ccb_queue); @@ -511,7 +511,7 @@ amr_attach(device_t parent, device_t self, void *aux) } static int -amr_rescan(device_t self, const char *attr, const int *flags) +amr_rescan(device_t self, const char *ifattr, const int *ulocs) { int j; int locs[AMRCF_NLOCS]; @@ -528,8 +528,12 @@ amr_rescan(device_t self, const char *attr, const int *flags) locs[AMRCF_UNIT] = j; - amr->amr_drive[j].al_dv = config_found_sm_loc(amr->amr_dv, - attr, locs, &amra, amr_print, config_stdsubmatch); + amr->amr_drive[j].al_dv = + config_found(amr->amr_dv, &amra, amr_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, ifattr, + CFARG_LOCATORS, locs, + CFARG_EOL); } return 0; } diff --git a/sys/dev/pci/arcmsr.c b/sys/dev/pci/arcmsr.c index c664735e794..a5437e92a9d 100644 --- a/sys/dev/pci/arcmsr.c +++ b/sys/dev/pci/arcmsr.c @@ -1,4 +1,4 @@ -/* $NetBSD: arcmsr.c,v 1.40 2019/10/01 18:00:08 chs Exp $ */ +/* $NetBSD: arcmsr.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */ /* @@ -21,7 +21,7 @@ #include "bio.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.40 2019/10/01 18:00:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -255,7 +255,8 @@ arc_attach(device_t parent, device_t self, void *aux) * Save the device_t returned, because we could to attach * devices via the management interface. */ - sc->sc_scsibus_dv = config_found(self, &sc->sc_chan, scsiprint); + sc->sc_scsibus_dv = config_found(self, &sc->sc_chan, scsiprint, + CFARG_EOL); /* enable interrupts */ arc_write(sc, ARC_REG_INTRMASK, diff --git a/sys/dev/pci/btvmei.c b/sys/dev/pci/btvmei.c index 707bdcdd6d9..30f280f8a37 100644 --- a/sys/dev/pci/btvmei.c +++ b/sys/dev/pci/btvmei.c @@ -1,4 +1,4 @@ -/* $NetBSD: btvmei.c,v 1.33 2020/08/24 05:37:41 msaitoh Exp $ */ +/* $NetBSD: btvmei.c,v 1.34 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1999 @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btvmei.c,v 1.33 2020/08/24 05:37:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btvmei.c,v 1.34 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -177,7 +177,7 @@ b3_617_attach(device_t parent, device_t self, void *aux) sc->csrwindow.offset = -1; sc->dmawindow24.offset = -1; sc->dmawindow32.offset = -1; - config_found(self, &vaa, 0); + config_found(self, &vaa, 0, CFARG_EOL); } #ifdef notyet diff --git a/sys/dev/pci/btvmeii.c b/sys/dev/pci/btvmeii.c index 9c35091199f..d6c16768c7c 100644 --- a/sys/dev/pci/btvmeii.c +++ b/sys/dev/pci/btvmeii.c @@ -1,4 +1,4 @@ -/* $NetBSD: btvmeii.c,v 1.24 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: btvmeii.c,v 1.25 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1999 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btvmeii.c,v 1.24 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btvmeii.c,v 1.25 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -276,7 +276,7 @@ b3_2706_attach(device_t parent, device_t self, void *aux) vaa.va_bdt = pa->pa_dmat; /* XXX */ vaa.va_slaveconfig = 0; /* XXX CSR window? */ - config_found(self, &vaa, 0); + config_found(self, &vaa, 0, CFARG_EOL); } #define sc ((struct b3_2706_softc*)vsc) diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index 7ce37979288..d403dbd3b58 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmpci.c,v 1.57 2020/02/29 05:51:11 isaki Exp $ */ +/* $NetBSD: cmpci.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.57 2020/02/29 05:51:11 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $"); #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) if (cmpcidebug) printf x @@ -419,7 +419,7 @@ cmpci_attach(device_t parent, device_t self, void *aux) aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; aa.hdl = NULL; - (void)config_found(sc->sc_dev, &aa, audioprint); + (void)config_found(sc->sc_dev, &aa, audioprint, CFARG_EOL); /* attach MPU-401 device */ aa.type = AUDIODEV_TYPE_MPU; @@ -427,7 +427,8 @@ cmpci_attach(device_t parent, device_t self, void *aux) aa.hdl = NULL; if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, CMPCI_REG_MPU_BASE, CMPCI_REG_MPU_SIZE, &sc->sc_mpu_ioh) == 0) - sc->sc_mpudev = config_found(sc->sc_dev, &aa, audioprint); + sc->sc_mpudev = config_found(sc->sc_dev, &aa, audioprint, + CFARG_EOL); /* get initial value (this is 0 and may be omitted but just in case) */ sc->sc_reg_misc = bus_space_read_4(sc->sc_iot, sc->sc_ioh, diff --git a/sys/dev/pci/coram.c b/sys/dev/pci/coram.c index b0a8339967e..3bb79ea1514 100644 --- a/sys/dev/pci/coram.c +++ b/sys/dev/pci/coram.c @@ -1,4 +1,4 @@ -/* $NetBSD: coram.c,v 1.18 2019/12/23 15:31:31 thorpej Exp $ */ +/* $NetBSD: coram.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.18 2019/12/23 15:31:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -225,8 +225,9 @@ coram_attach(device_t parent, device_t self, void *aux) /* attach iic(4) */ memset(&iba, 0, sizeof(iba)); iba.iba_tag = &cic->cic_i2c; - cic->cic_i2cdev = config_found_ia(self, "i2cbus", &iba, - iicbus_print); + cic->cic_i2cdev = config_found(self, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); #endif } @@ -324,8 +325,9 @@ coram_rescan(device_t self, const char *ifattr, const int *locs) daa.priv = sc; if (ifattr_match(ifattr, "dtvbus") && sc->sc_dtvdev == NULL) - sc->sc_dtvdev = config_found_ia(sc->sc_dev, "dtvbus", - &daa, dtv_print); + sc->sc_dtvdev = config_found(sc->sc_dev, &daa, dtv_print, + CFARG_IATTR, "dtvbus", + CFARG_EOL); return 0; } diff --git a/sys/dev/pci/cxdtv.c b/sys/dev/pci/cxdtv.c index 43f56c33a55..6c0b45d27fa 100644 --- a/sys/dev/pci/cxdtv.c +++ b/sys/dev/pci/cxdtv.c @@ -1,4 +1,4 @@ -/* $NetBSD: cxdtv.c,v 1.18 2019/12/23 15:32:29 thorpej Exp $ */ +/* $NetBSD: cxdtv.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.18 2019/12/23 15:32:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -253,7 +253,9 @@ cxdtv_attach(device_t parent, device_t self, void *aux) /* attach other devices to iic(4) */ memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - config_found_ia(self, "i2cbus", &iba, iicbus_print); + config_found(self, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); if (!pmf_device_register(self, NULL, cxdtv_resume)) aprint_error_dev(self, "couldn't establish power handler\n"); @@ -292,8 +294,9 @@ cxdtv_rescan(device_t self, const char *ifattr, const int *locs) daa.priv = sc; if (ifattr_match(ifattr, "dtvbus") && sc->sc_dtvdev == NULL) - sc->sc_dtvdev = config_found_ia(sc->sc_dev, "dtvbus", - &daa, dtv_print); + sc->sc_dtvdev = config_found(sc->sc_dev, &daa, dtv_print, + CFARG_IATTR, "dtvbus", + CFARG_EOL); return 0; } diff --git a/sys/dev/pci/cxgb/cxgb_main.c b/sys/dev/pci/cxgb/cxgb_main.c index cec22bc2597..8ccfba751bb 100644 --- a/sys/dev/pci/cxgb/cxgb_main.c +++ b/sys/dev/pci/cxgb/cxgb_main.c @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.8 2020/02/04 05:44:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.9 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -468,8 +468,10 @@ cxgb_controller_attach(device_t parent, device_t dev, void *context) locs[0] = 1; locs[1] = i; printf("\n"); // for cleaner formatting in dmesg - child = config_found_sm_loc(dev, "cxgbc", locs, &cxgb_args, - cxgb_cfprint, config_stdsubmatch); + child = config_found(dev, &cxgb_args, cxgb_cfprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); printf("\n"); // for cleaner formatting in dmesg sc->portdev[i] = child; } diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c index d254434e0f1..27c54ab74f6 100644 --- a/sys/dev/pci/ehci_pci.c +++ b/sys/dev/pci/ehci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.70 2019/06/13 17:33:34 maxv Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.71 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.70 2019/06/13 17:33:34 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.71 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -255,7 +255,8 @@ ehci_pci_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); return; fail: diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index ab428097302..7e40217e735 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $NetBSD: eso.c,v 1.72 2019/10/28 18:38:43 joerg Exp $ */ +/* $NetBSD: eso.c,v 1.73 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.72 2019/10/28 18:38:43 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.73 2021/04/24 23:36:57 thorpej Exp $"); #include "mpu.h" @@ -426,12 +426,12 @@ eso_attach(device_t parent, device_t self, void *aux) aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; aa.hdl = NULL; - (void)config_found(sc->sc_dev, &aa, audioprint); + (void)config_found(sc->sc_dev, &aa, audioprint, CFARG_EOL); aa.type = AUDIODEV_TYPE_MPU; aa.hwif = NULL; aa.hdl = NULL; - sc->sc_mpudev = config_found(sc->sc_dev, &aa, audioprint); + sc->sc_mpudev = config_found(sc->sc_dev, &aa, audioprint, CFARG_EOL); if (sc->sc_mpudev != NULL) { /* Unmask the MPU irq. */ mutex_spin_enter(&sc->sc_intr_lock); @@ -444,7 +444,7 @@ eso_attach(device_t parent, device_t self, void *aux) aa.type = AUDIODEV_TYPE_AUX; aa.hwif = NULL; aa.hdl = NULL; - (void)config_found(sc->sc_dev, &aa, eso_print); + (void)config_found(sc->sc_dev, &aa, eso_print, CFARG_EOL); } static void diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index 61b0a23fcc0..b87312101cb 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $NetBSD: fms.c,v 1.47 2019/06/08 08:02:38 isaki Exp $ */ +/* $NetBSD: fms.c,v 1.48 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.47 2019/06/08 08:02:38 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.48 2021/04/24 23:36:57 thorpej Exp $"); #include "mpu.h" @@ -325,12 +325,12 @@ fms_attach(device_t parent, device_t self, void *aux) aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; aa.hdl = NULL; - config_found(sc->sc_dev, &aa, audioprint); + config_found(sc->sc_dev, &aa, audioprint, CFARG_EOL); aa.type = AUDIODEV_TYPE_MPU; aa.hwif = NULL; aa.hdl = NULL; - sc->sc_mpu_dev = config_found(sc->sc_dev, &aa, audioprint); + sc->sc_mpu_dev = config_found(sc->sc_dev, &aa, audioprint, CFARG_EOL); } /* diff --git a/sys/dev/pci/genfb_pci.c b/sys/dev/pci/genfb_pci.c index 80ba1ad4dae..5371dae2179 100644 --- a/sys/dev/pci/genfb_pci.c +++ b/sys/dev/pci/genfb_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_pci.c,v 1.38 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: genfb_pci.c,v 1.39 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.38 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.39 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -192,7 +192,9 @@ pci_genfb_attach(device_t parent, device_t self, void *aux) if (genfb_attach(&sc->sc_gen, &ops) == 0) { /* now try to attach a DRM */ - config_found_ia(self, "drm", aux, pci_genfb_drm_print); + config_found(self, aux, pci_genfb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } } diff --git a/sys/dev/pci/gffb.c b/sys/dev/pci/gffb.c index fbccc0e9784..cc26c4b29ea 100644 --- a/sys/dev/pci/gffb.c +++ b/sys/dev/pci/gffb.c @@ -1,4 +1,4 @@ -/* $NetBSD: gffb.c,v 1.15 2021/02/25 19:11:44 macallan Exp $ */ +/* $NetBSD: gffb.c,v 1.16 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2013 Michael Lorenz @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gffb.c,v 1.15 2021/02/25 19:11:44 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gffb.c,v 1.16 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -378,7 +378,7 @@ gffb_attach(device_t parent, device_t self, void *aux) aa.accessops = &gffb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); #ifdef GFFB_DEBUG for (i = 0; i < 40; i++) { diff --git a/sys/dev/pci/ibmcd.c b/sys/dev/pci/ibmcd.c index 3788432c9f0..01938c05bdb 100644 --- a/sys/dev/pci/ibmcd.c +++ b/sys/dev/pci/ibmcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ibmcd.c,v 1.3 2017/01/20 12:25:07 maya Exp $ */ +/* $NetBSD: ibmcd.c,v 1.4 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2012 Marc Balmer <marc@msys.ch> @@ -136,7 +136,7 @@ ibmcd_attach(device_t parent, device_t self, void *aux) gba.gba_npins = IBMCD_NPINS; /* Attach GPIO framework */ - config_found_ia(self, "gpiobus", &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, CFARG_EOL); } diff --git a/sys/dev/pci/ichsmb.c b/sys/dev/pci/ichsmb.c index 198fc0f0589..5c87e4b21ec 100644 --- a/sys/dev/pci/ichsmb.c +++ b/sys/dev/pci/ichsmb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.69 2021/01/15 14:07:15 thorpej Exp $ */ +/* $NetBSD: ichsmb.c,v 1.70 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: ichiic.c,v 1.44 2020/10/07 11:23:05 jsg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.69 2021/01/15 14:07:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.70 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -163,7 +163,6 @@ ichsmb_attach(device_t parent, device_t self, void *aux) pcireg_t conf; const char *intrstr = NULL; char intrbuf[PCI_INTRSTR_LEN]; - int flags; sc->sc_dev = self; sc->sc_pc = pa->pa_pc; @@ -218,23 +217,19 @@ ichsmb_attach(device_t parent, device_t self, void *aux) } sc->sc_i2c_device = NULL; - flags = 0; - ichsmb_rescan(self, "i2cbus", &flags); + ichsmb_rescan(self, NULL, NULL); out: if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); } static int -ichsmb_rescan(device_t self, const char *ifattr, const int *flags) +ichsmb_rescan(device_t self, const char *ifattr, const int *locators) { struct ichsmb_softc *sc = device_private(self); struct i2cbus_attach_args iba; - if (!ifattr_match(ifattr, "i2cbus")) - return 0; - - if (sc->sc_i2c_device) + if (sc->sc_i2c_device != NULL) return 0; /* Attach I2C bus */ @@ -244,7 +239,7 @@ ichsmb_rescan(device_t self, const char *ifattr, const int *flags) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c_tag; - sc->sc_i2c_device = config_found_ia(self, ifattr, &iba, iicbus_print); + sc->sc_i2c_device = config_found(self, &iba, iicbus_print, CFARG_EOL); return 0; } diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 1736c853122..7488342751e 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_msk.c,v 1.114 2020/10/04 16:23:04 jakllsch Exp $ */ +/* $NetBSD: if_msk.c,v 1.115 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $ */ /* @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.114 2020/10/04 16:23:04 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.115 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1749,13 +1749,13 @@ mskc_attach(device_t parent, device_t self, void *aux) skca.skc_port = SK_PORT_A; skca.skc_type = sc->sk_type; skca.skc_rev = sc->sk_rev; - (void)config_found(sc->sk_dev, &skca, mskcprint); + (void)config_found(sc->sk_dev, &skca, mskcprint, CFARG_EOL); if (sc->sk_macs > 1) { skca.skc_port = SK_PORT_B; skca.skc_type = sc->sk_type; skca.skc_rev = sc->sk_rev; - (void)config_found(sc->sk_dev, &skca, mskcprint); + (void)config_found(sc->sk_dev, &skca, mskcprint, CFARG_EOL); } /* Turn on the 'driver is loaded' LED. */ diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 42bb05368e9..11b01e0e844 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sk.c,v 1.106 2020/07/02 09:07:10 msaitoh Exp $ */ +/* $NetBSD: if_sk.c,v 1.107 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -115,7 +115,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.106 2020/07/02 09:07:10 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.107 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1798,11 +1798,11 @@ skc_attach(device_t parent, device_t self, void *aux) sc->sk_name, revstr, sc->sk_rev); skca.skc_port = SK_PORT_A; - (void)config_found(sc->sk_dev, &skca, skcprint); + (void)config_found(sc->sk_dev, &skca, skcprint, CFARG_EOL); if (!(sk_win_read_1(sc, SK_CONFIG) & SK_CONFIG_SINGLEMAC)) { skca.skc_port = SK_PORT_B; - (void)config_found(sc->sk_dev, &skca, skcprint); + (void)config_found(sc->sk_dev, &skca, skcprint, CFARG_EOL); } /* Turn on the 'driver is loaded' LED. */ diff --git a/sys/dev/pci/igma.c b/sys/dev/pci/igma.c index 1246f71fb13..18817eaac1b 100644 --- a/sys/dev/pci/igma.c +++ b/sys/dev/pci/igma.c @@ -1,4 +1,4 @@ -/* $NetBSD: igma.c,v 1.4 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: igma.c,v 1.5 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2014 Michael van Elst @@ -21,7 +21,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: igma.c,v 1.4 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: igma.c,v 1.5 2021/04/24 23:36:57 thorpej Exp $"); #include "vga.h" @@ -406,7 +406,9 @@ igma_attach(device_t parent, device_t self, void *aux) #if NIGMAFB > 0 strcpy(iaa.iaa_name, "igmafb"); iaa.iaa_chip = sc->sc_chip; - config_found_ia(sc->sc_dev, "igmabus", &iaa, igma_print); + config_found(sc->sc_dev, &iaa, igma_print, + CFARG_IATTR, "igmabus", + CFARG_EOL); #endif igma_i2c_attach(sc); @@ -467,7 +469,9 @@ igma_i2c_attach(struct igma_softc *sc) #if 0 memset(&iba, 0, sizeof(iba)); iba.iba_tag = &ii->ii_i2c; - config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); #endif } } diff --git a/sys/dev/pci/igma/igmafb.c b/sys/dev/pci/igma/igmafb.c index 13ec7c5d908..ce4c145fbc1 100644 --- a/sys/dev/pci/igma/igmafb.c +++ b/sys/dev/pci/igma/igmafb.c @@ -1,4 +1,4 @@ -/* $NetBSD: igmafb.c,v 1.2 2020/02/24 12:20:30 rin Exp $ */ +/* $NetBSD: igmafb.c,v 1.3 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2012 Michael van Elst @@ -21,7 +21,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: igmafb.c,v 1.2 2020/02/24 12:20:30 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: igmafb.c,v 1.3 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -203,7 +203,7 @@ igmafb_attach(device_t parent, device_t self, void *aux) waa.accessops = &igmafb_accessops; waa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &waa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &waa, wsemuldisplaydevprint, CFARG_EOL); } /* diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index 368b3b7cace..318d33e45df 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $NetBSD: ips.c,v 1.2 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: ips.c,v 1.3 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: ips.c,v 1.113 2016/08/14 04:08:03 dlg Exp $ */ /*- @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ips.c,v 1.2 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ips.c,v 1.3 2021/04/24 23:36:57 thorpej Exp $"); #include "bio.h" @@ -813,7 +813,7 @@ ips_attach(struct device *parent, struct device *self, void *aux) chan->chan_nluns = lastarget + 1; chan->chan_id = i; chan->chan_flags = SCSIPI_CHAN_NOSETTLE; - config_found(self, chan, scsiprint); + config_found(self, chan, scsiprint, CFARG_EOL); } /* Enable interrupts */ diff --git a/sys/dev/pci/ismt.c b/sys/dev/pci/ismt.c index b95d3d23b9f..04c7ec93c5c 100644 --- a/sys/dev/pci/ismt.c +++ b/sys/dev/pci/ismt.c @@ -60,7 +60,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ismt/ismt.c 266474 2014-05-20 19:55:06Z jimharris $"); #endif -__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.7 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.8 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -787,15 +787,12 @@ ismt_match(device_t parent, cfdata_t match, void *aux) } static int -ismt_rescan(device_t self, const char *ifattr, const int *flags) +ismt_rescan(device_t self, const char *ifattr, const int *locators) { struct ismt_softc *sc = device_private(self); struct i2cbus_attach_args iba; - if (!ifattr_match(ifattr, "i2cbus")) - return 0; - - if (sc->smbdev) + if (sc->smbdev != NULL) return 0; /* Attach I2C bus */ @@ -805,7 +802,7 @@ ismt_rescan(device_t self, const char *ifattr, const int *flags) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c_tag; - sc->smbdev = config_found_ia(self, ifattr, &iba, iicbus_print); + sc->smbdev = config_found(self, &iba, iicbus_print, CFARG_EOL); return 0; } @@ -813,9 +810,8 @@ ismt_rescan(device_t self, const char *ifattr, const int *flags) static void ismt_config_interrupts(device_t self) { - int flags = 0; - ismt_rescan(self, "i2cbus", &flags); + ismt_rescan(self, NULL, NULL); } static void diff --git a/sys/dev/pci/jmide.c b/sys/dev/pci/jmide.c index 7a1f9ff5224..c1ab595a287 100644 --- a/sys/dev/pci/jmide.c +++ b/sys/dev/pci/jmide.c @@ -1,4 +1,4 @@ -/* $NetBSD: jmide.c,v 1.23 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: jmide.c,v 1.24 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.23 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.24 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -224,9 +224,11 @@ jmide_attach(device_t parent, device_t self, void *aux) aprint_error("%s: can't map ahci registers\n", JM_NAME(sc)); } else { - sc->sc_ahci = config_found_ia( + sc->sc_ahci = config_found( sc->sc_pciide.sc_wdcdev.sc_atac.atac_dev, - "jmide_hl", &jma, jmahci_print); + &jma, jmahci_print, + CFARG_IATTR, "jmide_hl", + CFARG_EOL); } /* * if we couldn't attach an ahci, try to fall back diff --git a/sys/dev/pci/joy_eap.c b/sys/dev/pci/joy_eap.c index fa5952af133..b7963b0fcb4 100644 --- a/sys/dev/pci/joy_eap.c +++ b/sys/dev/pci/joy_eap.c @@ -1,7 +1,7 @@ -/* $NetBSD: joy_eap.c,v 1.14 2019/05/08 13:40:19 isaki Exp $ */ +/* $NetBSD: joy_eap.c,v 1.15 2021/04/24 23:36:57 thorpej Exp $ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: joy_eap.c,v 1.14 2019/05/08 13:40:19 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: joy_eap.c,v 1.15 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -59,7 +59,7 @@ eap_joy_attach(device_t eapdev, struct eap_gameport_args *gpa) aa.aa_aaa.type = AUDIODEV_TYPE_AUX; aa.aa_iot = gpa->gpa_iot; aa.aa_ioh = ioh; - joydev = config_found(eapdev, &aa, 0); + joydev = config_found(eapdev, &aa, 0, CFARG_EOL); /* this cannot fail */ KASSERT(joydev != NULL); diff --git a/sys/dev/pci/lynxfb.c b/sys/dev/pci/lynxfb.c index 9f402620de8..a57fc572d3c 100644 --- a/sys/dev/pci/lynxfb.c +++ b/sys/dev/pci/lynxfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: lynxfb.c,v 1.5 2016/07/10 21:40:45 jmcneill Exp $ */ +/* $NetBSD: lynxfb.c,v 1.6 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $ */ /* @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.5 2016/07/10 21:40:45 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.6 2021/04/24 23:36:57 thorpej Exp $"); #include "opt_wsemul.h" @@ -364,7 +364,7 @@ lynxfb_attach(device_t parent, device_t self, void *aux) waa.accessops = &lynxfb_accessops; waa.accesscookie = &sc->sc_vd; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } /* diff --git a/sys/dev/pci/machfb.c b/sys/dev/pci/machfb.c index e755f67ca5c..8807d241921 100644 --- a/sys/dev/pci/machfb.c +++ b/sys/dev/pci/machfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: machfb.c,v 1.103 2020/10/10 08:29:32 jdc Exp $ */ +/* $NetBSD: machfb.c,v 1.104 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2002 Bang Jun-Young @@ -34,7 +34,7 @@ #include <sys/cdefs.h> __KERNEL_RCSID(0, - "$NetBSD: machfb.c,v 1.103 2020/10/10 08:29:32 jdc Exp $"); + "$NetBSD: machfb.c,v 1.104 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -785,7 +785,9 @@ mach64_attach(device_t parent, device_t self, void *aux) aa.accessops = &sc->sc_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); #if 0 /* XXX * turns out some firmware doesn't turn these back on when needed @@ -806,7 +808,9 @@ mach64_attach(device_t parent, device_t self, void *aux) regw(sc, BUS_CNTL, reg); } #endif - config_found_ia(self, "drm", aux, machfb_drm_print); + config_found(self, aux, machfb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index b29552dd077..994eb7d4f57 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfii.c,v 1.7 2020/05/14 08:34:18 msaitoh Exp $ */ +/* $NetBSD: mfii.c,v 1.8 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.7 2020/05/14 08:34:18 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.8 2021/04/24 23:36:57 thorpej Exp $"); #include "bio.h" @@ -838,7 +838,7 @@ mfii_attach(device_t parent, device_t self, void *aux) chan->chan_ntargets = sc->sc_info.mci_max_lds; chan->chan_id = sc->sc_info.mci_max_lds; - mfii_rescan(sc->sc_dev, "scsi", NULL); + mfii_rescan(sc->sc_dev, NULL, NULL); if (mfii_aen_register(sc) != 0) { /* error printed by mfii_aen_register */ @@ -988,11 +988,11 @@ static int mfii_rescan(device_t self, const char *ifattr, const int *locators) { struct mfii_softc *sc = device_private(self); + if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found_sm_loc(self, ifattr, locators, &sc->sc_chan, - scsiprint, NULL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; } diff --git a/sys/dev/pci/mlx_pci.c b/sys/dev/pci/mlx_pci.c index 49dbb033377..728418dce42 100644 --- a/sys/dev/pci/mlx_pci.c +++ b/sys/dev/pci/mlx_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: mlx_pci.c,v 1.28 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.28 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -145,7 +145,7 @@ static struct mlx_pci_ident { }; static int -mlx_pci_rescan(device_t self, const char *attr, const int *flag) +mlx_pci_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1); diff --git a/sys/dev/pci/mly.c b/sys/dev/pci/mly.c index a4ca605a91e..9d889d440dd 100644 --- a/sys/dev/pci/mly.c +++ b/sys/dev/pci/mly.c @@ -1,4 +1,4 @@ -/* $NetBSD: mly.c,v 1.53 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: mly.c,v 1.54 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.53 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.54 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -533,7 +533,7 @@ mly_attach(device_t parent, device_t self, void *aux) chan->chan_nluns = MLY_MAX_LUNS; chan->chan_id = mly->mly_controllerparam->initiator_id; chan->chan_flags = SCSIPI_CHAN_NOSETTLE; - config_found(self, chan, scsiprint); + config_found(self, chan, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 4ef44bd7810..4b53dacfa29 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.27 2021/02/23 07:17:58 skrll Exp $ */ +/* $NetBSD: mpii.c,v 1.28 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.27 2021/02/23 07:17:58 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.28 2021/04/24 23:36:57 thorpej Exp $"); #include "bio.h" @@ -624,7 +624,7 @@ mpii_attach(device_t parent, device_t self, void *aux) chan->chan_ntargets = sc->sc_max_devices; chan->chan_id = -1; - mpii_rescan(self, "scsi", NULL); + mpii_rescan(self, NULL, NULL); /* enable interrupts */ mpii_write(sc, MPII_INTR_MASK, MPII_INTR_MASK_DOORBELL @@ -726,8 +726,7 @@ mpii_rescan(device_t self, const char *ifattr, const int *locators) if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found_sm_loc(self, ifattr, locators, &sc->sc_chan, - scsiprint, NULL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; } diff --git a/sys/dev/pci/nfsmb.c b/sys/dev/pci/nfsmb.c index d4fdd422879..90b6e23fce6 100644 --- a/sys/dev/pci/nfsmb.c +++ b/sys/dev/pci/nfsmb.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfsmb.c,v 1.25 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: nfsmb.c,v 1.26 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ * */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfsmb.c,v 1.25 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfsmb.c,v 1.26 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -167,12 +167,14 @@ nfsmbc_attach(device_t parent, device_t self, void *aux) reg = pci_conf_read(pa->pa_pc, pa->pa_tag, baseregs[0]); nfsmbca.nfsmb_num = 1; nfsmbca.nfsmb_addr = NFORCE_SMBBASE(reg); - sc->sc_nfsmb[0] = config_found(sc->sc_dev, &nfsmbca, nfsmbc_print); + sc->sc_nfsmb[0] = config_found(sc->sc_dev, &nfsmbca, nfsmbc_print, + CFARG_EOL); reg = pci_conf_read(pa->pa_pc, pa->pa_tag, baseregs[1]); nfsmbca.nfsmb_num = 2; nfsmbca.nfsmb_addr = NFORCE_SMBBASE(reg); - sc->sc_nfsmb[1] = config_found(sc->sc_dev, &nfsmbca, nfsmbc_print); + sc->sc_nfsmb[1] = config_found(sc->sc_dev, &nfsmbca, nfsmbc_print, + CFARG_EOL); /* This driver is similar to an ISA bridge that doesn't * need any special handling. So registering NULL handlers @@ -236,7 +238,7 @@ nfsmb_attach(device_t parent, device_t self, void *aux) memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - (void) config_found_ia(sc->sc_dev, "i2cbus", &iba, iicbus_print); + config_found(sc->sc_dev, &iba, iicbus_print, CFARG_EOL); /* This driver is similar to an ISA bridge that doesn't * need any special handling. So registering NULL handlers diff --git a/sys/dev/pci/oboe.c b/sys/dev/pci/oboe.c index 6f3fcb00a5e..f66471f5a5f 100644 --- a/sys/dev/pci/oboe.c +++ b/sys/dev/pci/oboe.c @@ -1,4 +1,4 @@ -/* $NetBSD: oboe.c,v 1.47 2020/12/18 02:55:32 thorpej Exp $ */ +/* $NetBSD: oboe.c,v 1.48 2021/04/24 23:36:57 thorpej Exp $ */ /* XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage */ @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.47 2020/12/18 02:55:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.48 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -239,7 +239,7 @@ oboe_attach(device_t parent, device_t self, void *aux) oboe_alloc_taskfile(sc); - sc->sc_child = config_found(self, &ia, ir_print); + sc->sc_child = config_found(self, &ia, ir_print, CFARG_EOL); } static int diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c index f323ddc055f..e5018534542 100644 --- a/sys/dev/pci/ohci_pci.c +++ b/sys/dev/pci/ohci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci_pci.c,v 1.57 2018/04/09 16:21:10 jakllsch Exp $ */ +/* $NetBSD: ohci_pci.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.57 2018/04/09 16:21:10 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.58 2021/04/24 23:36:57 thorpej Exp $"); #include "ehci.h" @@ -167,7 +167,8 @@ ohci_pci_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); return; fail: diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index e8b3733d414..aaccbe8a997 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $NetBSD: pccbb.c,v 1.215 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: pccbb.c,v 1.216 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1998, 1999 and 2000 @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.215 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.216 2021/04/24 23:36:57 thorpej Exp $"); /* #define CBB_DEBUG @@ -680,8 +680,9 @@ pccbb_pci_callback(device_t self) pccbb_intrinit(sc); - if (NULL != (csc = config_found_ia(self, "pcmciaslot", &caa, - cbbprint))) { + if (NULL != (csc = config_found(self, &caa, cbbprint, + CFARG_IATTR, "pcmciaslot", + CFARG_EOL))) { DPRINTF(("%s: found cardslot\n", __func__)); sc->sc_csc = device_private(csc); } diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 4556a689e91..d58fad02fa0 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.158 2021/01/29 06:00:08 skrll Exp $ */ +/* $NetBSD: pci.c,v 1.159 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.158 2021/01/29 06:00:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.159 2021/04/24 23:36:57 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -461,8 +461,10 @@ pci_probe_device(struct pci_softc *sc, pcitag_t tag, else c->c_psok = false; - c->c_dev = config_found_sm_loc(sc->sc_dev, "pci", locs, &pa, - pciprint, config_stdsubmatch); + c->c_dev = config_found(sc->sc_dev, &pa, pciprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); ret = (c->c_dev != NULL); } diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index ed5a21c033d..30a0ec25b62 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $NetBSD: piixpm.c,v 1.63 2020/01/14 15:42:03 msaitoh Exp $ */ +/* $NetBSD: piixpm.c,v 1.64 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: piixpm.c,v 1.39 2013/10/01 20:06:02 sf Exp $ */ /* @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.63 2020/01/14 15:42:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.64 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -192,7 +192,7 @@ piixpm_attach(device_t parent, device_t self, void *aux) pci_intr_handle_t ih; bool usesmi = false; const char *intrstr = NULL; - int i, flags; + int i; char intrbuf[PCI_INTRSTR_LEN]; sc->sc_dev = self; @@ -304,8 +304,7 @@ setintr: for (i = 0; i < sc->sc_numbusses; i++) sc->sc_i2c_device[i] = NULL; - flags = 0; - piixpm_rescan(self, "i2cbus", &flags); + piixpm_rescan(self, NULL, NULL); } static int @@ -322,22 +321,20 @@ piixpm_iicbus_print(void *aux, const char *pnp) return UNCONF; } + static int -piixpm_rescan(device_t self, const char *ifattr, const int *flags) +piixpm_rescan(device_t self, const char *ifattr, const int *locators) { struct piixpm_softc *sc = device_private(self); struct i2cbus_attach_args iba; int i; - if (!ifattr_match(ifattr, "i2cbus")) - return 0; - /* Attach I2C bus */ for (i = 0; i < sc->sc_numbusses; i++) { struct i2c_controller *tag = &sc->sc_i2c_tags[i]; - if (sc->sc_i2c_device[i]) + if (sc->sc_i2c_device[i] != NULL) continue; sc->sc_busses[i].sda = i; sc->sc_busses[i].softc = sc; @@ -353,8 +350,8 @@ piixpm_rescan(device_t self, const char *ifattr, const int *flags) tag->ic_exec = piixpm_i2c_exec; memset(&iba, 0, sizeof(iba)); iba.iba_tag = tag; - sc->sc_i2c_device[i] = config_found_ia(self, ifattr, &iba, - piixpm_iicbus_print); + sc->sc_i2c_device[i] = + config_found(self, &iba, piixpm_iicbus_print, CFARG_EOL); } return 0; diff --git a/sys/dev/pci/pm2fb.c b/sys/dev/pci/pm2fb.c index e3b37124975..89c93d225cd 100644 --- a/sys/dev/pci/pm2fb.c +++ b/sys/dev/pci/pm2fb.c @@ -1,4 +1,4 @@ -/* $NetBSD: pm2fb.c,v 1.31 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: pm2fb.c,v 1.32 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2009, 2012 Michael Lorenz @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.31 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.32 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -459,7 +459,7 @@ pm2fb_attach(device_t parent, device_t self, void *aux) aa.accessops = &pm2fb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); #ifdef PM2FB_DEBUG /* diff --git a/sys/dev/pci/pm3fb.c b/sys/dev/pci/pm3fb.c index d49dec50aa2..7e4376d36a8 100644 --- a/sys/dev/pci/pm3fb.c +++ b/sys/dev/pci/pm3fb.c @@ -332,7 +332,7 @@ pm3fb_attach(device_t parent, device_t self, void *aux) aa.accessops = &pm3fb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } static int diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c index 437161104f6..3548e6f7033 100644 --- a/sys/dev/pci/ppb.c +++ b/sys/dev/pci/ppb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ppb.c,v 1.70 2020/07/12 23:52:37 rin Exp $ */ +/* $NetBSD: ppb.c,v 1.71 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.70 2020/07/12 23:52:37 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.71 2021/04/24 23:36:57 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ppb.h" @@ -436,7 +436,7 @@ configure: pba.pba_intrswiz = pa->pa_intrswiz; pba.pba_intrtag = pa->pa_intrtag; - config_found_ia(self, "pcibus", &pba, pcibusprint); + config_found(self, &pba, pcibusprint, CFARG_EOL); } static int diff --git a/sys/dev/pci/puc.c b/sys/dev/pci/puc.c index e6f03519c56..6877addf204 100644 --- a/sys/dev/pci/puc.c +++ b/sys/dev/pci/puc.c @@ -1,4 +1,4 @@ -/* $NetBSD: puc.c,v 1.40 2018/11/30 16:26:59 jmcneill Exp $ */ +/* $NetBSD: puc.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1996, 1998, 1999 @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puc.c,v 1.40 2018/11/30 16:26:59 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puc.c,v 1.41 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -317,8 +317,10 @@ puc_attach(device_t parent, device_t self, void *aux) locs[PUCCF_PORT] = i; /* and configure it */ - sc->sc_ports[i].dev = config_found_sm_loc(self, "puc", locs, - &paa, puc_print, config_stdsubmatch); + sc->sc_ports[i].dev = config_found(self, &paa, puc_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } diff --git a/sys/dev/pci/r128fb.c b/sys/dev/pci/r128fb.c index 09d6c280fe6..47ebb063ffe 100644 --- a/sys/dev/pci/r128fb.c +++ b/sys/dev/pci/r128fb.c @@ -1,4 +1,4 @@ -/* $NetBSD: r128fb.c,v 1.42 2020/05/21 22:55:48 macallan Exp $ */ +/* $NetBSD: r128fb.c,v 1.43 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2007, 2012 Michael Lorenz @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.42 2020/05/21 22:55:48 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.43 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -356,7 +356,7 @@ r128fb_attach(device_t parent, device_t self, void *aux) aa.accessops = &r128fb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } static int diff --git a/sys/dev/pci/radeonfb.c b/sys/dev/pci/radeonfb.c index 1b7f4a229c9..2260a328d02 100644 --- a/sys/dev/pci/radeonfb.c +++ b/sys/dev/pci/radeonfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.113 2021/03/14 03:14:42 rin Exp $ */ +/* $NetBSD: radeonfb.c,v 1.114 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113 2021/03/14 03:14:42 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.114 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1013,7 +1013,9 @@ radeonfb_attach(device_t parent, device_t dev, void *aux) aa.accessops = &radeonfb_accessops; aa.accesscookie = &dp->rd_vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); radeonfb_blank(dp, 0); @@ -1053,7 +1055,9 @@ radeonfb_attach(device_t parent, device_t dev, void *aux) * screen blanking we only do it if needed */ sc->sc_needs_unmap = - (config_found_ia(dev, "drm", aux, radeonfb_drm_print) != 0); + (config_found(dev, aux, radeonfb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL) != 0); DPRINTF(("needs_unmap: %d\n", sc->sc_needs_unmap)); if (!IS_AVIVO(sc)) { diff --git a/sys/dev/pci/sisfb.c b/sys/dev/pci/sisfb.c index 6906eecdef4..776d7e37fb9 100644 --- a/sys/dev/pci/sisfb.c +++ b/sys/dev/pci/sisfb.c @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sisfb.c,v 1.5 2014/01/26 21:22:49 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sisfb.c,v 1.6 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -332,7 +332,7 @@ sisfb_attach(device_t parent, device_t self, void *aux) waa.accessops = &sisfb_accessops; waa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &waa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &waa, wsemuldisplaydevprint, CFARG_EOL); return; fail3: diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index 355e09d2250..1ce4564ee11 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.59 2021/02/06 12:55:34 isaki Exp $ */ +/* $NetBSD: sv.c,v 1.60 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.59 2021/02/06 12:55:34 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.60 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -449,7 +449,7 @@ sv_attach(device_t parent, device_t self, void *aux) arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(self, &arg, audioprint); + (void)config_found(self, &arg, audioprint, CFARG_EOL); sc->sc_pa = *pa; /* for deferred setup */ config_defer(self, sv_defer); diff --git a/sys/dev/pci/tdvfb.c b/sys/dev/pci/tdvfb.c index f834c9926d9..ae5ac543e80 100644 --- a/sys/dev/pci/tdvfb.c +++ b/sys/dev/pci/tdvfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: tdvfb.c,v 1.8 2014/02/28 05:55:23 matt Exp $ */ +/* $NetBSD: tdvfb.c,v 1.9 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tdvfb.c,v 1.8 2014/02/28 05:55:23 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tdvfb.c,v 1.9 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -279,7 +279,7 @@ tdvfb_attach(device_t parent, device_t self, void *aux) ws_aa.accessops = &tdvfb_accessops; ws_aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &ws_aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &ws_aa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index 64db305b3de..fe02922e1f8 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $NetBSD: tga.c,v 1.86 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: tga.c,v 1.87 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tga.c,v 1.86 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tga.c,v 1.87 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -508,7 +508,7 @@ tgaattach(device_t parent, device_t self, void *aux) aa.accessops = &tga_accessops; aa.accesscookie = sc; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); config_interrupts(self, tga_config_interrupts); } diff --git a/sys/dev/pci/trm.c b/sys/dev/pci/trm.c index 75da8b4aa35..b130d736498 100644 --- a/sys/dev/pci/trm.c +++ b/sys/dev/pci/trm.c @@ -1,4 +1,4 @@ -/* $NetBSD: trm.c,v 1.41 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: trm.c,v 1.42 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2002 Izumi Tsutsui. All rights reserved. * @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trm.c,v 1.41 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trm.c,v 1.42 2021/04/24 23:36:57 thorpej Exp $"); /* #define TRM_DEBUG */ #ifdef TRM_DEBUG @@ -502,7 +502,7 @@ trm_attach(device_t parent, device_t self, void *aux) sc->sc_channel.chan_nluns = 8; sc->sc_channel.chan_id = sc->sc_id; - config_found(self, &sc->sc_channel, scsiprint); + config_found(self, &sc->sc_channel, scsiprint, CFARG_EOL); } /* diff --git a/sys/dev/pci/twa.c b/sys/dev/pci/twa.c index dfcb9545504..4cc7e28ded0 100644 --- a/sys/dev/pci/twa.c +++ b/sys/dev/pci/twa.c @@ -1,4 +1,4 @@ -/* $NetBSD: twa.c,v 1.58 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: twa.c,v 1.59 2021/04/24 23:36:57 thorpej Exp $ */ /* $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $ */ /*- @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.58 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.59 2021/04/24 23:36:57 thorpej Exp $"); //#define TWA_DEBUG @@ -1009,8 +1009,11 @@ twa_request_bus_scan(device_t self, const char *attr, const int *flags) locs[TWACF_UNIT] = unit; sc->sc_units[unit].td_dev = - config_found_sm_loc(sc->twa_dv, attr, - locs, &twaa, twa_print, config_stdsubmatch); + config_found(sc->twa_dv, &twaa, twa_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, attr, + CFARG_LOCATORS, locs, + CFARG_EOL); } } else { if (td->td_dev != NULL) { @@ -1487,7 +1490,7 @@ twa_setup(device_t self) twa_describe_controller(sc); - error = twa_request_bus_scan(self, "twa", 0); + error = twa_request_bus_scan(self, NULL, NULL); twa_outl(sc, TWA_CONTROL_REGISTER_OFFSET, TWA_CONTROL_CLEAR_ATTENTION_INTERRUPT | diff --git a/sys/dev/pci/twe.c b/sys/dev/pci/twe.c index 2efd0ef8216..2e65b99a409 100644 --- a/sys/dev/pci/twe.c +++ b/sys/dev/pci/twe.c @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.108 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: twe.c,v 1.109 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.109 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -451,7 +451,7 @@ twe_attach(device_t parent, device_t self, void *aux) twe_describe_controller(sc); /* Find and attach RAID array units. */ - twe_rescan(self, "twe", 0); + twe_rescan(self, NULL, NULL); /* ...and finally, enable interrupts. */ twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR | @@ -482,7 +482,7 @@ twe_attach(device_t parent, device_t self, void *aux) } static int -twe_rescan(device_t self, const char *attr, const int *flags) +twe_rescan(device_t self, const char *ifattr, const int *locs) { struct twe_softc *sc; int i; @@ -634,8 +634,10 @@ twe_add_unit(struct twe_softc *sc, int unit) locs[TWECF_UNIT] = unit; - td->td_dev = config_found_sm_loc(sc->sc_dev, "twe", locs, &twea, - twe_print, config_stdsubmatch); + td->td_dev = config_found(sc->sc_dev, &twea, twe_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); rv = 0; out: diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c index e981f67296f..b2f3debc2b5 100644 --- a/sys/dev/pci/uhci_pci.c +++ b/sys/dev/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci_pci.c,v 1.64 2020/07/04 14:49:24 jdolecek Exp $ */ +/* $NetBSD: uhci_pci.c,v 1.65 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.64 2020/07/04 14:49:24 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.65 2021/04/24 23:36:57 thorpej Exp $"); #include "ehci.h" @@ -186,7 +186,8 @@ uhci_pci_attach(device_t parent, device_t self, void *aux) sc->sc_initialized |= SC_INIT_PMF; /* Attach usb device. */ - sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint); + sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, + CFARG_EOL); } static int diff --git a/sys/dev/pci/unichromefb.c b/sys/dev/pci/unichromefb.c index 7de4aa8cc1c..78d18ea7191 100644 --- a/sys/dev/pci/unichromefb.c +++ b/sys/dev/pci/unichromefb.c @@ -1,4 +1,4 @@ -/* $NetBSD: unichromefb.c,v 1.19 2015/10/25 22:48:23 khorben Exp $ */ +/* $NetBSD: unichromefb.c,v 1.20 2021/04/24 23:36:57 thorpej Exp $ */ /*- * Copyright (c) 2006, 2008 Jared D. McNeill <jmcneill@invisible.ca> @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.19 2015/10/25 22:48:23 khorben Exp $"); +__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.20 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -351,9 +351,13 @@ unichromefb_attach(device_t parent, device_t self, void *opaque) aa.accessops = &unichromefb_accessops; aa.accesscookie = &sc->sc_vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); - config_found_ia(self, "drm", opaque, unichromefb_drm_print); + config_found(self, opaque, unichromefb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); return; } diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 93e84b8fa72..d25a1d4b972 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_pci.c,v 1.56 2020/06/17 14:04:03 jdolecek Exp $ */ +/* $NetBSD: vga_pci.c,v 1.57 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.56 2020/06/17 14:04:03 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.57 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -260,7 +260,9 @@ vga_pci_attach(device_t parent, device_t self, void *aux) */ if (!pmf_device_register(self, NULL, vga_pci_resume)) aprint_error_dev(self, "couldn't establish power handler\n"); - config_found_ia(self, "drm", aux, vga_drm_print); + config_found(self, aux, vga_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int @@ -268,7 +270,9 @@ vga_pci_rescan(device_t self, const char *ifattr, const int *locators) { struct vga_pci_softc *psc = device_private(self); - config_found_ia(self, "drm", &psc->sc_paa, vga_drm_print); + config_found(self, &psc->sc_paa, vga_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); return 0; } diff --git a/sys/dev/pci/vioscsi.c b/sys/dev/pci/vioscsi.c index bebabdc7a2e..b4b286ca196 100644 --- a/sys/dev/pci/vioscsi.c +++ b/sys/dev/pci/vioscsi.c @@ -1,4 +1,4 @@ -/* $NetBSD: vioscsi.c,v 1.25 2021/01/20 19:46:48 reinoud Exp $ */ +/* $NetBSD: vioscsi.c,v 1.26 2021/04/24 23:36:57 thorpej Exp $ */ /* $OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.25 2021/01/20 19:46:48 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.26 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -212,7 +212,7 @@ vioscsi_attach(device_t parent, device_t self, void *aux) */ chan->chan_defquirks = PQUIRK_FORCELUNS; - config_found(self, &sc->sc_channel, scsiprint); + config_found(self, &sc->sc_channel, scsiprint, CFARG_EOL); return; err: diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c index 656de9f2cae..089e2865775 100644 --- a/sys/dev/pci/virtio_pci.c +++ b/sys/dev/pci/virtio_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_pci.c,v 1.28 2021/02/05 19:18:23 reinoud Exp $ */ +/* $NetBSD: virtio_pci.c,v 1.29 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.28 2021/02/05 19:18:23 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.29 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -271,13 +271,13 @@ virtio_pci_attach(device_t parent, device_t self, void *aux) sc->sc_childdevid = id; sc->sc_child = NULL; - virtio_pci_rescan(self, "virtio", 0); + virtio_pci_rescan(self, NULL, NULL); return; } /* ARGSUSED */ static int -virtio_pci_rescan(device_t self, const char *attr, const int *scan_flags) +virtio_pci_rescan(device_t self, const char *ifattr, const int *locs) { struct virtio_pci_softc * const psc = device_private(self); struct virtio_softc * const sc = &psc->sc_sc; @@ -289,7 +289,7 @@ virtio_pci_rescan(device_t self, const char *attr, const int *scan_flags) memset(&va, 0, sizeof(va)); va.sc_childdevid = sc->sc_childdevid; - config_found_ia(self, attr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(sc)) return 0; diff --git a/sys/dev/pci/voodoofb.c b/sys/dev/pci/voodoofb.c index 0359a01ed33..94b727e7801 100644 --- a/sys/dev/pci/voodoofb.c +++ b/sys/dev/pci/voodoofb.c @@ -1,4 +1,4 @@ -/* $NetBSD: voodoofb.c,v 1.53 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: voodoofb.c,v 1.54 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2005, 2006, 2012 Michael Lorenz @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.54 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -546,8 +546,12 @@ voodoofb_attach(device_t parent, device_t self, void *aux) aa.accessops = &voodoofb_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); - config_found_ia(self, "drm", aux, voodoofb_drm_print); + config_found(self, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); + config_found(self, aux, voodoofb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int diff --git a/sys/dev/pci/voyager.c b/sys/dev/pci/voyager.c index 8e481b18a34..49770e09151 100644 --- a/sys/dev/pci/voyager.c +++ b/sys/dev/pci/voyager.c @@ -1,4 +1,4 @@ -/* $NetBSD: voyager.c,v 1.15 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: voyager.c,v 1.16 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2009, 2011 Michael Lorenz @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.15 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.16 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -227,15 +227,21 @@ voyager_attach(device_t parent, device_t self, void *aux) vaa.vaa_pcitag = sc->sc_pcitag; #if NVOYAGERFB > 0 strcpy(vaa.vaa_name, "voyagerfb"); - config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print); + config_found(sc->sc_dev, &vaa, voyager_print, + CFARG_IATTR, "voyagerbus", + CFARG_EOL); #endif #if NPWMCLOCK > 0 strcpy(vaa.vaa_name, "pwmclock"); - config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print); + config_found(sc->sc_dev, &vaa, voyager_print, + CFARG_IATTR, "voyagerbus", + CFARG_EOL); #endif #ifdef notyet strcpy(vaa.vaa_name, "vac"); - config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print); + config_found(sc->sc_dev, &vaa, voyager_print, + CFARG_IATTR, "voyagerbus", + CFARG_EOL); #endif /* we use this mutex whether there's an i2c bus or not */ mutex_init(&sc->sc_i2c_lock, MUTEX_DEFAULT, IPL_NONE); @@ -261,7 +267,9 @@ voyager_attach(device_t parent, device_t self, void *aux) sc->sc_i2c.ic_read_byte = voyager_i2c_read_byte; sc->sc_i2c.ic_write_byte = voyager_i2c_write_byte; iba.iba_tag = &sc->sc_i2c; - config_found_ia(self, "i2cbus", &iba, iicbus_print); + config_found(self, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); } voyager_control_gpio(sc, ~(1 << 16), 0); voyager_gpio_dir(sc, 0xffffffff, 1 << 16); diff --git a/sys/dev/pci/voyager/voyagerfb.c b/sys/dev/pci/voyager/voyagerfb.c index 157132e6deb..6314fd73992 100644 --- a/sys/dev/pci/voyager/voyagerfb.c +++ b/sys/dev/pci/voyager/voyagerfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: voyagerfb.c,v 1.29 2018/01/19 23:37:36 macallan Exp $ */ +/* $NetBSD: voyagerfb.c,v 1.30 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2009, 2011 Michael Lorenz @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.29 2018/01/19 23:37:36 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.30 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -362,7 +362,7 @@ voyagerfb_attach(device_t parent, device_t self, void *aux) aa.accessops = &voyagerfb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } static int diff --git a/sys/dev/pci/wcfb.c b/sys/dev/pci/wcfb.c index 29fd19a9554..9b3014941f9 100644 --- a/sys/dev/pci/wcfb.c +++ b/sys/dev/pci/wcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: wcfb.c,v 1.18 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: wcfb.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Miodrag Vallat. @@ -20,7 +20,7 @@ /* a driver for (some) 3DLabs Wildcat cards, based on OpenBSD's ifb driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.18 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wcfb.c,v 1.19 2021/04/24 23:36:57 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -335,7 +335,7 @@ wcfb_attach(device_t parent, device_t self, void *aux) aa.accessops = &wcfb_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } static int diff --git a/sys/dev/pci/xhci_pci.c b/sys/dev/pci/xhci_pci.c index 34a275d9b04..b9609d98e4d 100644 --- a/sys/dev/pci/xhci_pci.c +++ b/sys/dev/pci/xhci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: xhci_pci.c,v 1.28 2021/02/07 11:25:56 ryoon Exp $ */ +/* $NetBSD: xhci_pci.c,v 1.29 2021/04/24 23:36:57 thorpej Exp $ */ /* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.28 2021/02/07 11:25:56 ryoon Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.29 2021/04/24 23:36:57 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_xhci_pci.h" @@ -287,9 +287,10 @@ xhci_pci_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't establish power handler\n"); /* Attach usb buses. */ - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); - sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint); + sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint, + CFARG_EOL); return; diff --git a/sys/dev/pci/xmm7360.c b/sys/dev/pci/xmm7360.c index 17a28aeb9aa..ea1725298b4 100644 --- a/sys/dev/pci/xmm7360.c +++ b/sys/dev/pci/xmm7360.c @@ -74,7 +74,7 @@ MODULE_DEVICE_TABLE(pci, xmm7360_ids); #include "opt_gateway.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.6 2020/07/29 13:03:36 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.7 2021/04/24 23:36:57 thorpej Exp $"); #endif #include <sys/param.h> @@ -2138,7 +2138,7 @@ wwanc_attach_finish(struct device *self) struct wwanc_attach_args wa; memset(&wa, 0, sizeof(wa)); wa.aa_type = WWMC_TYPE_NET; - sc->sc_net = config_found(self, &wa, wwancprint); + sc->sc_net = config_found(self, &wa, wwancprint, CFARG_EOL); } static void diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index c6325725210..81cfbff4a89 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $NetBSD: yds.c,v 1.66 2021/02/06 12:59:13 isaki Exp $ */ +/* $NetBSD: yds.c,v 1.67 2021/04/24 23:36:57 thorpej Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.66 2021/02/06 12:59:13 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.67 2021/04/24 23:36:57 thorpej Exp $"); #include "mpu.h" @@ -592,7 +592,7 @@ yds_configure_legacy(device_t self) aa.type = AUDIODEV_TYPE_OPL; aa.hwif = aa.hdl = NULL; - dev = config_found(self, &aa, audioprint); + dev = config_found(self, &aa, audioprint, CFARG_EOL); if (dev == 0) bus_space_unmap(sc->sc_opl_iot, sc->sc_opl_ioh, 4); @@ -628,7 +628,7 @@ yds_configure_legacy(device_t self) aa.type = AUDIODEV_TYPE_MPU; aa.hwif = aa.hdl = NULL; - dev = config_found(self, &aa, audioprint); + dev = config_found(self, &aa, audioprint, CFARG_EOL); if (dev == 0) bus_space_unmap(sc->sc_mpu_iot, sc->sc_mpu_ioh, 2); diff --git a/sys/dev/pckbport/pckbd.c b/sys/dev/pckbport/pckbd.c index 2c2ef474948..d0cc6c0d4db 100644 --- a/sys/dev/pckbport/pckbd.c +++ b/sys/dev/pckbport/pckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd.c,v 1.34 2019/07/23 12:28:52 jmcneill Exp $ */ +/* $NetBSD: pckbd.c,v 1.35 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.34 2019/07/23 12:28:52 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.35 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -409,7 +409,7 @@ pckbdattach(device_t parent, device_t self, void *aux) * Attach the wskbd, saving a handle to it. * XXX XXX XXX */ - sc->sc_wskbddev = config_found_ia(self, "wskbddev", &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); } int diff --git a/sys/dev/pckbport/pckbport.c b/sys/dev/pckbport/pckbport.c index 1b74321e305..b26495ef6f2 100644 --- a/sys/dev/pckbport/pckbport.c +++ b/sys/dev/pckbport/pckbport.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbport.c,v 1.18 2019/11/10 21:16:36 chs Exp $ */ +/* $NetBSD: pckbport.c,v 1.19 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2004 Ben Harris @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.18 2019/11/10 21:16:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.19 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -153,8 +153,11 @@ pckbport_attach_slot(device_t dev, pckbport_tag_t t, locs[PCKBPORTCF_SLOT] = slot; - found = config_found_sm_loc(dev, "pckbport", locs, &pa, - pckbportprint, config_stdsubmatch); + found = config_found(dev, &pa, pckbportprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "pckbport", + CFARG_LOCATORS, locs, + CFARG_EOL); if (found == NULL && alloced) { free(t->t_slotdata[slot], M_DEVBUF); diff --git a/sys/dev/pckbport/pms.c b/sys/dev/pckbport/pms.c index 991e229160d..48e85375e0c 100644 --- a/sys/dev/pckbport/pms.c +++ b/sys/dev/pckbport/pms.c @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.37 2018/07/13 19:44:08 maya Exp $ */ +/* $NetBSD: pms.c,v 1.38 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.37 2018/07/13 19:44:08 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.38 2021/04/24 23:36:58 thorpej Exp $"); #include "opt_pms.h" @@ -228,7 +228,7 @@ pmsattach(device_t parent, device_t self, void *aux) * here or in pmsintr, because if this fails pms_enable() will * never be called, so pmsinput() will never be called. */ - sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); /* no interrupts until enabled */ cmd[0] = PMS_DEV_DISABLE; diff --git a/sys/dev/pcmcia/fdc_pcmcia.c b/sys/dev/pcmcia/fdc_pcmcia.c index 58048c5169b..737ad2b5bf8 100644 --- a/sys/dev/pcmcia/fdc_pcmcia.c +++ b/sys/dev/pcmcia/fdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdc_pcmcia.c,v 1.20 2008/04/28 20:23:56 martin Exp $ */ +/* $NetBSD: fdc_pcmcia.c,v 1.21 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdc_pcmcia.c,v 1.20 2008/04/28 20:23:56 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdc_pcmcia.c,v 1.21 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -183,7 +183,7 @@ fdc_pcmcia_attach(device_t parent, device_t self, void *aux) fa.fa_deftype = &fd_types[0]; else fa.fa_deftype = NULL; /* unknown */ - (void)config_found(self, (void *)&fa, fdprint); + (void)config_found(self, (void *)&fa, fdprint, CFARG_EOL); } return; diff --git a/sys/dev/pcmcia/mhzc.c b/sys/dev/pcmcia/mhzc.c index beea5c04866..286fa67f3bc 100644 --- a/sys/dev/pcmcia/mhzc.c +++ b/sys/dev/pcmcia/mhzc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mhzc.c,v 1.52 2018/12/08 17:46:14 thorpej Exp $ */ +/* $NetBSD: mhzc.c,v 1.53 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mhzc.c,v 1.52 2018/12/08 17:46:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mhzc.c,v 1.53 2021/04/24 23:36:58 thorpej Exp $"); #include "opt_inet.h" @@ -244,9 +244,11 @@ mhzc_attach(device_t parent, device_t self, void *aux) goto fail; /*XXXUNCONST*/ - sc->sc_modem = config_found(self, __UNCONST("com"), mhzc_print); + sc->sc_modem = config_found(self, __UNCONST("com"), mhzc_print, + CFARG_EOL); /*XXXUNCONST*/ - sc->sc_ethernet = config_found(self, __UNCONST("sm"), mhzc_print); + sc->sc_ethernet = config_found(self, __UNCONST("sm"), mhzc_print, + CFARG_EOL); mhzc_disable(sc, MHZC_MODEM_ENABLED|MHZC_ETHERNET_ENABLED); return; diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c index 13c9b25935b..bdc9c967b98 100644 --- a/sys/dev/pcmcia/pcmcia.c +++ b/sys/dev/pcmcia/pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $ */ +/* $NetBSD: pcmcia.c,v 1.95 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2004 Charles M. Hannum. All rights reserved. @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.95 2021/04/24 23:36:58 thorpej Exp $"); #include "opt_pcmciaverbose.h" @@ -207,15 +207,14 @@ pcmcia_card_attach(device_t dev) pf->pf_ih = NULL; } - error = pcmcia_rescan(dev, "pcmcia", wildcard); + error = pcmcia_rescan(dev, NULL, wildcard); done: pcmcia_socket_disable(dev); return (error); } int -pcmcia_rescan(device_t self, const char *ifattr, - const int *locators) +pcmcia_rescan(device_t self, const char *ifattr, const int *locators) { struct pcmcia_softc *sc = device_private(self); struct pcmcia_function *pf; @@ -246,9 +245,10 @@ pcmcia_rescan(device_t self, const char *ifattr, paa.card = &sc->card; paa.pf = pf; - pf->child = config_found_sm_loc(self, "pcmcia", locs, &paa, - pcmcia_print, - config_stdsubmatch); + pf->child = config_found(self, &paa, pcmcia_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } return (0); diff --git a/sys/dev/pcmcia/pcmcom.c b/sys/dev/pcmcia/pcmcom.c index 776794de95c..9f31798eec5 100644 --- a/sys/dev/pcmcia/pcmcom.c +++ b/sys/dev/pcmcia/pcmcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcmcom.c,v 1.41 2018/12/08 17:46:14 thorpej Exp $ */ +/* $NetBSD: pcmcom.c,v 1.42 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998, 2000, 2004 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcmcom.c,v 1.41 2018/12/08 17:46:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcmcom.c,v 1.42 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -173,9 +173,11 @@ pcmcom_attach(device_t parent, device_t self, void *aux) locs[PCMCOMCF_SLAVE] = slave; - sc->sc_slaves[slave] = config_found_sm_loc(sc->sc_dev, - "pcmcom", locs, - &pca, pcmcom_print, config_stdsubmatch); + sc->sc_slaves[slave] = + config_found(sc->sc_dev, &pca, pcmcom_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } pcmcom_disable(sc); diff --git a/sys/dev/pcmcia/xirc.c b/sys/dev/pcmcia/xirc.c index b1f0738bd85..33acefb20c9 100644 --- a/sys/dev/pcmcia/xirc.c +++ b/sys/dev/pcmcia/xirc.c @@ -1,4 +1,4 @@ -/* $NetBSD: xirc.c,v 1.36 2019/10/05 01:35:26 mrg Exp $ */ +/* $NetBSD: xirc.c,v 1.37 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xirc.c,v 1.36 2019/10/05 01:35:26 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xirc.c,v 1.37 2021/04/24 23:36:58 thorpej Exp $"); #include "opt_inet.h" @@ -260,11 +260,12 @@ xirc_attach(device_t parent, device_t self, void *aux) if (sc->sc_id & (XIMEDIA_MODEM << 8)) /*XXXUNCONST*/ - sc->sc_modem = config_found(self, __UNCONST("com"), xirc_print); + sc->sc_modem = config_found(self, __UNCONST("com"), xirc_print, + CFARG_EOL); if (sc->sc_id & (XIMEDIA_ETHER << 8)) /*XXXUNCONST*/ sc->sc_ethernet = config_found(self, __UNCONST("xi"), - xirc_print); + xirc_print, CFARG_EOL); xirc_disable(sc, XIRC_MODEM_ENABLED|XIRC_ETHERNET_ENABLED, sc->sc_id & (XIMEDIA_MODEM|XIMEDIA_ETHER)); diff --git a/sys/dev/podulebus/acemidi.c b/sys/dev/podulebus/acemidi.c index 60165f4b920..7de8458c1f9 100644 --- a/sys/dev/podulebus/acemidi.c +++ b/sys/dev/podulebus/acemidi.c @@ -1,4 +1,4 @@ -/* $NetBSD: acemidi.c,v 1.15 2018/12/08 17:46:14 thorpej Exp $ */ +/* $NetBSD: acemidi.c,v 1.16 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acemidi.c,v 1.15 2018/12/08 17:46:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acemidi.c,v 1.16 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> @@ -78,7 +78,7 @@ acemidi_attach(device_t parent, device_t self, void *aux) /* struct podulebus_attach_args *pa = aux; */ printf("\n"); - config_found_ia(self, "acemidi", aux, NULL); + config_found(self, aux, NULL, CFARG_EOL); } static int diff --git a/sys/dev/ppbus/ppbus_conf.c b/sys/dev/ppbus/ppbus_conf.c index f8602677633..8f02ba8d513 100644 --- a/sys/dev/ppbus/ppbus_conf.c +++ b/sys/dev/ppbus/ppbus_conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: ppbus_conf.c,v 1.21 2019/12/27 09:45:27 msaitoh Exp $ */ +/* $NetBSD: ppbus_conf.c,v 1.22 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 Nicolas Souchu @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ppbus_conf.c,v 1.21 2019/12/27 09:45:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppbus_conf.c,v 1.22 2021/04/24 23:36:58 thorpej Exp $"); #include "opt_ppbus.h" #include "opt_ppbus_1284.h" @@ -170,7 +170,10 @@ ppbus_attach(device_t parent, device_t self, void *aux) /* Configure child devices */ SLIST_INIT(&(ppbus->sc_childlist_head)); - config_search_ia(ppbus_search_children, self, "ppbus", &args); + config_search(self, &args, + CFARG_SEARCH, ppbus_search_children, + CFARG_IATTR, "ppbus", + CFARG_EOL); #if NGPIO > 0 gpio_ppbus_attach(ppbus); @@ -242,8 +245,8 @@ ppbus_search_children(device_t parent, cfdata_t cf, const int *ldesc, void *aux) device_t dev; int rval = 0; - if (config_match(parent, cf, aux) > 0) { - dev = config_attach(parent, cf, aux, NULL); + if (config_probe(parent, cf, aux)) { + dev = config_attach(parent, cf, aux, NULL, CFARG_EOL); if (dev) { child = device_private(dev); SLIST_INSERT_HEAD(&(ppbus->sc_childlist_head), diff --git a/sys/dev/ppbus/ppbus_gpio.c b/sys/dev/ppbus/ppbus_gpio.c index 35388d2a964..42b78373fd2 100644 --- a/sys/dev/ppbus/ppbus_gpio.c +++ b/sys/dev/ppbus/ppbus_gpio.c @@ -1,4 +1,4 @@ -/* $NetBSD: ppbus_gpio.c,v 1.1 2008/04/29 14:07:37 cegger Exp $ */ +/* $NetBSD: ppbus_gpio.c,v 1.2 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2008, Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ppbus_gpio.c,v 1.1 2008/04/29 14:07:37 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppbus_gpio.c,v 1.2 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -109,7 +109,9 @@ gpio_ppbus_attach(struct ppbus_softc *sc) gba.gba_pins = sc->sc_gpio_pins; gba.gba_npins = PPBUS_NPINS; - config_found_ia(sc->sc_dev, "gpiobus", &gba, gpiobus_print); + config_found(sc->sc_dev, &gba, gpiobus_print, + CFARG_IATTR, "gpiobus", + CFARG_EOL); } static int diff --git a/sys/dev/qbus/rf.c b/sys/dev/qbus/rf.c index af0e8c794ef..03e370dc2d0 100644 --- a/sys/dev/qbus/rf.c +++ b/sys/dev/qbus/rf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf.c,v 1.34 2019/10/29 03:49:59 christos Exp $ */ +/* $NetBSD: rf.c,v 1.35 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2002 Jochen Kunz. * All rights reserved. @@ -36,7 +36,7 @@ TODO: */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.34 2019/10/29 03:49:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.35 2021/04/24 23:36:58 thorpej Exp $"); /* autoconfig stuff */ #include <sys/param.h> @@ -397,9 +397,11 @@ rfc_attach(device_t parent, device_t self, void *aux) * So attach them. */ rfc_aa.dnum = 0; - rfc_sc->sc_childs[0] = config_found(rfc_sc->sc_dev, &rfc_aa, rf_print); + rfc_sc->sc_childs[0] = config_found(rfc_sc->sc_dev, &rfc_aa, rf_print, + CFARG_EOL); rfc_aa.dnum = 1; - rfc_sc->sc_childs[1] = config_found(rfc_sc->sc_dev, &rfc_aa, rf_print); + rfc_sc->sc_childs[1] = config_found(rfc_sc->sc_dev, &rfc_aa, rf_print, + CFARG_EOL); #else /* RX02_PROBE */ /* * There are clones of the DEC RX system with standard shugart @@ -413,13 +415,13 @@ rfc_attach(device_t parent, device_t self, void *aux) if (rfcprobedens(rfc_sc, 0) >= 0) { rfc_aa.dnum = 0; rfc_sc->sc_childs[0] = config_found(rfc_sc->sc_dev, &rfc_aa, - rf_print); + rf_print, CFARG_EOL); } else rfc_sc->sc_childs[0] = NULL; if (rfcprobedens(rfc_sc, 1) >= 0) { rfc_aa.dnum = 1; rfc_sc->sc_childs[1] = config_found(rfc_sc->sc_dev, &rfc_aa, - rf_print); + rf_print, CFARG_EOL); } else rfc_sc->sc_childs[1] = NULL; #endif /* RX02_PROBE */ diff --git a/sys/dev/qbus/rl.c b/sys/dev/qbus/rl.c index 1927d80cc48..742a6cf5ef7 100644 --- a/sys/dev/qbus/rl.c +++ b/sys/dev/qbus/rl.c @@ -1,4 +1,4 @@ -/* $NetBSD: rl.c,v 1.51 2017/05/22 17:22:29 ragge Exp $ */ +/* $NetBSD: rl.c,v 1.52 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.51 2017/05/22 17:22:29 ragge Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.52 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -244,7 +244,7 @@ rlcattach(device_t parent, device_t self, void *aux) ra.type = RL_RREG(RL_MP); ra.hwid = i; if ((RL_RREG(RL_CS) & RLCS_ERR) == 0) - config_found(sc->sc_dev, &ra, rlcprint); + config_found(sc->sc_dev, &ra, rlcprint, CFARG_EOL); } } diff --git a/sys/dev/qbus/uba.c b/sys/dev/qbus/uba.c index 4733ae7627a..fcd319e3444 100644 --- a/sys/dev/qbus/uba.c +++ b/sys/dev/qbus/uba.c @@ -1,4 +1,4 @@ -/* $NetBSD: uba.c,v 1.81 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: uba.c,v 1.82 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uba.c,v 1.81 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uba.c,v 1.82 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/time.h> @@ -266,7 +266,9 @@ uba_attach(struct uba_softc *sc, paddr_t iopagephys) /* * Now start searching for devices. */ - config_search_ia(ubasearch, sc->uh_dev, "uba", NULL); + config_search(sc->uh_dev, NULL, + CFARG_SEARCH, ubasearch, + CFARG_EOL); if (sc->uh_afterscan) (*sc->uh_afterscan)(sc); @@ -294,7 +296,7 @@ ubasearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) goto forgetit; scb_vecref(0, 0); /* Clear vector ref */ - i = config_match(parent, cf, &ua); + i = config_probe(parent, cf, &ua); if (sc->uh_errchk) if ((*sc->uh_errchk)(sc)) @@ -315,7 +317,7 @@ ubasearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) sc->uh_used[ubdevreg(csr)] = 1; - config_attach(parent, cf, &ua, ubaprint); + config_attach(parent, cf, &ua, ubaprint, CFARG_EOL); return 0; fail: diff --git a/sys/dev/qbus/uda.c b/sys/dev/qbus/uda.c index a7693686e88..da512f1fba8 100644 --- a/sys/dev/qbus/uda.c +++ b/sys/dev/qbus/uda.c @@ -1,4 +1,4 @@ -/* $NetBSD: uda.c,v 1.61 2017/05/22 17:22:29 ragge Exp $ */ +/* $NetBSD: uda.c,v 1.62 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uda.c,v 1.61 2017/05/22 17:22:29 ragge Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uda.c,v 1.62 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -252,7 +252,7 @@ udaattach(device_t parent, device_t self, void *aux) ma.ma_ivec = sc->sc_uh->uh_lastiv; ma.ma_ctlrnr = (ua->ua_iaddr == 0172150 ? 0 : 1); /* XXX */ ma.ma_adapnr = sc->sc_uh->uh_nr; - config_found(sc->sc_dev, &ma, udaprint); + config_found(sc->sc_dev, &ma, udaprint, CFARG_EOL); } /* diff --git a/sys/dev/radio.c b/sys/dev/radio.c index 82b726f0cf4..4942e648b47 100644 --- a/sys/dev/radio.c +++ b/sys/dev/radio.c @@ -1,4 +1,4 @@ -/* $NetBSD: radio.c,v 1.29 2018/02/05 22:14:26 mrg Exp $ */ +/* $NetBSD: radio.c,v 1.30 2021/04/24 23:36:52 thorpej Exp $ */ /* $OpenBSD: radio.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */ /* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */ @@ -30,7 +30,7 @@ /* This is the /dev/radio driver from OpenBSD */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.29 2018/02/05 22:14:26 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.30 2021/04/24 23:36:52 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -177,7 +177,7 @@ radio_attach_mi(const struct radio_hw_if *rhwp, void *hdlp, device_t dev) arg.hwif = rhwp; arg.hdl = hdlp; - return (config_found(dev, &arg, radioprint)); + return (config_found(dev, &arg, radioprint, CFARG_EOL)); } static int diff --git a/sys/dev/sbus/agten.c b/sys/dev/sbus/agten.c index edf3b5e16ee..dd558be9486 100644 --- a/sys/dev/sbus/agten.c +++ b/sys/dev/sbus/agten.c @@ -1,4 +1,4 @@ -/* $NetBSD: agten.c,v 1.32 2013/10/19 21:00:32 mrg Exp $ */ +/* $NetBSD: agten.c,v 1.33 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.32 2013/10/19 21:00:32 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agten.c,v 1.33 2021/04/24 23:36:58 thorpej Exp $"); /* * a driver for the Fujitsu AG-10e SBus framebuffer @@ -370,7 +370,7 @@ agten_attach(device_t parent, device_t dev, void *aux) aa.accessops = &agten_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); fb->fb_driver = &agtenfbdriver; fb->fb_device = sc->sc_dev; diff --git a/sys/dev/sbus/cgtwelve.c b/sys/dev/sbus/cgtwelve.c index d75953aa16f..296c90a1f84 100644 --- a/sys/dev/sbus/cgtwelve.c +++ b/sys/dev/sbus/cgtwelve.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgtwelve.c,v 1.6 2016/04/21 18:24:02 macallan Exp $ */ +/* $NetBSD: cgtwelve.c,v 1.7 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 2010 Michael Lorenz @@ -29,7 +29,7 @@ /* a console driver for the Sun CG12 / Matrox SG3 graphics board */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgtwelve.c,v 1.6 2016/04/21 18:24:02 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgtwelve.c,v 1.7 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -256,7 +256,7 @@ cgtwelve_attach(device_t parent, device_t self, void *args) aa.accessops = &cgtwelve_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); #ifdef CG12_DEBUG { int i; diff --git a/sys/dev/sbus/dma_sbus.c b/sys/dev/sbus/dma_sbus.c index 3c931755f1a..307119317f5 100644 --- a/sys/dev/sbus/dma_sbus.c +++ b/sys/dev/sbus/dma_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: dma_sbus.c,v 1.35 2009/09/17 16:28:12 tsutsui Exp $ */ +/* $NetBSD: dma_sbus.c,v 1.36 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.35 2009/09/17 16:28:12 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dma_sbus.c,v 1.36 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -210,7 +210,8 @@ dmaattach_sbus(device_t parent, device_t self, void *aux) for (node = firstchild(sa->sa_node); node; node = nextsibling(node)) { struct sbus_attach_args sax; sbus_setup_attach_args(sbsc, sbt, sc->sc_dmatag, node, &sax); - (void)config_found(self, (void *)&sax, dmaprint_sbus); + (void)config_found(self, (void *)&sax, dmaprint_sbus, + CFARG_EOL); sbus_destroy_attach_args(&sax); } } diff --git a/sys/dev/sbus/lebuffer.c b/sys/dev/sbus/lebuffer.c index 46c565614c8..ee41bfc54bc 100644 --- a/sys/dev/sbus/lebuffer.c +++ b/sys/dev/sbus/lebuffer.c @@ -1,4 +1,4 @@ -/* $NetBSD: lebuffer.c,v 1.36 2009/09/17 17:53:35 tsutsui Exp $ */ +/* $NetBSD: lebuffer.c,v 1.37 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.36 2009/09/17 17:53:35 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v 1.37 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -124,7 +124,7 @@ lebufattach(device_t parent, device_t self, void *aux) struct sbus_attach_args sax; sbus_setup_attach_args(sbsc, bt, dt, node, &sax); - (void)config_found(self, (void *)&sax, lebufprint); + (void)config_found(self, (void *)&sax, lebufprint, CFARG_EOL); sbus_destroy_attach_args(&sax); } } diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 2839abba7e5..a0278bc1b95 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $NetBSD: magma.c,v 1.62 2021/04/12 09:23:32 mrg Exp $ */ +/* $NetBSD: magma.c,v 1.63 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.62 2021/04/12 09:23:32 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.63 2021/04/24 23:36:58 thorpej Exp $"); #if 0 #define MAGMA_DEBUG @@ -475,8 +475,8 @@ magma_attach(device_t parent, device_t self, void *aux) } /* configure the children */ - (void)config_found(self, mtty_match, NULL); - (void)config_found(self, mbpp_match, NULL); + (void)config_found(self, mtty_match, NULL, CFARG_EOL); + (void)config_found(self, mbpp_match, NULL, CFARG_EOL); /* * Establish the interrupt handlers. diff --git a/sys/dev/sbus/mgx.c b/sys/dev/sbus/mgx.c index c82dde2d444..e3f6fadf571 100644 --- a/sys/dev/sbus/mgx.c +++ b/sys/dev/sbus/mgx.c @@ -1,4 +1,4 @@ -/* $NetBSD: mgx.c,v 1.14 2018/09/03 16:29:33 riastradh Exp $ */ +/* $NetBSD: mgx.c,v 1.15 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -29,7 +29,7 @@ /* a console driver for the SSB 4096V-MGX graphics card */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mgx.c,v 1.14 2018/09/03 16:29:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mgx.c,v 1.15 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -364,7 +364,7 @@ mgx_attach(device_t parent, device_t self, void *args) aa.accessops = &mgx_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); /* now the Sun fb goop */ fb->fb_driver = &mgx_fbdriver; diff --git a/sys/dev/sbus/p9100.c b/sys/dev/sbus/p9100.c index bc952eb0cf7..8b9af576c76 100644 --- a/sys/dev/sbus/p9100.c +++ b/sys/dev/sbus/p9100.c @@ -1,4 +1,4 @@ -/* $NetBSD: p9100.c,v 1.63 2016/04/21 18:10:57 macallan Exp $ */ +/* $NetBSD: p9100.c,v 1.64 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.63 2016/04/21 18:10:57 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.64 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -498,7 +498,7 @@ p9100_sbus_attach(device_t parent, device_t self, void *args) aa.accessops = &p9100_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); fb->fb_type.fb_size = fb->fb_type.fb_height * fb->fb_linebytes; printf("%s: rev %d / %x, %dx%d, depth %d mem %x\n", diff --git a/sys/dev/sbus/qec.c b/sys/dev/sbus/qec.c index 2ba46e0cb09..c1b295338a9 100644 --- a/sys/dev/sbus/qec.c +++ b/sys/dev/sbus/qec.c @@ -1,4 +1,4 @@ -/* $NetBSD: qec.c,v 1.50 2009/09/19 11:53:42 tsutsui Exp $ */ +/* $NetBSD: qec.c,v 1.51 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.50 2009/09/19 11:53:42 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.51 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -207,7 +207,7 @@ qecattach(device_t parent, device_t self, void *aux) struct sbus_attach_args sax; sbus_setup_attach_args(sbsc, sbt, sc->sc_dmatag, node, &sax); - (void)config_found(self, (void *)&sax, qecprint); + (void)config_found(self, (void *)&sax, qecprint, CFARG_EOL); sbus_destroy_attach_args(&sax); } } diff --git a/sys/dev/sbus/sio16.c b/sys/dev/sbus/sio16.c index 5e44b5e3a1f..5d3f83bae99 100644 --- a/sys/dev/sbus/sio16.c +++ b/sys/dev/sbus/sio16.c @@ -1,4 +1,4 @@ -/* $NetBSD: sio16.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $ */ +/* $NetBSD: sio16.c,v 1.26 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.26 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -230,7 +230,7 @@ sio16_attach(device_t parent, device_t self, void *aux) cd.cd_handle = (bus_space_handle_t)sc->sc_reg[i]; cd.cd_ackfunc = sio16_ackfunc; cd.cd_ackfunc_arg = sc; - (void)config_found(self, (void *)&cd, NULL); + (void)config_found(self, (void *)&cd, NULL, CFARG_EOL); } } diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index 259e5c471b4..d39e05eeec6 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $NetBSD: spif.c,v 1.32 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: spif.c,v 1.33 2021/04/24 23:36:58 thorpej Exp $ */ /* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */ /* @@ -41,7 +41,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.32 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.33 2021/04/24 23:36:58 thorpej Exp $"); #include "spif.h" #if NSPIF > 0 @@ -278,8 +278,8 @@ spif_attach(device_t parent, device_t self, void *aux) printf(": rev %x chiprev %x osc %sMHz\n", sc->sc_rev, sc->sc_rev2, clockfreq(sc->sc_osc)); - (void)config_found(self, stty_match, NULL); - (void)config_found(self, sbpp_match, NULL); + (void)config_found(self, stty_match, NULL, CFARG_EOL); + (void)config_found(self, sbpp_match, NULL, CFARG_EOL); return; diff --git a/sys/dev/sbus/stp4020.c b/sys/dev/sbus/stp4020.c index ff5980d9e78..b020e090b12 100644 --- a/sys/dev/sbus/stp4020.c +++ b/sys/dev/sbus/stp4020.c @@ -1,4 +1,4 @@ -/* $NetBSD: stp4020.c,v 1.69 2015/12/01 08:22:30 martin Exp $ */ +/* $NetBSD: stp4020.c,v 1.70 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.69 2015/12/01 08:22:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.70 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -504,7 +504,7 @@ stp4020_attach_socket(struct stp4020_socket *h, int speed) paa.pct = (pcmcia_chipset_tag_t)h->sc->sc_pct; paa.pch = (pcmcia_chipset_handle_t)h; - h->pcmcia = config_found(h->sc->sc_dev, &paa, stp4020print); + h->pcmcia = config_found(h->sc->sc_dev, &paa, stp4020print, CFARG_EOL); if (h->pcmcia == NULL) return; diff --git a/sys/dev/sbus/tcx.c b/sys/dev/sbus/tcx.c index a0f7ce22865..aea262c2423 100644 --- a/sys/dev/sbus/tcx.c +++ b/sys/dev/sbus/tcx.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcx.c,v 1.58 2018/01/24 05:35:58 riastradh Exp $ */ +/* $NetBSD: tcx.c,v 1.59 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.58 2018/01/24 05:35:58 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.59 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -423,7 +423,7 @@ tcxattach(device_t parent, device_t self, void *args) aa.accessops = &tcx_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); /* * we need to do this again - something overwrites a handful * palette registers and we end up with white in reg. 0 diff --git a/sys/dev/sbus/xbox.c b/sys/dev/sbus/xbox.c index 7f88067dad7..625632effc5 100644 --- a/sys/dev/sbus/xbox.c +++ b/sys/dev/sbus/xbox.c @@ -1,4 +1,4 @@ -/* $NetBSD: xbox.c,v 1.21 2011/07/18 00:58:52 mrg Exp $ */ +/* $NetBSD: xbox.c,v 1.22 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xbox.c,v 1.21 2011/07/18 00:58:52 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbox.c,v 1.22 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -149,5 +149,5 @@ xbox_attach(device_t parent, device_t self, void *aux) xa.xa_bustag = sa->sa_bustag; xa.xa_dmatag = sa->sa_dmatag; - (void) config_found(self, (void *)&xa, xbox_print); + (void) config_found(self, (void *)&xa, xbox_print, CFARG_EOL); } diff --git a/sys/dev/sbus/zx.c b/sys/dev/sbus/zx.c index 9637351e80b..4a2d607b01d 100644 --- a/sys/dev/sbus/zx.c +++ b/sys/dev/sbus/zx.c @@ -1,4 +1,4 @@ -/* $NetBSD: zx.c,v 1.45 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: zx.c,v 1.46 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.45 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.46 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -336,7 +336,7 @@ zx_attach(device_t parent, device_t self, void *args) aa.console = isconsole; aa.accessops = &zx_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dv, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dv, &aa, wsemuldisplaydevprint, CFARG_EOL); fb_attach(&sc->sc_fb, isconsole); } diff --git a/sys/dev/scsipi/atapi_wdc.c b/sys/dev/scsipi/atapi_wdc.c index f6340287256..f54ee3a3f26 100644 --- a/sys/dev/scsipi/atapi_wdc.c +++ b/sys/dev/scsipi/atapi_wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atapi_wdc.c,v 1.138 2020/04/13 10:49:34 jdolecek Exp $ */ +/* $NetBSD: atapi_wdc.c,v 1.139 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.138 2020/04/13 10:49:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.139 2021/04/24 23:36:58 thorpej Exp $"); #ifndef ATADEBUG #define ATADEBUG @@ -141,8 +141,9 @@ wdc_atapibus_attach(struct atabus_softc *ata_sc) chan->chan_ntargets = chp->ch_ndrives; chan->chan_nluns = 1; - chp->atapibus = config_found_ia(ata_sc->sc_dev, "atapi", chan, - atapiprint); + chp->atapibus = config_found(ata_sc->sc_dev, chan, atapiprint, + CFARG_IATTR, "atapi", + CFARG_EOL); } static void diff --git a/sys/dev/scsipi/atapiconf.c b/sys/dev/scsipi/atapiconf.c index 39e852f9d7b..5a229b8e697 100644 --- a/sys/dev/scsipi/atapiconf.c +++ b/sys/dev/scsipi/atapiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: atapiconf.c,v 1.91 2017/06/17 22:35:50 mlelstv Exp $ */ +/* $NetBSD: atapiconf.c,v 1.92 2021/04/24 23:36:58 thorpej Exp $ */ /* * Copyright (c) 1996, 2001 Manuel Bouyer. All rights reserved. @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.91 2017/06/17 22:35:50 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.92 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -278,16 +278,17 @@ atapi_probe_device(struct atapibus_softc *sc, int target, */ periph->periph_quirks |= quirks; - if ((cf = config_search_ia(atapibussubmatch, sc->sc_dev, - "atapibus", sa)) != 0) { + if ((cf = config_search(sc->sc_dev, sa, + CFARG_SUBMATCH, atapibussubmatch, + CFARG_EOL)) != NULL) { scsipi_insert_periph(chan, periph); /* * XXX Can't assign periph_dev here, because we'll * XXX need it before config_attach() returns. Must * XXX assign it in periph driver. */ - return config_attach(sc->sc_dev, cf, sa, - atapibusprint); + return config_attach(sc->sc_dev, cf, sa, atapibusprint, + CFARG_EOL); } else { atapibusprint(sa, device_xname(sc->sc_dev)); aprint_normal(" not configured\n"); diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index f2b5f29ae35..7206009536a 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.290 2020/09/18 15:04:25 jakllsch Exp $ */ +/* $NetBSD: scsiconf.c,v 1.291 2021/04/24 23:36:58 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290 2020/09/18 15:04:25 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.291 2021/04/24 23:36:58 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -433,8 +433,7 @@ ret: } static int -scsibusrescan(device_t sc, const char *ifattr, - const int *locators) +scsibusrescan(device_t sc, const char *ifattr, const int *locators) { KASSERT(ifattr && !strcmp(ifattr, "scsibus")); @@ -1013,8 +1012,10 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun) locs[SCSIBUSCF_TARGET] = target; locs[SCSIBUSCF_LUN] = lun; - if ((cf = config_search_loc(config_stdsubmatch, sc->sc_dev, - "scsibus", locs, &sa)) != NULL) { + if ((cf = config_search(sc->sc_dev, &sa, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL)) != NULL) { scsipi_insert_periph(chan, periph); /* @@ -1032,8 +1033,9 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun) * XXX need it before config_attach() returns. Must * XXX assign it in periph driver. */ - config_attach_loc(sc->sc_dev, cf, locs, &sa, - scsibusprint); + config_attach(sc->sc_dev, cf, &sa, scsibusprint, + CFARG_LOCATORS, locs, + CFARG_EOL); } else { scsibusprint(&sa, device_xname(sc->sc_dev)); aprint_normal(" not configured\n"); diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 4688cf9283e..6c80af99f08 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.108 2021/03/13 23:26:47 mlelstv Exp $ */ +/* $NetBSD: sdhc.c,v 1.109 2021/04/24 23:36:59 thorpej Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.108 2021/03/13 23:26:47 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.109 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -642,7 +642,7 @@ adma_done: if (ISSET(sc->sc_flags, SDHC_FLAG_BROKEN_ADMA2_ZEROLEN)) saa.saa_max_seg = 65535; - hp->sdmmc = config_found(sc->sc_dev, &saa, sdhc_cfprint); + hp->sdmmc = config_found(sc->sc_dev, &saa, sdhc_cfprint, CFARG_EOL); return 0; diff --git a/sys/dev/sdmmc/sdmmc.c b/sys/dev/sdmmc/sdmmc.c index cbd7a2dece4..9c75bc699be 100644 --- a/sys/dev/sdmmc/sdmmc.c +++ b/sys/dev/sdmmc/sdmmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc.c,v 1.40 2020/05/24 17:26:18 riastradh Exp $ */ +/* $NetBSD: sdmmc.c,v 1.41 2021/04/24 23:36:59 thorpej Exp $ */ /* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */ /* @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.40 2020/05/24 17:26:18 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.41 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -477,7 +477,7 @@ sdmmc_card_attach(struct sdmmc_softc *sc) saa.sf = sf; sf->child = - config_found_ia(sc->sc_dev, "sdmmc", &saa, sdmmc_print); + config_found(sc->sc_dev, &saa, sdmmc_print, CFARG_EOL); } SET(sc->sc_flags, SMF_CARD_ATTACHED); diff --git a/sys/dev/spi/mcp23s17.c b/sys/dev/spi/mcp23s17.c index a00457d3507..12069fe396e 100644 --- a/sys/dev/spi/mcp23s17.c +++ b/sys/dev/spi/mcp23s17.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcp23s17.c,v 1.1 2014/04/06 17:59:39 kardel Exp $ */ +/* $NetBSD: mcp23s17.c,v 1.2 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mcp23s17.c,v 1.1 2014/04/06 17:59:39 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcp23s17.c,v 1.2 2021/04/24 23:36:59 thorpej Exp $"); /* * Driver for Microchip MCP23S17 GPIO @@ -150,7 +150,7 @@ mcp23s17gpio_attach(device_t parent, device_t self, void *aux) gba.gba_pins = sc->sc_gpio_pins; gba.gba_npins = MCP23x17_GPIO_NPINS; - config_found_ia(self, "gpiobus", &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, CFARG_EOL); #else aprint_normal_dev(sc->sc_dev, "no GPIO configured in kernel"); #endif diff --git a/sys/dev/spi/oj6sh.c b/sys/dev/spi/oj6sh.c index 23c0c3e5870..7c18d42ccb4 100644 --- a/sys/dev/spi/oj6sh.c +++ b/sys/dev/spi/oj6sh.c @@ -1,4 +1,4 @@ -/* $NetBSD: oj6sh.c,v 1.7 2021/01/27 02:32:31 thorpej Exp $ */ +/* $NetBSD: oj6sh.c,v 1.8 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2014 Genetec Corporation. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.7 2021/01/27 02:32:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.8 2021/04/24 23:36:59 thorpej Exp $"); #include "opt_oj6sh.h" @@ -202,7 +202,7 @@ oj6sh_attach(device_t parent, device_t self, void *aux) a.accessops = &oj6sh_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); config_interrupts(self, oj6sh_doattach); } diff --git a/sys/dev/spi/spi.c b/sys/dev/spi/spi.c index a1f0f91f9f8..a9d11d23145 100644 --- a/sys/dev/spi/spi.c +++ b/sys/dev/spi/spi.c @@ -1,4 +1,4 @@ -/* $NetBSD: spi.c,v 1.16 2021/01/18 15:28:21 thorpej Exp $ */ +/* $NetBSD: spi.c,v 1.17 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.16 2021/01/18 15:28:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.17 2021/04/24 23:36:59 thorpej Exp $"); #include "locators.h" @@ -158,9 +158,9 @@ spi_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) if (ISSET(sa.sa_handle->sh_flags, SPIH_ATTACHED)) return -1; - if (config_match(parent, cf, &sa) > 0) { + if (config_probe(parent, cf, &sa)) { SET(sa.sa_handle->sh_flags, SPIH_ATTACHED); - config_attach(parent, cf, &sa, spi_print); + config_attach(parent, cf, &sa, spi_print, CFARG_EOL); } return 0; @@ -249,9 +249,9 @@ spi_direct_attach_child_devices(device_t parent, struct spi_softc *sc, spi_fill_compat(&sa, prop_data_value(cdata), prop_data_size(cdata), &buf); - (void) config_found_sm_loc(parent, "spi", - loc, &sa, spi_print, - NULL); + config_found(parent, &sa, spi_print, + CFARG_LOCATORS, loc, + CFARG_EOL); if (sa.sa_compat) free(sa.sa_compat, M_TEMP); @@ -314,7 +314,9 @@ spi_attach(device_t parent, device_t self, void *aux) spi_direct_attach_child_devices(self, sc, sba->sba_child_devices); } /* Then do any other devices the user may have manually wired */ - config_search_ia(spi_search, self, "spi", NULL); + config_search(self, NULL, + CFARG_SEARCH, spi_search, + CFARG_EOL); } static int diff --git a/sys/dev/spi/spiflash.c b/sys/dev/spi/spiflash.c index 46b6ff4ac92..c0e3dc2dc6e 100644 --- a/sys/dev/spi/spiflash.c +++ b/sys/dev/spi/spiflash.c @@ -1,4 +1,4 @@ -/* $NetBSD: spiflash.c,v 1.23 2019/09/14 15:12:12 tnn Exp $ */ +/* $NetBSD: spiflash.c,v 1.24 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.23 2019/09/14 15:12:12 tnn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.24 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -178,7 +178,8 @@ spiflash_attach_mi(const struct spiflash_hw_if *hw, void *cookie, sfa.hw = hw; sfa.cookie = cookie; - return (spiflash_handle_t)config_found(dev, &sfa, spiflash_print); + return (spiflash_handle_t)config_found(dev, &sfa, spiflash_print, + CFARG_EOL); } int diff --git a/sys/dev/spkr.c b/sys/dev/spkr.c index 1cfb0eefbb9..68eb93973e1 100644 --- a/sys/dev/spkr.c +++ b/sys/dev/spkr.c @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.19 2021/04/03 04:10:30 isaki Exp $ */ +/* $NetBSD: spkr.c,v 1.20 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.19 2021/04/03 04:10:30 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.20 2021/04/24 23:36:52 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "wsmux.h" @@ -423,7 +423,7 @@ spkr_attach(device_t self, void (*tone)(device_t, u_int, u_int)) sc->sc_inbuf = NULL; sc->sc_wsbelldev = NULL; - spkr_rescan(self, "", NULL); + spkr_rescan(self, NULL, NULL); } int @@ -459,7 +459,8 @@ spkr_rescan(device_t self, const char *iattr, const int *locators) if (sc->sc_wsbelldev == NULL) { a.accesscookie = sc; - sc->sc_wsbelldev = config_found(self, &a, wsbelldevprint); + sc->sc_wsbelldev = config_found(self, &a, wsbelldevprint, + CFARG_EOL); } #endif return 0; diff --git a/sys/dev/std/ieee1212.c b/sys/dev/std/ieee1212.c index 97935f9f098..39b2987f644 100644 --- a/sys/dev/std/ieee1212.c +++ b/sys/dev/std/ieee1212.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee1212.c,v 1.13 2014/10/18 08:33:28 snj Exp $ */ +/* $NetBSD: ieee1212.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ieee1212.c,v 1.13 2014/10/18 08:33:28 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee1212.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1230,7 +1230,9 @@ p1212_match_units(device_t sc, struct p1212_dir *dir, if (udirs) { do { - dev = config_found_ia(sc, "fwnode", udirs, print); + dev = config_found(sc, udirs, print, + CFARG_IATTR, "fwnode", + CFARG_EOL); if (dev && numdev) { devret = realloc(devret, sizeof(device_t) * diff --git a/sys/dev/sun/bwtwo.c b/sys/dev/sun/bwtwo.c index 76d6add2b6c..d5f0e52d7d3 100644 --- a/sys/dev/sun/bwtwo.c +++ b/sys/dev/sun/bwtwo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bwtwo.c,v 1.36 2019/01/21 06:23:17 macallan Exp $ */ +/* $NetBSD: bwtwo.c,v 1.37 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.36 2019/01/21 06:23:17 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.37 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -324,7 +324,7 @@ bwtwoattach(struct bwtwo_softc *sc, const char *name, int isconsole) aa.console = isconsole; aa.accessops = &bwtwo_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); #endif } diff --git a/sys/dev/sun/cgsix.c b/sys/dev/sun/cgsix.c index d092d73be56..f506930791c 100644 --- a/sys/dev/sun/cgsix.c +++ b/sys/dev/sun/cgsix.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgsix.c,v 1.68 2019/01/19 00:16:43 macallan Exp $ */ +/* $NetBSD: cgsix.c,v 1.69 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.68 2019/01/19 00:16:43 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.69 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -629,7 +629,7 @@ cg6attach(struct cgsix_softc *sc, const char *name, int isconsole) aa.console = isconsole; aa.accessops = &cgsix_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } diff --git a/sys/dev/sun/cgthree.c b/sys/dev/sun/cgthree.c index a54e2cbff26..39440141b3a 100644 --- a/sys/dev/sun/cgthree.c +++ b/sys/dev/sun/cgthree.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgthree.c,v 1.33 2016/11/09 19:54:25 macallan Exp $ */ +/* $NetBSD: cgthree.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.33 2016/11/09 19:54:25 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -244,7 +244,7 @@ cgthreeattach(struct cgthree_softc *sc, const char *name, int isconsole) aa.console = isconsole; aa.accessops = &cgthree_accessops; aa.accesscookie = &sc->vd; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); } diff --git a/sys/dev/sun/kbd.c b/sys/dev/sun/kbd.c index 79740fd7cc1..b90fa8cc4db 100644 --- a/sys/dev/sun/kbd.c +++ b/sys/dev/sun/kbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $ */ +/* $NetBSD: kbd.c,v 1.72 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.71 2020/01/18 21:08:42 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.72 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1083,7 +1083,7 @@ kbd_enable(device_t dev) k->k_wsenabled = 0; /* Attach the wskbd */ - k->k_wskbd = config_found(k->k_dev, &a, wskbddevprint); + k->k_wskbd = config_found(k->k_dev, &a, wskbddevprint, CFARG_EOL); callout_init(&k->k_wsbell, 0); diff --git a/sys/dev/sun/sunms.c b/sys/dev/sun/sunms.c index dd05ca02a69..eee08085ab2 100644 --- a/sys/dev/sun/sunms.c +++ b/sys/dev/sun/sunms.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunms.c,v 1.33 2017/10/31 10:46:47 martin Exp $ */ +/* $NetBSD: sunms.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.33 2017/10/31 10:46:47 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -174,7 +174,7 @@ sunms_attach(device_t parent, device_t self, void *aux) a.accessops = &sunms_accessops; a.accesscookie = ms; - ms->ms_wsmousedev = config_found(self, &a, wsmousedevprint); + ms->ms_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); #endif } diff --git a/sys/dev/tc/cfb.c b/sys/dev/tc/cfb.c index 52c49d28f33..5c0476ad5ee 100644 --- a/sys/dev/tc/cfb.c +++ b/sys/dev/tc/cfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: cfb.c,v 1.63 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: cfb.c,v 1.64 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.63 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.64 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -282,7 +282,7 @@ cfbattach(device_t parent, device_t self, void *aux) waa.accessops = &cfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/ioasic_subr.c b/sys/dev/tc/ioasic_subr.c index c0f64050c7e..cb4b0faf224 100644 --- a/sys/dev/tc/ioasic_subr.c +++ b/sys/dev/tc/ioasic_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioasic_subr.c,v 1.13 2011/06/04 01:49:44 tsutsui Exp $ */ +/* $NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.13 2011/06/04 01:49:44 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,7 +72,9 @@ ioasic_attach_devs(struct ioasic_softc *sc, struct ioasic_dev *ioasic_devs, /* Tell the autoconfig machinery we've found the hardware. */ locs[IOASICCF_OFFSET] = ioasic_devs[i].iad_offset; - config_found_sm_loc(sc->sc_dev, "ioasic", locs, &idev, - ioasicprint, config_stdsubmatch); + config_found(sc->sc_dev, &idev, ioasicprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } diff --git a/sys/dev/tc/mfb.c b/sys/dev/tc/mfb.c index c821e8c6263..ba76c8a02aa 100644 --- a/sys/dev/tc/mfb.c +++ b/sys/dev/tc/mfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfb.c,v 1.61 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: mfb.c,v 1.62 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.61 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.62 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -262,7 +262,7 @@ mfbattach(device_t parent, device_t self, void *aux) waa.accessops = &mfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/sfb.c b/sys/dev/tc/sfb.c index 28a8a25bc49..75236ce06da 100644 --- a/sys/dev/tc/sfb.c +++ b/sys/dev/tc/sfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: sfb.c,v 1.86 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: sfb.c,v 1.87 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.86 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.87 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -297,7 +297,7 @@ sfbattach(device_t parent, device_t self, void *aux) waa.accessops = &sfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/sfbplus.c b/sys/dev/tc/sfbplus.c index 7df0bec9462..00982885440 100644 --- a/sys/dev/tc/sfbplus.c +++ b/sys/dev/tc/sfbplus.c @@ -1,4 +1,4 @@ -/* $NetBSD: sfbplus.c,v 1.39 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: sfbplus.c,v 1.40 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.39 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.40 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -303,7 +303,7 @@ sfbpattach(device_t parent, device_t self, void *aux) waa.accessops = &sfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/stic.c b/sys/dev/tc/stic.c index d4ba18552e8..a2c5f967425 100644 --- a/sys/dev/tc/stic.c +++ b/sys/dev/tc/stic.c @@ -1,4 +1,4 @@ -/* $NetBSD: stic.c,v 1.54 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: stic.c,v 1.55 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.54 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.55 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -433,7 +433,7 @@ stic_attach(device_t self, struct stic_info *si, int console) waa.accessops = &stic_accessops; waa.accesscookie = si; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } void diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c index 3ce95c9cad6..c46204f1448 100644 --- a/sys/dev/tc/tc.c +++ b/sys/dev/tc/tc.c @@ -1,4 +1,4 @@ -/* $NetBSD: tc.c,v 1.56 2017/06/10 12:03:30 flxd Exp $ */ +/* $NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.56 2017/06/10 12:03:30 flxd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $"); #include "opt_tcverbose.h" @@ -136,8 +136,10 @@ tcattach(device_t parent, device_t self, void *aux) /* * Attach the device. */ - config_found_sm_loc(self, "tc", locs, &ta, - tcprint, config_stdsubmatch); + config_found(self, &ta, tcprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } /* @@ -180,8 +182,10 @@ tcattach(device_t parent, device_t self, void *aux) /* * Attach the device. */ - config_found_sm_loc(self, "tc", locs, &ta, - tcprint, config_stdsubmatch); + config_found(self, &ta, tcprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); } } diff --git a/sys/dev/tc/tcds.c b/sys/dev/tc/tcds.c index eb5ddf4e0a3..26404fb58f8 100644 --- a/sys/dev/tc/tcds.c +++ b/sys/dev/tc/tcds.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcds.c,v 1.26 2017/06/22 16:46:53 flxd Exp $ */ +/* $NetBSD: tcds.c,v 1.27 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.26 2017/06/22 16:46:53 flxd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.27 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -294,8 +294,10 @@ tcdsattach(device_t parent, device_t self, void *aux) locs[TCDSCF_CHIP] = i; - config_found_sm_loc(self, "tcds", locs, &tcdsdev, - tcdsprint, config_stdsubmatch); + config_found(self, &tcdsdev, tcdsprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); #ifdef __alpha__ /* * The second SCSI chip isn't present on the baseboard TCDS diff --git a/sys/dev/tc/tcu.c b/sys/dev/tc/tcu.c index c3942a02817..f9be98ffee3 100644 --- a/sys/dev/tc/tcu.c +++ b/sys/dev/tc/tcu.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $ */ +/* $NetBSD: tcu.c,v 1.5 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2016, Felix Deichmann @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.5 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -147,7 +147,9 @@ tcu_attach(device_t parent, device_t self, void *aux) #if NSLHCI_TCU > 0 /* Attach slhci. */ - (void)config_found_ia(self, "tcu", aux, tcu_print); + (void)config_found(self, aux, tcu_print, + CFARG_IATTR, "tcu", + CFARG_EOL); #endif /* NSLHCI_TCU > 0 */ #if NGPIO > 0 /* Attach gpio(bus). */ @@ -212,7 +214,9 @@ tcu_gpio_attach(device_t parent, device_t self, void *aux) gba.gba_pins = sc->sc_gpio_pins; gba.gba_npins = TCU_GPIO_NPINS; - (void)config_found_ia(self, "gpiobus", &gba, gpiobus_print); + config_found(self, &gba, gpiobus_print, + CFARG_IATTR, "gpiobus", + CFARG_EOL); } static int diff --git a/sys/dev/tc/tfb.c b/sys/dev/tc/tfb.c index 14069ca5b93..1f5dbb617f5 100644 --- a/sys/dev/tc/tfb.c +++ b/sys/dev/tc/tfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: tfb.c,v 1.63 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: tfb.c,v 1.64 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.63 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.64 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -316,7 +316,7 @@ tfbattach(device_t parent, device_t self, void *aux) waa.accessops = &tfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/xcfb.c b/sys/dev/tc/xcfb.c index 6610cf5b6d1..8202e24c666 100644 --- a/sys/dev/tc/xcfb.c +++ b/sys/dev/tc/xcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: xcfb.c,v 1.57 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: xcfb.c,v 1.58 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.57 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.58 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -245,7 +245,7 @@ xcfbattach(device_t parent, device_t self, void *aux) waa.accessops = &xcfb_accessops; waa.accesscookie = sc; - config_found(self, &waa, wsemuldisplaydevprint); + config_found(self, &waa, wsemuldisplaydevprint, CFARG_EOL); } static void diff --git a/sys/dev/tc/zs_ioasic.c b/sys/dev/tc/zs_ioasic.c index 44180f19e7f..9e10c1c562a 100644 --- a/sys/dev/tc/zs_ioasic.c +++ b/sys/dev/tc/zs_ioasic.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs_ioasic.c,v 1.41 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: zs_ioasic.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.41 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -308,8 +308,10 @@ zs_ioasic_attach(device_t parent, device_t self, void *aux) * Look for a child driver for this channel. * The child attach will setup the hardware. */ - if (config_found_sm_loc(self, "zsc", locs, (void *)&zs_args, - zs_ioasic_print, zs_ioasic_submatch) == NULL) { + if (config_found(self, (void *)&zs_args, zs_ioasic_print, + CFARG_SUBMATCH, zs_ioasic_submatch, + CFARG_LOCATORS, locs, + CFARG_EOL) == NULL) { /* No sub-driver. Just reset it. */ uint8_t reset = (channel == 0) ? ZSWR9_A_RESET : ZSWR9_B_RESET; diff --git a/sys/dev/tc/zskbd.c b/sys/dev/tc/zskbd.c index 5652e10629f..8f78e95a0f0 100644 --- a/sys/dev/tc/zskbd.c +++ b/sys/dev/tc/zskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: zskbd.c,v 1.19 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: zskbd.c,v 1.20 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.19 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.20 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -234,7 +234,7 @@ zskbd_attach(device_t parent, device_t self, void *aux) a.accessops = &zskbd_accessops; a.accesscookie = zskbd; - zskbd->sc_wskbddev = config_found(self, &a, wskbddevprint); + zskbd->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); } int diff --git a/sys/dev/tc/zsms.c b/sys/dev/tc/zsms.c index 88e54ed010e..223062feada 100644 --- a/sys/dev/tc/zsms.c +++ b/sys/dev/tc/zsms.c @@ -1,4 +1,4 @@ -/* $NetBSD: zsms.c,v 1.18 2009/05/12 14:47:05 cegger Exp $ */ +/* $NetBSD: zsms.c,v 1.19 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.18 2009/05/12 14:47:05 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.19 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -182,7 +182,8 @@ zsms_attach(device_t parent, device_t self, void *aux) zsms->sc_enabled = 0; zsms->sc_selftest = 0; - zsms->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + zsms->sc_wsmousedev = config_found(self, &a, wsmousedevprint, + CFARG_EOL); } static int diff --git a/sys/dev/usb/auvitek_audio.c b/sys/dev/usb/auvitek_audio.c index 73177d86fc1..6acce9fce87 100644 --- a/sys/dev/usb/auvitek_audio.c +++ b/sys/dev/usb/auvitek_audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: auvitek_audio.c,v 1.3 2017/06/01 02:45:11 chs Exp $ */ +/* $NetBSD: auvitek_audio.c,v 1.4 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill <jmcneill@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auvitek_audio.c,v 1.3 2017/06/01 02:45:11 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auvitek_audio.c,v 1.4 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -95,8 +95,12 @@ auvitek_audio_attach(struct auvitek_softc *sc) uiaa.uiaa_proto = ifaces[i]->ui_idesc->bInterfaceProtocol; uiaa.uiaa_ifaceno = ifaces[i]->ui_idesc->bInterfaceNumber; ilocs[USBIFIFCF_INTERFACE] = uiaa.uiaa_ifaceno; - sc->sc_audiodev = config_found_sm_loc(sc->sc_dev, "usbifif", - ilocs, &uiaa, auvitek_ifprint, config_stdsubmatch); + sc->sc_audiodev = + config_found(sc->sc_dev, &uiaa, auvitek_ifprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "usbifif", + CFARG_LOCATORS, ilocs, + CFARG_EOL); if (sc->sc_audiodev) break; } diff --git a/sys/dev/usb/auvitek_dtv.c b/sys/dev/usb/auvitek_dtv.c index 6cfa95909a1..dce8377921c 100644 --- a/sys/dev/usb/auvitek_dtv.c +++ b/sys/dev/usb/auvitek_dtv.c @@ -1,4 +1,4 @@ -/* $NetBSD: auvitek_dtv.c,v 1.7 2016/04/23 10:15:31 skrll Exp $ */ +/* $NetBSD: auvitek_dtv.c,v 1.8 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auvitek_dtv.c,v 1.7 2016/04/23 10:15:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auvitek_dtv.c,v 1.8 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -116,8 +116,9 @@ auvitek_dtv_rescan(struct auvitek_softc *sc, const char *ifattr, daa.priv = sc; if (ifattr_match(ifattr, "dtvbus") && sc->sc_dtvdev == NULL) - sc->sc_dtvdev = config_found_ia(sc->sc_dev, "dtvbus", - &daa, dtv_print); + sc->sc_dtvdev = config_found(sc->sc_dev, &daa, dtv_print, + CFARG_IATTR, "dtvbus", + CFARG_EOL); } void diff --git a/sys/dev/usb/auvitek_i2c.c b/sys/dev/usb/auvitek_i2c.c index 3a52dfed66b..4650927449e 100644 --- a/sys/dev/usb/auvitek_i2c.c +++ b/sys/dev/usb/auvitek_i2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: auvitek_i2c.c,v 1.5 2019/12/22 23:23:32 thorpej Exp $ */ +/* $NetBSD: auvitek_i2c.c,v 1.6 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill <jmcneill@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auvitek_i2c.c,v 1.5 2019/12/22 23:23:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auvitek_i2c.c,v 1.6 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -101,8 +101,9 @@ auvitek_i2c_rescan(struct auvitek_softc *sc, const char *ifattr, if (ifattr_match(ifattr, "i2cbus") && sc->sc_i2cdev == NULL) { memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - sc->sc_i2cdev = config_found_ia(sc->sc_dev, "i2cbus", - &iba, iicbus_print); + sc->sc_i2cdev = config_found(sc->sc_dev, &iba, iicbus_print, + CFARG_IATTR, "i2cbus", + CFARG_EOL); } #endif } diff --git a/sys/dev/usb/emdtv_dtv.c b/sys/dev/usb/emdtv_dtv.c index 0b8c387786a..074f5fb0c53 100644 --- a/sys/dev/usb/emdtv_dtv.c +++ b/sys/dev/usb/emdtv_dtv.c @@ -1,4 +1,4 @@ -/* $NetBSD: emdtv_dtv.c,v 1.14 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: emdtv_dtv.c,v 1.15 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2008, 2011 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.14 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.15 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,8 +171,9 @@ emdtv_dtv_rescan(struct emdtv_softc *sc, const char *ifattr, const int *locs) daa.priv = sc; if (ifattr_match(ifattr, "dtvbus") && sc->sc_dtvdev == NULL) - sc->sc_dtvdev = config_found_ia(sc->sc_dev, "dtvbus", - &daa, dtv_print); + sc->sc_dtvdev = config_found(sc->sc_dev, &daa, dtv_print, + CFARG_IATTR, "dtvbus", + CFARG_EOL); } static void diff --git a/sys/dev/usb/emdtv_ir.c b/sys/dev/usb/emdtv_ir.c index 016afd57421..c3e5e82cb6c 100644 --- a/sys/dev/usb/emdtv_ir.c +++ b/sys/dev/usb/emdtv_ir.c @@ -1,4 +1,4 @@ -/* $NetBSD: emdtv_ir.c,v 1.2 2016/04/23 10:15:31 skrll Exp $ */ +/* $NetBSD: emdtv_ir.c,v 1.3 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill <jmcneill@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emdtv_ir.c,v 1.2 2016/04/23 10:15:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emdtv_ir.c,v 1.3 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/select.h> #include <sys/param.h> @@ -101,7 +101,9 @@ emdtv_ir_attach(struct emdtv_softc *sc) ia.ia_handle = sc; sc->sc_cirdev = - config_found_ia(sc->sc_dev, "irbus", &ia, ir_print); + config_found(sc->sc_dev, &ia, ir_print, + CFARG_IATTR, "irbus", + CFARG_EOL); } void diff --git a/sys/dev/usb/irmce.c b/sys/dev/usb/irmce.c index 9e2aef0082c..41db14bb02d 100644 --- a/sys/dev/usb/irmce.c +++ b/sys/dev/usb/irmce.c @@ -1,4 +1,4 @@ -/* $NetBSD: irmce.c,v 1.6 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: irmce.c,v 1.7 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irmce.c,v 1.6 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irmce.c,v 1.7 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -307,8 +307,8 @@ irmce_rescan(device_t self, const char *ifattr, const int *locators) iaa.ia_type = IR_TYPE_CIR; iaa.ia_methods = &irmce_cir_methods; iaa.ia_handle = sc; - sc->sc_cirdev = config_found_ia(self, "irbus", - &iaa, irmce_print); + sc->sc_cirdev = + config_found(self, &iaa, irmce_print, CFARG_EOL); } return 0; diff --git a/sys/dev/usb/motg.c b/sys/dev/usb/motg.c index c94e4109049..df6c470c6a2 100644 --- a/sys/dev/usb/motg.c +++ b/sys/dev/usb/motg.c @@ -1,4 +1,4 @@ -/* $NetBSD: motg.c,v 1.35 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: motg.c,v 1.36 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.35 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.36 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -471,7 +471,8 @@ motg_init(struct motg_softc *sc) sc->sc_bus.ub_revision = USBREV_2_0; sc->sc_bus.ub_usedma = false; sc->sc_bus.ub_hcpriv = sc; - sc->sc_child = config_found(sc->sc_dev, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(sc->sc_dev, &sc->sc_bus, usbctlprint, + CFARG_EOL); return 0; } diff --git a/sys/dev/usb/u3g.c b/sys/dev/usb/u3g.c index be51ae01870..8665499fb26 100644 --- a/sys/dev/usb/u3g.c +++ b/sys/dev/usb/u3g.c @@ -1,4 +1,4 @@ -/* $NetBSD: u3g.c,v 1.41 2020/06/05 08:02:32 skrll Exp $ */ +/* $NetBSD: u3g.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.41 2020/06/05 08:02:32 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -386,8 +386,9 @@ u3g_attach(device_t parent, device_t self, void *aux) com->c_msr = UMSR_DSR | UMSR_CTS | UMSR_DCD; com->c_open = false; com->c_purging = false; - com->c_dev = config_found_sm_loc(self, "ucombus", - NULL, &ucaa, ucomprint, ucomsubmatch); + com->c_dev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); ucaa.ucaa_bulkin = -1; ucaa.ucaa_bulkout = -1; } diff --git a/sys/dev/usb/uark.c b/sys/dev/usb/uark.c index 9502ae6fd11..d08ea78f1fb 100644 --- a/sys/dev/usb/uark.c +++ b/sys/dev/usb/uark.c @@ -1,4 +1,4 @@ -/* $NetBSD: uark.c,v 1.16 2020/01/07 06:42:26 maxv Exp $ */ +/* $NetBSD: uark.c,v 1.17 2021/04/24 23:36:59 thorpej Exp $ */ /* $OpenBSD: uark.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uark.c,v 1.16 2020/01/07 06:42:26 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uark.c,v 1.17 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -190,8 +190,9 @@ uark_attach(device_t parent, device_t self, void *aux) usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return; } diff --git a/sys/dev/usb/uatp.c b/sys/dev/usb/uatp.c index ccfb0ac616e..67213de9d22 100644 --- a/sys/dev/usb/uatp.c +++ b/sys/dev/usb/uatp.c @@ -1,4 +1,4 @@ -/* $NetBSD: uatp.c,v 1.25 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: uatp.c,v 1.26 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -146,7 +146,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.25 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.26 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -985,8 +985,7 @@ uatp_attach(device_t parent, device_t self, void *aux) /* Attach wsmouse. */ a.accessops = &uatp_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &a, - wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); } /* Sysctl setup */ diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index dd40a5ee305..8727389137a 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ubsa.c,v 1.40 2020/03/13 18:17:40 christos Exp $ */ +/* $NetBSD: ubsa.c,v 1.41 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.40 2020/03/13 18:17:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.41 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -280,8 +280,9 @@ ubsa_attach(device_t parent, device_t self, void *aux) ucaa.ucaa_info = NULL; DPRINTF(("ubsa: int#=%d, in = %#x, out = %#x, intr = %#x\n", i, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number)); - sc->sc_subdevs[0] = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdevs[0] = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c index d59a9a90b53..e5bd29b4672 100644 --- a/sys/dev/usb/uchcom.c +++ b/sys/dev/usb/uchcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uchcom.c,v 1.36 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: uchcom.c,v 1.37 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.36 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.37 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -273,8 +273,9 @@ uchcom_attach(device_t parent, device_t self, void *aux) usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return; diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index cc4c625dbdd..4166954acbd 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $NetBSD: udl.c,v 1.25 2020/09/05 16:30:11 riastradh Exp $ */ +/* $NetBSD: udl.c,v 1.26 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2009 FUKAUMI Naoki. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.25 2020/09/05 16:30:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.26 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -475,7 +475,7 @@ udl_attach(device_t parent, device_t self, void *aux) aa.accesscookie = sc; sc->sc_wsdisplay = - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); diff --git a/sys/dev/usb/udsir.c b/sys/dev/usb/udsir.c index 12646ce4ef7..f5446a7935e 100644 --- a/sys/dev/usb/udsir.c +++ b/sys/dev/usb/udsir.c @@ -1,4 +1,4 @@ -/* $NetBSD: udsir.c,v 1.12 2020/12/18 01:40:20 thorpej Exp $ */ +/* $NetBSD: udsir.c,v 1.13 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.12 2020/12/18 01:40:20 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.13 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -230,7 +230,7 @@ udsir_attach(device_t parent, device_t self, void *aux) ia.ia_methods = &udsir_methods; ia.ia_handle = sc; - sc->sc_child = config_found(self, &ia, ir_print); + sc->sc_child = config_found(self, &ia, ir_print, CFARG_EOL); selinit(&sc->sc_rd_sel); selinit(&sc->sc_wr_sel); diff --git a/sys/dev/usb/uep.c b/sys/dev/usb/uep.c index f50efd0348a..d97eac0f1fb 100644 --- a/sys/dev/usb/uep.c +++ b/sys/dev/usb/uep.c @@ -1,4 +1,4 @@ -/* $NetBSD: uep.c,v 1.23 2019/12/01 08:27:54 maxv Exp $ */ +/* $NetBSD: uep.c,v 1.24 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ * eGalax USB touchpanel controller driver. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.23 2019/12/01 08:27:54 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.24 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -223,7 +223,7 @@ uep_attach(device_t parent, device_t self, void *aux) a.accessops = &uep_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); tpcalib_init(&sc->sc_tpcalib); tpcalib_ioctl(&sc->sc_tpcalib, WSMOUSEIO_SCALIBCOORDS, diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c index d8cc3c4f40b..f1feaa1f61a 100644 --- a/sys/dev/usb/uftdi.c +++ b/sys/dev/usb/uftdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.74 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: uftdi.c,v 1.75 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.74 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.75 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -331,8 +331,9 @@ uftdi_attach(device_t parent, device_t self, void *aux) DPRINTF(("uftdi: in=%#x out=%#x isize=%#x osize=%#x\n", ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, ucaa.ucaa_ibufsize, ucaa.ucaa_obufsize)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, - &ucaa, ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); diff --git a/sys/dev/usb/ugensa.c b/sys/dev/usb/ugensa.c index 4a0286191f0..0bd6d36006e 100644 --- a/sys/dev/usb/ugensa.c +++ b/sys/dev/usb/ugensa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ugensa.c,v 1.43 2020/07/04 08:07:02 ryoon Exp $ */ +/* $NetBSD: ugensa.c,v 1.44 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.43 2020/07/04 08:07:02 ryoon Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.44 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -237,8 +237,9 @@ ugensa_attach(device_t parent, device_t self, void *aux) DPRINTF(("ugensa: in=%#x out=%#x\n", ucaa.ucaa_bulkin, ucaa.ucaa_bulkout)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index 854e1fdee9f..74f73c5ab4a 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhidev.c,v 1.79 2020/11/29 22:54:51 riastradh Exp $ */ +/* $NetBSD: uhidev.c,v 1.80 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.79 2020/11/29 22:54:51 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.80 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -361,9 +361,10 @@ uhidev_attach(device_t parent, device_t self, void *aux) uha.reportid = repid; locs[UHIDBUSCF_REPORTID] = repid; - dev = config_found_sm_loc(self, - "uhidbus", locs, &uha, - uhidevprint, config_stdsubmatch); + dev = config_found(self, &uha, uhidevprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, locs, + CFARG_EOL); sc->sc_subdevs[repid] = dev; if (dev != NULL) { csc = device_private(dev); diff --git a/sys/dev/usb/uhmodem.c b/sys/dev/usb/uhmodem.c index efd4627ec98..38cf4eec293 100644 --- a/sys/dev/usb/uhmodem.c +++ b/sys/dev/usb/uhmodem.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhmodem.c,v 1.22 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: uhmodem.c,v 1.23 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2008 Yojiro UO <yuo@nui.org>. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.22 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhmodem.c,v 1.23 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -351,8 +351,9 @@ uhmodem_attach(device_t parent, device_t self, void *aux) DPRINTF(("uhmodem: int#=%d, in = %#x, out = %#x, intr = %#x\n", i, ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number)); - sc->sc_subdevs[i] = config_found_sm_loc(self, "ucombus", NULL, - &ucaa, ucomprint, ucomsubmatch); + sc->sc_subdevs[i] = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); /* issue endpoint halt to each interface */ err = uhmodem_endpointhalt(sc, i); diff --git a/sys/dev/usb/uipaq.c b/sys/dev/usb/uipaq.c index edb6e487c24..4d0de6808cb 100644 --- a/sys/dev/usb/uipaq.c +++ b/sys/dev/usb/uipaq.c @@ -1,4 +1,4 @@ -/* $NetBSD: uipaq.c,v 1.28 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: uipaq.c,v 1.29 2021/04/24 23:36:59 thorpej Exp $ */ /* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */ /* @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.28 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.29 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -237,8 +237,9 @@ uipaq_attach(device_t parent, device_t self, void *aux) return; } - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return; diff --git a/sys/dev/usb/uirda.c b/sys/dev/usb/uirda.c index 291480fa519..f16926a247f 100644 --- a/sys/dev/usb/uirda.c +++ b/sys/dev/usb/uirda.c @@ -1,4 +1,4 @@ -/* $NetBSD: uirda.c,v 1.48 2020/12/18 01:40:20 thorpej Exp $ */ +/* $NetBSD: uirda.c,v 1.49 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.48 2020/12/18 01:40:20 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.49 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -289,7 +289,7 @@ uirda_attach(device_t parent, device_t self, void *aux) ia.ia_methods = sc->sc_irm ? sc->sc_irm : &uirda_methods; ia.ia_handle = sc; - sc->sc_child = config_found(self, &ia, ir_print); + sc->sc_child = config_found(self, &ia, ir_print, CFARG_EOL); return; } diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 166c8527334..741b61ae3e9 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $ */ +/* $NetBSD: ukbd.c,v 1.150 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.150 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -488,7 +488,7 @@ ukbd_attach(device_t parent, device_t self, void *aux) usbd_delay_ms(uha->parent->sc_udev, 400); ukbd_set_leds(sc, 0); - sc->sc_wskbddev = config_found(self, &a, wskbddevprint); + sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARG_EOL); return; } diff --git a/sys/dev/usb/umass_scsipi.c b/sys/dev/usb/umass_scsipi.c index 81a783d5478..1b14591d0e6 100644 --- a/sys/dev/usb/umass_scsipi.c +++ b/sys/dev/usb/umass_scsipi.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass_scsipi.c,v 1.66 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: umass_scsipi.c,v 1.67 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.66 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.67 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -141,8 +141,9 @@ umass_scsi_attach(struct umass_softc *sc) sc->sc_refcnt++; mutex_exit(&sc->sc_lock); scbus->base.sc_child = - config_found_ia(sc->sc_dev, "scsi", &scbus->sc_channel, - scsiprint); + config_found(sc->sc_dev, &scbus->sc_channel, scsiprint, + CFARG_IATTR, "scsi", + CFARG_EOL); mutex_enter(&sc->sc_lock); if (--sc->sc_refcnt < 0) cv_broadcast(&sc->sc_detach_cv); @@ -183,8 +184,9 @@ umass_atapi_attach(struct umass_softc *sc) sc->sc_refcnt++; mutex_exit(&sc->sc_lock); scbus->base.sc_child = - config_found_ia(sc->sc_dev, "atapi", &scbus->sc_channel, - atapiprint); + config_found(sc->sc_dev, &scbus->sc_channel, atapiprint, + CFARG_IATTR, "atapi", + CFARG_EOL); mutex_enter(&sc->sc_lock); if (--sc->sc_refcnt < 0) cv_broadcast(&sc->sc_detach_cv); diff --git a/sys/dev/usb/umcs.c b/sys/dev/usb/umcs.c index a8694a64029..b61ad34e52f 100644 --- a/sys/dev/usb/umcs.c +++ b/sys/dev/usb/umcs.c @@ -1,4 +1,4 @@ -/* $NetBSD: umcs.c,v 1.15 2020/01/07 06:42:26 maxv Exp $ */ +/* $NetBSD: umcs.c,v 1.16 2021/04/24 23:36:59 thorpej Exp $ */ /* $FreeBSD: head/sys/dev/usb/serial/umcs.c 260559 2014-01-12 11:44:28Z hselasky $ */ /*- @@ -41,7 +41,7 @@ * */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.15 2020/01/07 06:42:26 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.16 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -340,8 +340,9 @@ umcs7840_attach(device_t parent, device_t self, void *aux) sc->sc_ports[i].sc_port_phys = phyport; sc->sc_ports[i].sc_port_ucom = - config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); } } diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c index 4b01ea6e538..bc2e0040568 100644 --- a/sys/dev/usb/umct.c +++ b/sys/dev/usb/umct.c @@ -1,4 +1,4 @@ -/* $NetBSD: umct.c,v 1.41 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: umct.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.41 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.42 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -301,8 +301,9 @@ umct_attach(device_t parent, device_t self, void *aux) DPRINTF(("umct: in=%#x out=%#x intr=%#x\n", ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return; } diff --git a/sys/dev/usb/umodem_common.c b/sys/dev/usb/umodem_common.c index 6c4f724c47d..c0c968cb096 100644 --- a/sys/dev/usb/umodem_common.c +++ b/sys/dev/usb/umodem_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: umodem_common.c,v 1.33 2020/04/12 01:10:54 simonb Exp $ */ +/* $NetBSD: umodem_common.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.33 2020/04/12 01:10:54 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.34 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -263,8 +263,9 @@ umodem_common_attach(device_t self, struct umodem_softc *sc, usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); DPRINTF(("umodem_common_attach: sc=%p\n", sc)); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return 0; diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index 5603de65316..0453aabeae8 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uplcom.c,v 1.89 2020/03/14 03:01:36 christos Exp $ */ +/* $NetBSD: uplcom.c,v 1.90 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.89 2020/03/14 03:01:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.90 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -455,8 +455,9 @@ uplcom_attach(device_t parent, device_t self, void *aux) DPRINTF("in=%#jx out=%#jx intr=%#jx", ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number, 0); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index d4f1de80559..a2cb0818d2a 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.249 2021/02/17 06:30:57 mlelstv Exp $ */ +/* $NetBSD: usb_subr.c,v 1.250 2021/04/24 23:36:59 thorpej Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.249 2021/02/17 06:30:57 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.250 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -851,7 +851,9 @@ usbd_attach_roothub(device_t parent, struct usbd_device *dev) uaa.uaa_proto = dd->bDeviceProtocol; KERNEL_LOCK(1, curlwp); - dv = config_found_ia(parent, "usbroothubif", &uaa, 0); + dv = config_found(parent, &uaa, NULL, + CFARG_IATTR, "usbroothubif", + CFARG_EOL); KERNEL_UNLOCK_ONE(curlwp); if (dv) { dev->ud_subdevs = kmem_alloc(sizeof(dv), KM_SLEEP); @@ -925,8 +927,11 @@ usbd_attachwholedevice(device_t parent, struct usbd_device *dev, int port, KERNEL_LOCK(1, curlwp); config_pending_incr(parent); - dv = config_found_sm_loc(parent, "usbdevif", dlocs, &uaa, usbd_print, - config_stdsubmatch); + dv = config_found(parent, &uaa, usbd_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "usbdevif", + CFARG_LOCATORS, dlocs, + CFARG_EOL); KERNEL_UNLOCK_ONE(curlwp); if (dv) { dev->ud_subdevs = kmem_alloc(sizeof(dv), KM_SLEEP); @@ -1003,8 +1008,11 @@ usbd_attachinterfaces(device_t parent, struct usbd_device *dev, continue; } KERNEL_LOCK(1, curlwp); - dv = config_found_sm_loc(parent, "usbifif", ilocs, &uiaa, - usbd_ifprint, config_stdsubmatch); + dv = config_found(parent, &uiaa, usbd_ifprint, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_IATTR, "usbifif", + CFARG_LOCATORS, ilocs, + CFARG_EOL); KERNEL_UNLOCK_ONE(curlwp); if (!dv) continue; diff --git a/sys/dev/usb/uslsa.c b/sys/dev/usb/uslsa.c index db092500786..c85e328ece1 100644 --- a/sys/dev/usb/uslsa.c +++ b/sys/dev/usb/uslsa.c @@ -1,4 +1,4 @@ -/* $NetBSD: uslsa.c,v 1.29 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: uslsa.c,v 1.30 2021/04/24 23:36:59 thorpej Exp $ */ /* from ugensa.c */ @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.29 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.30 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -236,8 +236,9 @@ uslsa_attach(device_t parent, device_t self, void *aux) return; } - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c index 88c8f35171a..c4cc42e2d8a 100644 --- a/sys/dev/usb/usscanner.c +++ b/sys/dev/usb/usscanner.c @@ -1,4 +1,4 @@ -/* $NetBSD: usscanner.c,v 1.48 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: usscanner.c,v 1.49 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.48 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.49 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -331,7 +331,8 @@ usscanner_attach(device_t parent, device_t self, void *aux) usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev); - sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint); + sc->sc_child = config_found(sc->sc_dev, &sc->sc_channel, scsiprint, + CFARG_EOL); DPRINTFN(10, ("usscanner_attach: %p\n", sc->sc_udev)); diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c index 4f42a1ece5c..a33bff5f7c8 100644 --- a/sys/dev/usb/ustir.c +++ b/sys/dev/usb/ustir.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustir.c,v 1.47 2020/12/18 01:40:20 thorpej Exp $ */ +/* $NetBSD: ustir.c,v 1.48 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.47 2020/12/18 01:40:20 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.48 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -303,7 +303,7 @@ ustir_attach(device_t parent, device_t self, void *aux) ia.ia_methods = &ustir_methods; ia.ia_handle = sc; - sc->sc_child = config_found(self, &ia, ir_print); + sc->sc_child = config_found(self, &ia, ir_print, CFARG_EOL); selinit(&sc->sc_rd_sel); selinit(&sc->sc_wr_sel); sc->sc_init_state = USTIR_INIT_INITED; diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index 120e4e7e8d4..330996fb927 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $NetBSD: uts.c,v 1.12 2020/03/14 02:35:34 christos Exp $ */ +/* $NetBSD: uts.c,v 1.13 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uts.c,v 1.12 2020/03/14 02:35:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uts.c,v 1.13 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -235,7 +235,7 @@ uts_attach(device_t parent, device_t self, void *aux) a.accessops = &uts_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); /* calibrate the touchscreen */ memset(&sc->sc_calibcoords, 0, sizeof(sc->sc_calibcoords)); diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index 7256fe22fbe..24943e2987d 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvisor.c,v 1.55 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: uvisor.c,v 1.56 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.55 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.56 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -326,9 +326,10 @@ uvisor_attach(device_t parent, device_t self, void *aux) } } if (hasin == 1 && hasout == 1) - sc->sc_subdevs[i] = config_found_sm_loc(self, - "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdevs[i] = + config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); else aprint_error_dev(self, "no proper endpoints for port %d (%d,%d)\n", @@ -358,10 +359,10 @@ uvisor_attach(device_t parent, device_t self, void *aux) ucaa.ucaa_bulkin = port | UE_DIR_IN; ucaa.ucaa_bulkout = port | UE_DIR_OUT; } - sc->sc_subdevs[i] = config_found_sm_loc(self, "ucombus", - NULL, &ucaa, ucomprint, ucomsubmatch); - - + sc->sc_subdevs[i] = + config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); } } diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index ed2595c9659..073d701a329 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvscom.c,v 1.37 2020/03/13 18:17:41 christos Exp $ */ +/* $NetBSD: uvscom.c,v 1.38 2021/04/24 23:36:59 thorpej Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.37 2020/03/13 18:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.38 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -361,8 +361,9 @@ uvscom_attach(device_t parent, device_t self, void *aux) DPRINTF(("uplcom: in=%#x out=%#x intr=%#x\n", ucaa.ucaa_bulkin, ucaa.ucaa_bulkout, sc->sc_intr_number )); - sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa, - ucomprint, ucomsubmatch); + sc->sc_subdev = config_found(self, &ucaa, ucomprint, + CFARG_SUBMATCH, ucomsubmatch, + CFARG_EOL); return; } diff --git a/sys/dev/usb/vhci.c b/sys/dev/usb/vhci.c index 7e1350152cc..b5c85845888 100644 --- a/sys/dev/usb/vhci.c +++ b/sys/dev/usb/vhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: vhci.c,v 1.20 2020/06/05 17:20:56 maxv Exp $ */ +/* $NetBSD: vhci.c,v 1.21 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 2019-2020 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.20 2020/06/05 17:20:56 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.21 2021/04/24 23:36:59 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1319,5 +1319,5 @@ vhci_attach(device_t parent, device_t self, void *aux) KCOV_REMOTE_VHCI_ID(sc->sc_bus.ub_busnum, i)); } - sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint, CFARG_EOL); } diff --git a/sys/dev/video.c b/sys/dev/video.c index 64a9fd667af..887776769e1 100644 --- a/sys/dev/video.c +++ b/sys/dev/video.c @@ -1,4 +1,4 @@ -/* $NetBSD: video.c,v 1.39 2020/08/13 16:45:58 riastradh Exp $ */ +/* $NetBSD: video.c,v 1.40 2021/04/24 23:36:52 thorpej Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney <pat@polycrystal.org> @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.39 2020/08/13 16:45:58 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.40 2021/04/24 23:36:52 thorpej Exp $"); #include "video.h" #if NVIDEO > 0 @@ -433,7 +433,9 @@ video_attach_mi(const struct video_hw_if *hw_if, device_t parent) struct video_attach_args args; args.hw_if = hw_if; - return config_found_ia(parent, "videobus", &args, video_print); + return config_found(parent, &args, video_print, + CFARG_IATTR, "videobus", + CFARG_EOL); } /* video_submit_payload - called by hardware driver to submit payload data */ diff --git a/sys/dev/vme/vme.c b/sys/dev/vme/vme.c index 7cdf90b119c..42123699391 100644 --- a/sys/dev/vme/vme.c +++ b/sys/dev/vme/vme.c @@ -1,4 +1,4 @@ -/* $NetBSD: vme.c,v 1.27 2020/08/24 05:37:41 msaitoh Exp $ */ +/* $NetBSD: vme.c,v 1.28 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1999 @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.27 2020/08/24 05:37:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.28 2021/04/24 23:36:59 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -147,8 +147,8 @@ vmesubmatch(device_t bus, cfdata_t dev, const int *ldesc, void *aux) v.va_vct = sc->sc_vct; v.va_bdt = sc->sc_bdt; - if (config_match(bus, dev, &v)) { - config_attach(bus, dev, &v, (cfprint_t)vmeprint); + if (config_probe(bus, dev, &v)) { + config_attach(bus, dev, &v, (cfprint_t)vmeprint, CFARG_EOL); return (1); } return (0); @@ -201,9 +201,13 @@ vmeattach(device_t parent, device_t self, void *aux) if (sc->slaveconfig) { /* first get info about the bus master's slave side, if present */ - config_search_ia(vmesubmatch1, self, "vme", 0); + config_search(self, NULL, + CFARG_SEARCH, vmesubmatch1, + CFARG_EOL); } - config_search_ia(vmesubmatch, self, "vme", 0); + config_search(self, NULL, + CFARG_SEARCH, vmesubmatch, + CFARG_EOL); #ifdef VMEDEBUG if (sc->vme32ext) diff --git a/sys/dev/vme/xd.c b/sys/dev/vme/xd.c index d529f96be5c..0732e9d9fd7 100644 --- a/sys/dev/vme/xd.c +++ b/sys/dev/vme/xd.c @@ -1,4 +1,4 @@ -/* $NetBSD: xd.c,v 1.96 2019/11/10 21:16:38 chs Exp $ */ +/* $NetBSD: xd.c,v 1.97 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1995 Charles D. Cranor @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.96 2019/11/10 21:16:38 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.97 2021/04/24 23:36:59 thorpej Exp $"); #undef XDC_DEBUG /* full debug */ #define XDC_DIAG /* extra sanity checks */ @@ -672,7 +672,7 @@ xdcattach(device_t parent, device_t self, void *aux) xa.booting = 1; for (xa.driveno = 0; xa.driveno < XDC_MAXDEV; xa.driveno++) - (void) config_found(self, (void *) &xa, NULL); + (void) config_found(self, (void *) &xa, NULL, CFARG_EOL); /* start the watchdog clock */ callout_reset(&xdc->sc_tick_ch, XDC_TICKCNT, xdc_tick, xdc); diff --git a/sys/dev/vme/xy.c b/sys/dev/vme/xy.c index 919f59a42da..a2472f57643 100644 --- a/sys/dev/vme/xy.c +++ b/sys/dev/vme/xy.c @@ -1,4 +1,4 @@ -/* $NetBSD: xy.c,v 1.100 2019/11/10 21:16:38 chs Exp $ */ +/* $NetBSD: xy.c,v 1.101 2021/04/24 23:36:59 thorpej Exp $ */ /* * Copyright (c) 1995 Charles D. Cranor @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.100 2019/11/10 21:16:38 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.101 2021/04/24 23:36:59 thorpej Exp $"); #undef XYC_DEBUG /* full debug */ #undef XYC_DIAG /* extra sanity checks */ @@ -571,7 +571,7 @@ xycattach(device_t parent, device_t self, void *aux) xa.booting = 1; for (xa.driveno = 0; xa.driveno < XYC_MAXDEV; xa.driveno++) - (void) config_found(self, (void *) &xa, NULL); + (void) config_found(self, (void *) &xa, NULL, CFARG_EOL); /* start the watchdog clock */ callout_reset(&xyc->sc_tick_ch, XYC_TICKCNT, xyc_tick, xyc); diff --git a/sys/dev/wsfb/genfb.c b/sys/dev/wsfb/genfb.c index 9c6138b979b..de913b2e41b 100644 --- a/sys/dev/wsfb/genfb.c +++ b/sys/dev/wsfb/genfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.81 2021/01/27 22:42:53 macallan Exp $ */ +/* $NetBSD: genfb.c,v 1.82 2021/04/24 23:37:00 thorpej Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.81 2021/01/27 22:42:53 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.82 2021/04/24 23:37:00 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -377,8 +377,9 @@ genfb_attach(struct genfb_softc *sc, struct genfb_ops *ops) SCREEN_DISABLE_DRAWING(&sc->sc_console_screen); #endif - config_found_ia(sc->sc_dev, "wsemuldisplaydev", &aa, - wsemuldisplaydevprint); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); return 0; } diff --git a/sys/dev/xmi/xmi.c b/sys/dev/xmi/xmi.c index 10abfedc861..4737b8a31ee 100644 --- a/sys/dev/xmi/xmi.c +++ b/sys/dev/xmi/xmi.c @@ -1,4 +1,4 @@ -/* $NetBSD: xmi.c,v 1.11 2010/11/13 13:52:13 uebayasi Exp $ */ +/* $NetBSD: xmi.c,v 1.12 2021/04/24 23:37:00 thorpej Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xmi.c,v 1.11 2010/11/13 13:52:13 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xmi.c,v 1.12 2021/04/24 23:37:00 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -117,6 +117,6 @@ xmi_attach(struct xmi_softc *sc) xa.xa_nodenr = nodenr; xa.xa_ivec = 256 + lastiv; lastiv += 4; - config_found(sc->sc_dev, &xa, xmi_print); + config_found(sc->sc_dev, &xa, xmi_print, CFARG_EOL); } } |
