summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-04-24 23:36:23 +0000
committerthorpej <thorpej@NetBSD.org>2021-04-24 23:36:23 +0000
commit3bee0c110b9ff2a9a0e2833be339e1c873af3a44 (patch)
tree82c9f34b9867882723e76eff95e5d7ca6cab69bf /sys/dev/pci
parente77b3a7c4b6598de68d8b78f86e7851410840595 (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/pci')
-rw-r--r--sys/dev/pci/aac_pci.c6
-rw-r--r--sys/dev/pci/alipm.c6
-rw-r--r--sys/dev/pci/amdpm_smbus.c6
-rw-r--r--sys/dev/pci/amr.c16
-rw-r--r--sys/dev/pci/arcmsr.c7
-rw-r--r--sys/dev/pci/btvmei.c6
-rw-r--r--sys/dev/pci/btvmeii.c6
-rw-r--r--sys/dev/pci/cmpci.c9
-rw-r--r--sys/dev/pci/coram.c14
-rw-r--r--sys/dev/pci/cxdtv.c13
-rw-r--r--sys/dev/pci/cxgb/cxgb_main.c8
-rw-r--r--sys/dev/pci/ehci_pci.c7
-rw-r--r--sys/dev/pci/eso.c10
-rw-r--r--sys/dev/pci/fms.c8
-rw-r--r--sys/dev/pci/genfb_pci.c8
-rw-r--r--sys/dev/pci/gffb.c6
-rw-r--r--sys/dev/pci/ibmcd.c4
-rw-r--r--sys/dev/pci/ichsmb.c17
-rw-r--r--sys/dev/pci/if_msk.c8
-rw-r--r--sys/dev/pci/if_sk.c8
-rw-r--r--sys/dev/pci/igma.c12
-rw-r--r--sys/dev/pci/igma/igmafb.c6
-rw-r--r--sys/dev/pci/ips.c6
-rw-r--r--sys/dev/pci/ismt.c14
-rw-r--r--sys/dev/pci/jmide.c10
-rw-r--r--sys/dev/pci/joy_eap.c6
-rw-r--r--sys/dev/pci/lynxfb.c6
-rw-r--r--sys/dev/pci/machfb.c12
-rw-r--r--sys/dev/pci/mfii.c10
-rw-r--r--sys/dev/pci/mlx_pci.c6
-rw-r--r--sys/dev/pci/mly.c6
-rw-r--r--sys/dev/pci/mpii.c9
-rw-r--r--sys/dev/pci/nfsmb.c12
-rw-r--r--sys/dev/pci/oboe.c6
-rw-r--r--sys/dev/pci/ohci_pci.c7
-rw-r--r--sys/dev/pci/pccbb.c9
-rw-r--r--sys/dev/pci/pci.c10
-rw-r--r--sys/dev/pci/piixpm.c21
-rw-r--r--sys/dev/pci/pm2fb.c6
-rw-r--r--sys/dev/pci/pm3fb.c2
-rw-r--r--sys/dev/pci/ppb.c6
-rw-r--r--sys/dev/pci/puc.c10
-rw-r--r--sys/dev/pci/r128fb.c6
-rw-r--r--sys/dev/pci/radeonfb.c12
-rw-r--r--sys/dev/pci/sisfb.c4
-rw-r--r--sys/dev/pci/sv.c6
-rw-r--r--sys/dev/pci/tdvfb.c6
-rw-r--r--sys/dev/pci/tga.c6
-rw-r--r--sys/dev/pci/trm.c6
-rw-r--r--sys/dev/pci/twa.c13
-rw-r--r--sys/dev/pci/twe.c14
-rw-r--r--sys/dev/pci/uhci_pci.c7
-rw-r--r--sys/dev/pci/unichromefb.c12
-rw-r--r--sys/dev/pci/vga_pci.c12
-rw-r--r--sys/dev/pci/vioscsi.c6
-rw-r--r--sys/dev/pci/virtio_pci.c10
-rw-r--r--sys/dev/pci/voodoofb.c12
-rw-r--r--sys/dev/pci/voyager.c20
-rw-r--r--sys/dev/pci/voyager/voyagerfb.c6
-rw-r--r--sys/dev/pci/wcfb.c6
-rw-r--r--sys/dev/pci/xhci_pci.c9
-rw-r--r--sys/dev/pci/xmm7360.c4
-rw-r--r--sys/dev/pci/yds.c8
63 files changed, 301 insertions, 249 deletions
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);