Index: sys/arch/i386/acpi/npx_acpi.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/acpi/npx_acpi.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 npx_acpi.c --- sys/arch/i386/acpi/npx_acpi.c 16 Nov 2006 01:32:38 -0000 1.16 +++ sys/arch/i386/acpi/npx_acpi.c 9 Jul 2007 22:29:24 -0000 @@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: npx_acpi.c,v #include -static int npx_acpi_match(struct device *, struct cfdata *, void *); +static int npx_acpi_match(struct device *, cfdata_t, void *); static void npx_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(npx_acpi, sizeof(struct npx_softc), npx_acpi_match, @@ -65,7 +65,7 @@ static const char * const npx_acpi_ids[] * npx_acpi_match: autoconf(9) match routine */ static int -npx_acpi_match(struct device *parent, struct cfdata *match, +npx_acpi_match(struct device *parent, cfdata_t match, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/arch/i386/acpi/sony_acpi.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/acpi/sony_acpi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 sony_acpi.c --- sys/arch/i386/acpi/sony_acpi.c 16 Nov 2006 01:32:38 -0000 1.5 +++ sys/arch/i386/acpi/sony_acpi.c 9 Jul 2007 22:29:24 -0000 @@ -62,7 +62,7 @@ static const char * const sony_acpi_ids[ NULL }; -static int sony_acpi_match(struct device *, struct cfdata *, void *); +static int sony_acpi_match(struct device *, cfdata_t, void *); static void sony_acpi_attach(struct device *, struct device *, void *); static ACPI_STATUS sony_acpi_eval_set_integer(ACPI_HANDLE, const char *, ACPI_INTEGER, ACPI_INTEGER *); @@ -72,7 +72,7 @@ CFATTACH_DECL(sony_acpi, sizeof(struct s sony_acpi_match, sony_acpi_attach, NULL, NULL); static int -sony_acpi_match(struct device *parent, struct cfdata *match, +sony_acpi_match(struct device *parent, cfdata_t match, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/arch/i386/acpi/spic_acpi.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/acpi/spic_acpi.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 spic_acpi.c --- sys/arch/i386/acpi/spic_acpi.c 16 Nov 2006 01:32:38 -0000 1.16 +++ sys/arch/i386/acpi/spic_acpi.c 9 Jul 2007 22:29:24 -0000 @@ -66,7 +66,7 @@ static const char * const spic_acpi_ids[ NULL }; -static int spic_acpi_match(struct device *, struct cfdata *, void *); +static int spic_acpi_match(struct device *, cfdata_t, void *); static void spic_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(spic_acpi, sizeof(struct spic_acpi_softc), @@ -74,7 +74,7 @@ CFATTACH_DECL(spic_acpi, sizeof(struct s static int -spic_acpi_match(struct device *parent, struct cfdata *match, +spic_acpi_match(struct device *parent, cfdata_t match, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/arch/i386/acpi/vald_acpi.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/acpi/vald_acpi.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 vald_acpi.c --- sys/arch/i386/acpi/vald_acpi.c 4 Apr 2007 01:34:44 -0000 1.25 +++ sys/arch/i386/acpi/vald_acpi.c 9 Jul 2007 22:29:24 -0000 @@ -137,7 +137,7 @@ static const char * const vald_acpi_hids #define LIBRIGHT_UP 0x01 #define LIBRIGHT_DOWN 0x02 -static int vald_acpi_match(struct device *, struct cfdata *, void *); +static int vald_acpi_match(struct device *, cfdata_t, void *); static void vald_acpi_attach(struct device *, struct device *, void *); static void vald_acpi_event(void *); @@ -171,7 +171,7 @@ CFATTACH_DECL(vald_acpi, sizeof(struct v * Autoconfiguration `match' routine. */ static int -vald_acpi_match(struct device *parent, struct cfdata *match, +vald_acpi_match(struct device *parent, cfdata_t match, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/arch/i386/bios/vesa_text.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/bios/vesa_text.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 vesa_text.c --- sys/arch/i386/bios/vesa_text.c 20 Feb 2007 00:09:57 -0000 1.8 +++ sys/arch/i386/bios/vesa_text.c 9 Jul 2007 22:29:24 -0000 @@ -14,7 +14,7 @@ __KERNEL_RCSID(0, "$NetBSD: vesa_text.c, #include #include -static int vesatext_match(struct device *, struct cfdata *, void *); +static int vesatext_match(struct device *, cfdata_t, void *); static void vesatext_attach(struct device *, struct device *, void *); struct vesatextsc { @@ -27,7 +27,7 @@ CFATTACH_DECL(vesatext, sizeof(struct ve vesatext_match, vesatext_attach, NULL, NULL); static int -vesatext_match(struct device *parent, struct cfdata *match, void *aux) +vesatext_match(struct device *parent, cfdata_t match, void *aux) { struct vesabiosdev_attach_args *vaa = aux; Index: sys/arch/i386/bios/vesabios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/bios/vesabios.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 vesabios.c --- sys/arch/i386/bios/vesabios.c 24 Mar 2007 00:07:17 -0000 1.24 +++ sys/arch/i386/bios/vesabios.c 9 Jul 2007 22:29:24 -0000 @@ -56,7 +56,7 @@ struct vbeinfoblock #define FAR2FLATPTR(p) ((p & 0xffff) + ((p >> 12) & 0xffff0)) -static int vesabios_match(struct device *, struct cfdata *, void *); +static int vesabios_match(struct device *, cfdata_t, void *); static void vesabios_attach(struct device *, struct device *, void *); static int vesabios_print(void *, const char *); @@ -70,7 +70,7 @@ CFATTACH_DECL(vesabios, sizeof(struct de vesabios_match, vesabios_attach, NULL, NULL); static int -vesabios_match( struct device *parent, struct cfdata *match, +vesabios_match( struct device *parent, cfdata_t match, void *aux) { Index: sys/arch/i386/bios/vesafb.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/bios/vesafb.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 vesafb.c --- sys/arch/i386/bios/vesafb.c 24 Mar 2007 00:23:05 -0000 1.22 +++ sys/arch/i386/bios/vesafb.c 9 Jul 2007 22:29:24 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: vesafb.c,v 1 MALLOC_DEFINE(M_VESAFB, "vesafb", "vesafb shadow framebuffer"); -static int vesafb_match(struct device *, struct cfdata *, void *); +static int vesafb_match(struct device *, cfdata_t, void *); static void vesafb_attach(struct device *, struct device *, void *); struct wsscreen_descr vesafb_stdscreen = { @@ -119,7 +119,7 @@ CFATTACH_DECL(vesafb, sizeof(struct vesa vesafb_match, vesafb_attach, NULL, NULL); static int -vesafb_match(struct device *parent, struct cfdata *match, +vesafb_match(struct device *parent, cfdata_t match, void *aux) { struct vesabiosdev_attach_args *vaa = aux; Index: sys/arch/i386/i386/apmbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/i386/apmbios.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 apmbios.c --- sys/arch/i386/i386/apmbios.c 10 Dec 2006 04:38:55 -0000 1.7 +++ sys/arch/i386/i386/apmbios.c 9 Jul 2007 22:29:30 -0000 @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: apmbios.c,v #endif static void apmbiosattach(struct device *, struct device *, void *); -static int apmbiosmatch(struct device *, struct cfdata *, void *); +static int apmbiosmatch(struct device *, cfdata_t, void *); #if 0 static void apm_devpowmgt_enable(int, u_int); @@ -435,7 +435,7 @@ apm_busprobe(void) } static int -apmbiosmatch(struct device *parent, struct cfdata *match, +apmbiosmatch(struct device *parent, cfdata_t match, void *aux) { /* There can be only one! */ Index: sys/arch/i386/i386/cpu.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/i386/cpu.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 cpu.c --- sys/arch/i386/i386/cpu.c 17 May 2007 14:51:20 -0000 1.36 +++ sys/arch/i386/i386/cpu.c 9 Jul 2007 22:29:30 -0000 @@ -118,7 +118,7 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.36 #include #include -int cpu_match(struct device *, struct cfdata *, void *); +int cpu_match(struct device *, cfdata_t, void *); void cpu_attach(struct device *, struct device *, void *); struct cpu_softc { @@ -198,8 +198,7 @@ cpu_init_first() #endif int -cpu_match(struct device *parent, struct cfdata *match, - void *aux) +cpu_match(struct device *parent, cfdata_t cfdata, void *aux) { return 1; Index: sys/arch/i386/i386/mainbus.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/i386/mainbus.c,v retrieving revision 1.71 diff -d -p -u -u -r1.71 mainbus.c --- sys/arch/i386/i386/mainbus.c 5 Mar 2007 16:51:02 -0000 1.71 +++ sys/arch/i386/i386/mainbus.c 9 Jul 2007 22:29:35 -0000 @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v #endif #endif -int mainbus_match(struct device *, struct cfdata *, void *); +int mainbus_match(struct device *, cfdata_t, void *); void mainbus_attach(struct device *, struct device *, void *); CFATTACH_DECL(mainbus, sizeof(struct device), @@ -169,7 +169,7 @@ int mp_verbose = 0; * Probe for the mainbus; always succeeds. */ int -mainbus_match(struct device *parent, struct cfdata *match, void *aux) +mainbus_match(struct device *parent, cfdata_t match, void *aux) { return 1; Index: sys/arch/i386/isa/ahc_isa.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/isa/ahc_isa.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 ahc_isa.c --- sys/arch/i386/isa/ahc_isa.c 7 Mar 2007 21:44:10 -0000 1.33 +++ sys/arch/i386/isa/ahc_isa.c 9 Jul 2007 22:29:41 -0000 @@ -169,7 +169,7 @@ __KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v int ahc_isa_idstring(bus_space_tag_t, bus_space_handle_t, char *); int ahc_isa_match(struct isa_attach_args *, bus_addr_t); -int ahc_isa_probe(struct device *, struct cfdata *, void *); +int ahc_isa_probe(struct device *, cfdata_t, void *); void ahc_isa_attach(struct device *, struct device *, void *); void aha2840_load_seeprom(struct ahc_softc *ahc); static int verify_seeprom_cksum(struct seeprom_config *sc); @@ -310,7 +310,7 @@ ahc_isa_match(struct isa_attach_args *ia * the actual probe routine to check it out. */ int -ahc_isa_probe(struct device *parent, struct cfdata *match, void *aux) +ahc_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; struct ahc_isa_slot *as; Index: sys/arch/i386/isa/lms.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/isa/lms.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 lms.c --- sys/arch/i386/isa/lms.c 4 Mar 2007 05:59:58 -0000 1.52 +++ sys/arch/i386/isa/lms.c 9 Jul 2007 22:29:41 -0000 @@ -59,7 +59,7 @@ struct lms_softc { /* driver status inf struct device *sc_wsmousedev; }; -int lmsprobe(struct device *, struct cfdata *, void *); +int lmsprobe(struct device *, cfdata_t, void *); void lmsattach(struct device *, struct device *, void *); int lmsintr(void *); @@ -77,7 +77,7 @@ const struct wsmouse_accessops lms_acces }; int -lmsprobe(struct device *parent, struct cfdata *match, +lmsprobe(struct device *parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; Index: sys/arch/i386/isa/mms.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/isa/mms.c,v retrieving revision 1.49 diff -d -p -u -u -r1.49 mms.c --- sys/arch/i386/isa/mms.c 4 Mar 2007 05:59:58 -0000 1.49 +++ sys/arch/i386/isa/mms.c 9 Jul 2007 22:29:41 -0000 @@ -56,7 +56,7 @@ struct mms_softc { /* driver status inf struct device *sc_wsmousedev; }; -int mmsprobe(struct device *, struct cfdata *, void *); +int mmsprobe(struct device *, cfdata_t, void *); void mmsattach(struct device *, struct device *, void *); int mmsintr(void *); @@ -74,7 +74,7 @@ const struct wsmouse_accessops mms_acces }; int -mmsprobe(struct device *parent, struct cfdata *match, +mmsprobe(struct device *parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; Index: sys/arch/i386/isa/npx_isa.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/isa/npx_isa.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 npx_isa.c --- sys/arch/i386/isa/npx_isa.c 16 Nov 2006 01:32:38 -0000 1.15 +++ sys/arch/i386/isa/npx_isa.c 9 Jul 2007 22:29:41 -0000 @@ -83,14 +83,14 @@ __KERNEL_RCSID(0, "$NetBSD: npx_isa.c,v #include -int npx_isa_probe(struct device *, struct cfdata *, void *); +int npx_isa_probe(struct device *, cfdata_t, void *); void npx_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(npx_isa, sizeof(struct npx_softc), npx_isa_probe, npx_isa_attach, NULL, NULL); int -npx_isa_probe(struct device *parent, struct cfdata *match, +npx_isa_probe(struct device *parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; Index: sys/arch/i386/isa/pccons.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/isa/pccons.c,v retrieving revision 1.183 diff -d -p -u -u -r1.183 pccons.c --- sys/arch/i386/isa/pccons.c 4 Mar 2007 05:59:58 -0000 1.183 +++ sys/arch/i386/isa/pccons.c 9 Jul 2007 22:29:42 -0000 @@ -203,7 +203,7 @@ struct pc_softc { static struct callout async_update_ch = CALLOUT_INITIALIZER; -int pcprobe(struct device *, struct cfdata *, void *); +int pcprobe(struct device *, cfdata_t, void *); void pcattach(struct device *, struct device *, void *); int pcintr(void *); void pcinit(void); @@ -218,7 +218,7 @@ struct pcconskbd_softc { struct device sc_dev; }; -int pcconskbdprobe(struct device *, struct cfdata *, void *); +int pcconskbdprobe(struct device *, cfdata_t, void *); void pcconskbdattach(struct device *, struct device *, void *); void pcinput(void *, int); @@ -568,7 +568,7 @@ void update_leds() * these are both bad jokes */ int -pcprobe(struct device *parent, struct cfdata *match, +pcprobe(struct device *parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; @@ -786,7 +786,7 @@ pcattach(struct device *parent, struct d #if (NPCCONSKBD > 0) int -pcconskbdprobe(struct device *parent, struct cfdata *match, void *aux) +pcconskbdprobe(struct device *parent, cfdata_t match, void *aux) { struct pckbport_attach_args *pka = aux; Index: sys/arch/i386/pci/elan520.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/elan520.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 elan520.c --- sys/arch/i386/pci/elan520.c 16 Nov 2006 01:32:38 -0000 1.16 +++ sys/arch/i386/pci/elan520.c 9 Jul 2007 22:29:42 -0000 @@ -210,8 +210,7 @@ elansc_wdog_tickle(struct sysmon_wdog *s } static int -elansc_match(struct device *parent, struct cfdata *match, - void *aux) +elansc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/geode.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/geode.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 geode.c --- sys/arch/i386/pci/geode.c 16 Nov 2006 01:32:38 -0000 1.8 +++ sys/arch/i386/pci/geode.c 9 Jul 2007 22:29:42 -0000 @@ -98,8 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: geode.c,v 1. #endif static int -geode_gcb_match(struct device *parent, struct cfdata *match, - void *aux) +geode_gcb_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/geodecntr.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/geodecntr.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 geodecntr.c --- sys/arch/i386/pci/geodecntr.c 16 Nov 2006 01:32:39 -0000 1.4 +++ sys/arch/i386/pci/geodecntr.c 9 Jul 2007 22:29:42 -0000 @@ -60,7 +60,7 @@ static unsigned geode_get_timecount(stru static int attached = 0; static int -geodecntr_match(struct device *parent, struct cfdata *match, +geodecntr_match(struct device *parent, cfdata_t cfdata, void *aux) { return !attached; Index: sys/arch/i386/pci/geodewdg.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/geodewdg.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 geodewdg.c --- sys/arch/i386/pci/geodewdg.c 16 Nov 2006 01:32:39 -0000 1.5 +++ sys/arch/i386/pci/geodewdg.c 9 Jul 2007 22:29:42 -0000 @@ -218,8 +218,7 @@ geode_wdog_setmode(struct sysmon_wdog *s } static int -geode_wdog_match(struct device *parent, struct cfdata *match, - void *aux) +geode_wdog_match(struct device *parent, cfdata_t cfdata, void *aux) { return !attached; } Index: sys/arch/i386/pci/gscpcib.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/gscpcib.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 gscpcib.c --- sys/arch/i386/pci/gscpcib.c 16 Nov 2006 01:32:39 -0000 1.8 +++ sys/arch/i386/pci/gscpcib.c 9 Jul 2007 22:29:42 -0000 @@ -48,7 +48,7 @@ struct gscpcib_softc { gpio_pin_t sc_gpio_pins[GSCGPIO_NPINS]; }; -int gscpcib_match(struct device *, struct cfdata *, void *); +int gscpcib_match(struct device *, cfdata_t, void *); void gscpcib_attach(struct device *, struct device *, void *); int gscpcib_gpio_pin_read(void *, int); @@ -64,7 +64,7 @@ CFATTACH_DECL(gscpcib, sizeof(struct gsc extern struct cfdriver gscpcib_cd; int -gscpcib_match(struct device *parent, struct cfdata *match, +gscpcib_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/ichlpcib.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/ichlpcib.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 ichlpcib.c --- sys/arch/i386/pci/ichlpcib.c 27 Nov 2006 19:58:20 -0000 1.19 +++ sys/arch/i386/pci/ichlpcib.c 9 Jul 2007 22:29:42 -0000 @@ -81,7 +81,7 @@ struct lpcib_softc { pcireg_t sc_pirq[8]; }; -static int lpcibmatch(struct device *, struct cfdata *, void *); +static int lpcibmatch(struct device *, cfdata_t, void *); static void lpcibattach(struct device *, struct device *, void *); static void lpcib_powerhook(int, void *); @@ -106,7 +106,7 @@ CFATTACH_DECL(ichlpcib, sizeof(struct lp * Autoconf callbacks. */ static int -lpcibmatch(struct device *parent, struct cfdata *match, +lpcibmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/p64h2apic.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/p64h2apic.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 p64h2apic.c --- sys/arch/i386/pci/p64h2apic.c 16 Nov 2006 01:32:39 -0000 1.11 +++ sys/arch/i386/pci/p64h2apic.c 9 Jul 2007 22:29:42 -0000 @@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: p64h2apic.c, #include #include -static int p64h2match(struct device *, struct cfdata *, void *); +static int p64h2match(struct device *, cfdata_t, void *); static void p64h2attach(struct device *, struct device *, void *); struct p64h2apic_softc { @@ -71,7 +71,7 @@ int p64h2print(void *, const char *pnp); static int -p64h2match(struct device *parent, struct cfdata *match, +p64h2match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/pceb.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/pceb.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 pceb.c --- sys/arch/i386/pci/pceb.c 16 Nov 2006 01:32:39 -0000 1.19 +++ sys/arch/i386/pci/pceb.c 9 Jul 2007 22:29:42 -0000 @@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.1 #include "eisa.h" #include "isa.h" -int pcebmatch(struct device *, struct cfdata *, void *); +int pcebmatch(struct device *, cfdata_t, void *); void pcebattach(struct device *, struct device *, void *); CFATTACH_DECL(pceb, sizeof(struct device), @@ -72,7 +72,7 @@ union pceb_attach_args { }; int -pcebmatch(struct device *parent, struct cfdata *match, +pcebmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/pchb.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/pchb.c,v retrieving revision 1.64 diff -d -p -u -u -r1.64 pchb.c --- sys/arch/i386/pci/pchb.c 27 Jan 2007 23:10:21 -0000 1.64 +++ sys/arch/i386/pci/pchb.c 9 Jul 2007 22:29:43 -0000 @@ -78,14 +78,14 @@ __KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.6 #define I82424_BCTL_PCIMEM_BURSTEN 0x01 #define I82424_BCTL_PCI_BURSTEN 0x02 -int pchbmatch(struct device *, struct cfdata *, void *); +int pchbmatch(struct device *, cfdata_t, void *); void pchbattach(struct device *, struct device *, void *); CFATTACH_DECL(pchb, sizeof(struct pchb_softc), pchbmatch, pchbattach, NULL, NULL); int -pchbmatch(struct device *parent, struct cfdata *match, +pchbmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/pcib.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/pcib.c,v retrieving revision 1.42 diff -d -p -u -u -r1.42 pcib.c --- sys/arch/i386/pci/pcib.c 16 Nov 2006 01:32:39 -0000 1.42 +++ sys/arch/i386/pci/pcib.c 9 Jul 2007 22:29:43 -0000 @@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.4 #include "isa.h" -int pcibmatch(struct device *, struct cfdata *, void *); +int pcibmatch(struct device *, cfdata_t, void *); void pcibattach(struct device *, struct device *, void *); CFATTACH_DECL(pcib, sizeof(struct device), @@ -64,7 +64,7 @@ CFATTACH_DECL(pcib, sizeof(struct device void pcib_callback(struct device *); int -pcibmatch(struct device *parent, struct cfdata *match, +pcibmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/pcmb.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/pcmb.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 pcmb.c --- sys/arch/i386/pci/pcmb.c 16 Nov 2006 01:32:39 -0000 1.15 +++ sys/arch/i386/pci/pcmb.c 9 Jul 2007 22:29:44 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.1 #include "mca.h" -int pcmbmatch(struct device *, struct cfdata *, void *); +int pcmbmatch(struct device *, cfdata_t, void *); void pcmbattach(struct device *, struct device *, void *); CFATTACH_DECL(pcmb, sizeof(struct device), @@ -68,7 +68,7 @@ CFATTACH_DECL(pcmb, sizeof(struct device void pcmb_callback(struct device *); int -pcmbmatch(struct device *parent, struct cfdata *match, +pcmbmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/arch/i386/pci/piixpcib.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/piixpcib.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 piixpcib.c --- sys/arch/i386/pci/piixpcib.c 16 Nov 2006 01:32:39 -0000 1.10 +++ sys/arch/i386/pci/piixpcib.c 9 Jul 2007 22:29:44 -0000 @@ -84,7 +84,7 @@ struct piixpcib_softc { uint8_t sc_elcr[2]; }; -static int piixpcibmatch(struct device *, struct cfdata *, void *); +static int piixpcibmatch(struct device *, cfdata_t, void *); static void piixpcibattach(struct device *, struct device *, void *); static void piixpcib_powerhook(int, void *); @@ -105,7 +105,7 @@ CFATTACH_DECL(piixpcib, sizeof(struct pi * Autoconf callbacks. */ static int -piixpcibmatch(struct device *parent, struct cfdata *match, +piixpcibmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa; Index: sys/arch/i386/pci/viapcib.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pci/viapcib.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 viapcib.c --- sys/arch/i386/pci/viapcib.c 16 Nov 2006 01:32:39 -0000 1.6 +++ sys/arch/i386/pci/viapcib.c 9 Jul 2007 22:29:45 -0000 @@ -92,7 +92,7 @@ struct viapcib_softc { struct simplelock sc_lock; }; -static int viapcib_match(struct device *, struct cfdata *, void *); +static int viapcib_match(struct device *, cfdata_t, void *); static void viapcib_attach(struct device *, struct device *, void *); static int viapcib_clear(struct viapcib_softc *); @@ -138,7 +138,7 @@ CFATTACH_DECL(viapcib, sizeof(struct via viapcib_attach, NULL, NULL); static int -viapcib_match(struct device *parent, struct cfdata *match, +viapcib_match(struct device *parent, cfdata_t match, void *opaque) { struct pci_attach_args *pa; Index: sys/arch/i386/pnpbios/atppc_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/atppc_pnpbios.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 atppc_pnpbios.c --- sys/arch/i386/pnpbios/atppc_pnpbios.c 4 Mar 2007 05:59:59 -0000 1.4 +++ sys/arch/i386/pnpbios/atppc_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: atppc_pnpbio #include #include -static int atppc_pnpbios_match(struct device *, struct cfdata *, void *); +static int atppc_pnpbios_match(struct device *, cfdata_t, void *); static void atppc_pnpbios_attach(struct device *, struct device *, void *); struct atppc_pnpbios_softc { @@ -86,7 +86,7 @@ static void atppc_pnpbios_dma_free(struc * atppc_pnpbios_match: autoconf(9) match routine */ static int -atppc_pnpbios_match(struct device *parent, struct cfdata *match, void *aux) +atppc_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/com_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/com_pnpbios.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 com_pnpbios.c --- sys/arch/i386/pnpbios/com_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.13 +++ sys/arch/i386/pnpbios/com_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -51,14 +51,14 @@ struct com_pnpbios_softc { void *sc_ih; }; -int com_pnpbios_match(struct device *, struct cfdata *, void *); +int com_pnpbios_match(struct device *, cfdata_t, void *); void com_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_pnpbios, sizeof(struct com_pnpbios_softc), com_pnpbios_match, com_pnpbios_attach, NULL, NULL); int -com_pnpbios_match(struct device *parent, struct cfdata *match, +com_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/ess_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/ess_pnpbios.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 ess_pnpbios.c --- sys/arch/i386/pnpbios/ess_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.15 +++ sys/arch/i386/pnpbios/ess_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -62,14 +62,14 @@ __KERNEL_RCSID(0, "$NetBSD: ess_pnpbios. #include #include -int ess_pnpbios_match(struct device *, struct cfdata *, void *); +int ess_pnpbios_match(struct device *, cfdata_t, void *); void ess_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(ess_pnpbios, sizeof(struct ess_softc), ess_pnpbios_match, ess_pnpbios_attach, NULL, NULL); int -ess_pnpbios_match(struct device *parent, struct cfdata *match, +ess_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/fdc_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/fdc_pnpbios.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 fdc_pnpbios.c --- sys/arch/i386/pnpbios/fdc_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.11 +++ sys/arch/i386/pnpbios/fdc_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdc_pnpbios. #include -int fdc_pnpbios_match(struct device *, struct cfdata *, void *); +int fdc_pnpbios_match(struct device *, cfdata_t, void *); void fdc_pnpbios_attach(struct device *, struct device *, void *); struct fdc_pnpbios_softc { @@ -80,7 +80,7 @@ CFATTACH_DECL(fdc_pnpbios, sizeof(struct int fdc_pnpbios_match(struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/joy_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/joy_pnpbios.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 joy_pnpbios.c --- sys/arch/i386/pnpbios/joy_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.10 +++ sys/arch/i386/pnpbios/joy_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -53,14 +53,14 @@ __KERNEL_RCSID(0, "$NetBSD: joy_pnpbios. #include -int joy_pnpbios_match(struct device *, struct cfdata *, void *); +int joy_pnpbios_match(struct device *, cfdata_t, void *); void joy_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(joy_pnpbios, sizeof(struct joy_softc), joy_pnpbios_match, joy_pnpbios_attach, NULL, NULL); int -joy_pnpbios_match(struct device *parent, struct cfdata *match, +joy_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/lm_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/lm_pnpbios.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 lm_pnpbios.c --- sys/arch/i386/pnpbios/lm_pnpbios.c 24 Nov 2006 22:04:23 -0000 1.12 +++ sys/arch/i386/pnpbios/lm_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: lm_pnpbios.c #include -int lm_pnpbios_match(struct device *, struct cfdata *, void *); +int lm_pnpbios_match(struct device *, cfdata_t, void *); void lm_pnpbios_attach(struct device *, struct device *, void *); int lm_pnpbios_hints_index(const char *); uint8_t lm_pnpbios_readreg(struct lm_softc *, int); Index: sys/arch/i386/pnpbios/lpt_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/lpt_pnpbios.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 lpt_pnpbios.c --- sys/arch/i386/pnpbios/lpt_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.10 +++ sys/arch/i386/pnpbios/lpt_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -50,14 +50,14 @@ struct lpt_pnpbios_softc { struct lpt_softc sc_lpt; }; -int lpt_pnpbios_match(struct device *, struct cfdata *, void *); +int lpt_pnpbios_match(struct device *, cfdata_t, void *); void lpt_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(lpt_pnpbios, sizeof(struct lpt_pnpbios_softc), lpt_pnpbios_match, lpt_pnpbios_attach, NULL, NULL); int -lpt_pnpbios_match(struct device *parent, struct cfdata *match, +lpt_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/npx_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/npx_pnpbios.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 npx_pnpbios.c --- sys/arch/i386/pnpbios/npx_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.10 +++ sys/arch/i386/pnpbios/npx_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -55,14 +55,14 @@ __KERNEL_RCSID(0, "$NetBSD: npx_pnpbios. #include -int npx_pnpbios_match(struct device *, struct cfdata *, void *); +int npx_pnpbios_match(struct device *, cfdata_t, void *); void npx_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(npx_pnpbios, sizeof(struct npx_softc), npx_pnpbios_match, npx_pnpbios_attach, NULL, NULL); int -npx_pnpbios_match(struct device *parent, struct cfdata *match, +npx_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/pciide_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/pciide_pnpbios.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 pciide_pnpbios.c --- sys/arch/i386/pnpbios/pciide_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.24 +++ sys/arch/i386/pnpbios/pciide_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: pciide_pnpbi #include #include -static int pciide_pnpbios_match(struct device *, struct cfdata *, void *); +static int pciide_pnpbios_match(struct device *, cfdata_t, void *); static void pciide_pnpbios_attach(struct device *, struct device *, void *); extern void pciide_channel_dma_setup(struct pciide_channel *); @@ -66,7 +66,7 @@ CFATTACH_DECL(pciide_pnpbios, sizeof(str int pciide_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/pckbc_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/pckbc_pnpbios.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 pckbc_pnpbios.c --- sys/arch/i386/pnpbios/pckbc_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.10 +++ sys/arch/i386/pnpbios/pckbc_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_pnpbio #include -int pckbc_pnpbios_match(struct device *, struct cfdata *, void *); +int pckbc_pnpbios_match(struct device *, cfdata_t, void *); void pckbc_pnpbios_attach(struct device *, struct device *, void *); struct pckbc_pnpbios_softc { @@ -95,7 +95,7 @@ void pckbc_pnpbios_intr_establish(struct int pckbc_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/pnpbios.c,v retrieving revision 1.58 diff -d -p -u -u -r1.58 pnpbios.c --- sys/arch/i386/pnpbios/pnpbios.c 4 Mar 2007 05:59:59 -0000 1.58 +++ sys/arch/i386/pnpbios/pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -128,7 +128,7 @@ static int pnpbios_sendmessage(int); static void * pnpbios_mapit(u_long, u_long, int); static void * pnpbios_find(void); static int pnpbios_match(struct device *, - struct cfdata *, void *); + cfdata_t, void *); static void pnpbios_attach(struct device *, struct device *, void *); static void pnpbios_printres(struct pnpresources *); @@ -245,7 +245,7 @@ pnpbios_probe(void) } static int -pnpbios_match(struct device *parent, struct cfdata *match, +pnpbios_match(struct device *parent, cfdata_t match, void *aux) { Index: sys/arch/i386/pnpbios/sb_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/sb_pnpbios.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 sb_pnpbios.c --- sys/arch/i386/pnpbios/sb_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.12 +++ sys/arch/i386/pnpbios/sb_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -53,14 +53,14 @@ __KERNEL_RCSID(0, "$NetBSD: sb_pnpbios.c #include -int sb_pnpbios_match(struct device *, struct cfdata *, void *); +int sb_pnpbios_match(struct device *, cfdata_t, void *); void sb_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(sb_pnpbios, sizeof(struct sbdsp_softc), sb_pnpbios_match, sb_pnpbios_attach, NULL, NULL); int -sb_pnpbios_match(struct device *parent, struct cfdata *match, +sb_pnpbios_match(struct device *parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/wss_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/wss_pnpbios.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 wss_pnpbios.c --- sys/arch/i386/pnpbios/wss_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.15 +++ sys/arch/i386/pnpbios/wss_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: wss_pnpbios. #include #include -int wss_pnpbios_match(struct device *, struct cfdata *, void *); +int wss_pnpbios_match(struct device *, cfdata_t, void *); void wss_pnpbios_attach(struct device *, struct device *, void *); int wss_pnpbios_hints_index(const char *); @@ -90,7 +90,7 @@ wss_pnpbios_hints_index(idstr) int wss_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/pnpbios/ym_pnpbios.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/pnpbios/ym_pnpbios.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 ym_pnpbios.c --- sys/arch/i386/pnpbios/ym_pnpbios.c 16 Nov 2006 01:32:39 -0000 1.13 +++ sys/arch/i386/pnpbios/ym_pnpbios.c 9 Jul 2007 22:29:45 -0000 @@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c #include #include -int ym_pnpbios_match(struct device *, struct cfdata *, void *); +int ym_pnpbios_match(struct device *, cfdata_t, void *); void ym_pnpbios_attach(struct device *, struct device *, void *); CFATTACH_DECL(ym_pnpbios, sizeof(struct ym_softc), @@ -69,7 +69,7 @@ CFATTACH_DECL(ym_pnpbios, sizeof(struct int ym_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; Index: sys/arch/i386/xbox/xboxfb.c =================================================================== RCS file: /cvsroot/src/sys/arch/i386/xbox/xboxfb.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 xboxfb.c --- sys/arch/i386/xbox/xboxfb.c 4 Mar 2007 06:00:02 -0000 1.10 +++ sys/arch/i386/xbox/xboxfb.c 9 Jul 2007 22:29:58 -0000 @@ -116,7 +116,7 @@ static uint8_t *xboxfb_console_bits; static int xboxfb_console_width; static int xboxfb_console_height; -static int xboxfb_match(struct device *, struct cfdata *, void *); +static int xboxfb_match(struct device *, cfdata_t, void *); static void xboxfb_attach(struct device *, struct device *, void *); static uint8_t xboxfb_get_avpack(void); @@ -169,7 +169,7 @@ struct wsdisplay_accessops xboxfb_access }; static int -xboxfb_match(struct device *parent, struct cfdata *match, void *aux) +xboxfb_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/arch/x86/isa/clock.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/isa/clock.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 clock.c --- sys/arch/x86/isa/clock.c 8 Dec 2006 15:05:18 -0000 1.8 +++ sys/arch/x86/isa/clock.c 9 Jul 2007 22:34:57 -0000 @@ -163,7 +163,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1. #if (NPCPPI > 0) #include -int sysbeepmatch(struct device *, struct cfdata *, void *); +int sysbeepmatch(struct device *, cfdata_t, void *); void sysbeepattach(struct device *, struct device *, void *); CFATTACH_DECL(sysbeep, sizeof(struct device), @@ -564,8 +564,7 @@ i8254_delay(int n) #if (NPCPPI > 0) int -sysbeepmatch(struct device *parent, struct cfdata *match, - void *aux) +sysbeepmatch(struct device *parent, cfdata_t cfdata, void *aux) { return (!ppi_attached); } Index: sys/arch/x86/pci/aapic.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/pci/aapic.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 aapic.c --- sys/arch/x86/pci/aapic.c 11 Dec 2005 12:19:47 -0000 1.4 +++ sys/arch/x86/pci/aapic.c 9 Jul 2007 22:34:57 -0000 @@ -20,7 +20,7 @@ __KERNEL_RCSID(0, "$NetBSD: aapic.c,v 1. extern int nioapics; #endif -static int aapic_match __P((struct device *, struct cfdata *, void *)); +static int aapic_match __P((struct device *, cfdata_t, void *)); static void aapic_attach __P((struct device *, struct device *, void *)); struct aapic_softc { Index: sys/arch/x86/x86/ioapic.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/x86/ioapic.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 ioapic.c --- sys/arch/x86/x86/ioapic.c 17 May 2007 14:51:35 -0000 1.19 +++ sys/arch/x86/x86/ioapic.c 9 Jul 2007 22:34:58 -0000 @@ -107,7 +107,7 @@ __KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1 * XXX locking */ -int ioapic_match(struct device *, struct cfdata *, void *); +int ioapic_match(struct device *, cfdata_t, void *); void ioapic_attach(struct device *, struct device *, void *); extern int x86_mem_add_mapping(bus_addr_t, bus_size_t, @@ -258,7 +258,7 @@ CFATTACH_DECL(ioapic, sizeof(struct ioap ioapic_match, ioapic_attach, NULL, NULL); int -ioapic_match(struct device *parent, struct cfdata *match, void *aux) +ioapic_match(struct device *parent, cfdata_t match, void *aux) { return 1; Index: sys/arch/x86/x86/ipmi.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/x86/ipmi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 ipmi.c --- sys/arch/x86/x86/ipmi.c 15 Feb 2007 15:40:50 -0000 1.5 +++ sys/arch/x86/x86/ipmi.c 9 Jul 2007 22:34:59 -0000 @@ -189,7 +189,7 @@ int ipmi_watchdog_setmode(struct sysmon_ int ipmi_watchdog_tickle(struct sysmon_wdog *); int ipmi_intr(void *); -int ipmi_match(struct device *, struct cfdata *, void *); +int ipmi_match(struct device *, cfdata_t, void *); void ipmi_attach(struct device *, struct device *, void *); long ipow(long, int); @@ -1688,7 +1688,7 @@ ipmi_probe(struct ipmi_attach_args *ia) } int -ipmi_match(struct device *parent, struct cfdata *cf, +ipmi_match(struct device *parent, cfdata_t cf, void *aux) { struct ipmi_softc sc; Index: sys/arch/x86/x86/mpacpi.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/x86/mpacpi.c,v retrieving revision 1.48 diff -d -p -u -u -r1.48 mpacpi.c --- sys/arch/x86/x86/mpacpi.c 10 Apr 2007 12:15:27 -0000 1.48 +++ sys/arch/x86/x86/mpacpi.c 9 Jul 2007 22:35:00 -0000 @@ -78,8 +78,6 @@ __KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1 #include "ioapic.h" #include "lapic.h" -#include "locators.h" - #define ACPI_STA_OK (ACPI_STA_DEV_PRESENT|ACPI_STA_DEV_ENABLED|ACPI_STA_DEV_OK) /* XXX room for PCI-to-PCI bus */ @@ -324,11 +322,17 @@ mpacpi_count(APIC_HEADER *hdrp, void *au static ACPI_STATUS mpacpi_config_cpu(APIC_HEADER *hdrp, void *aux) { + prop_dictionary_t locs; struct device *parent = aux; MADT_PROCESSOR_APIC *p; struct cpu_attach_args caa; int cpunum = 0; - int locs[CPUBUSCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("mpacpi_config_cpu: could not create locators\n"); + return (AE_NO_MEMORY); + } #if defined(MULTIPROCESSOR) || defined(IOAPIC) if (mpacpi_ncpu > 1) @@ -342,23 +346,41 @@ mpacpi_config_cpu(APIC_HEADER *hdrp, voi caa.cpu_role = CPU_ROLE_AP; else caa.cpu_role = CPU_ROLE_BP; + caa.cpu_number = p->LocalApicId; caa.cpu_func = &mp_cpu_funcs; - locs[CPUBUSCF_APID] = caa.cpu_number; + + if (! prop_dictionary_set_uint32(locs, "apid", + caa.cpu_number)) { + aprint_error("mpacpi_config_cpu: could not " + "set locator\n"); + prop_object_release(locs); + return (AE_NO_MEMORY); + } + config_found_sm_loc(parent, "cpubus", locs, &caa, mpacpi_cpuprint, config_stdsubmatch); } } + + prop_object_release(locs); return AE_OK; } static ACPI_STATUS mpacpi_config_ioapic(APIC_HEADER *hdrp, void *aux) { + prop_dictionary_t locs; struct device *parent = aux; struct apic_attach_args aaa; MADT_IO_APIC *p; - int locs[IOAPICBUSCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("mpacpi_config_ioapic: could not create " + "locators\n"); + return (AE_NO_MEMORY); + } if (hdrp->Type == APIC_IO) { p = (MADT_IO_APIC *)hdrp; @@ -367,10 +389,19 @@ mpacpi_config_ioapic(APIC_HEADER *hdrp, aaa.apic_version = -1; aaa.flags = IOAPIC_VWIRE; aaa.apic_vecbase = p->Interrupt; - locs[IOAPICBUSCF_APID] = aaa.apic_id; + + if (! prop_dictionary_set_uint32(locs, "apid", aaa.apic_id)) { + aprint_error("mpacpi_config_ioapic: could not set " + "locator\n"); + prop_object_release(locs); + return (AE_NO_MEMORY); + } + config_found_sm_loc(parent, "ioapicbus", locs, &aaa, mpacpi_ioapicprint, config_stdsubmatch); } + + prop_object_release(locs); return AE_OK; } Index: sys/arch/x86/x86/x86_autoconf.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 x86_autoconf.c --- sys/arch/x86/x86/x86_autoconf.c 4 Mar 2007 06:01:09 -0000 1.25 +++ sys/arch/x86/x86/x86_autoconf.c 9 Jul 2007 22:35:01 -0000 @@ -442,17 +442,17 @@ findroot(void) if ((biv = lookup_bootinfo(BTINFO_ROOTDEVICE)) != NULL) { for (dv = TAILQ_FIRST(&alldevs); dv != NULL; dv = TAILQ_NEXT(dv, dv_list)) { - struct cfdata *cd; + cfdata_t cf; size_t len; if (device_class(dv) != DV_DISK) continue; - cd = device_cfdata(dv); - len = strlen(cd->cf_name); + cf = device_cfdata(dv); + len = strlen(cfdata_driver(cf)); - if (strncmp(cd->cf_name, biv->devname, len) == 0 && - biv->devname[len] - '0' == cd->cf_unit) { + if (!strncmp(cfdata_driver(cf), biv->devname, len) && + biv->devname[len] - '0' == device_unit(dv)) { handle_wedges(dv, biv->devname[len + 1] - 'a'); return; } Index: sys/conf/files =================================================================== RCS file: /cvsroot/src/sys/conf/files,v retrieving revision 1.847 diff -d -p -u -u -r1.847 files --- sys/conf/files 29 May 2007 21:32:29 -0000 1.847 +++ sys/conf/files 9 Jul 2007 22:36:16 -0000 @@ -1360,6 +1360,7 @@ file kern/subr_blist.c vmswap file kern/subr_bufq.c file kern/subr_callback.c file kern/subr_debug.c debug +file kern/subr_device.c file kern/subr_devsw.c file kern/subr_disk.c file kern/subr_iostat.c Index: sys/dev/audio.c =================================================================== RCS file: /cvsroot/src/sys/dev/audio.c,v retrieving revision 1.221 diff -d -p -u -u -r1.221 audio.c --- sys/dev/audio.c 9 Mar 2007 13:20:12 -0000 1.221 +++ sys/dev/audio.c 9 Jul 2007 22:38:31 -0000 @@ -167,7 +167,7 @@ static void stream_filter_list_set const audio_params_t *); int audio_set_defaults(struct audio_softc *, u_int); -int audioprobe(struct device *, struct cfdata *, void *); +int audioprobe(struct device *, cfdata_t, void *); void audioattach(struct device *, struct device *, void *); int audiodetach(struct device *, int); int audioactivate(struct device *, enum devact); @@ -250,8 +250,7 @@ CFATTACH_DECL(audio, sizeof(struct audio extern struct cfdriver audio_cd; int -audioprobe(struct device *parent, struct cfdata *match, - void *aux) +audioprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *sa; Index: sys/dev/midi.c =================================================================== RCS file: /cvsroot/src/sys/dev/midi.c,v retrieving revision 1.53 diff -d -p -u -u -r1.53 midi.c --- sys/dev/midi.c 4 Mar 2007 06:01:42 -0000 1.53 +++ sys/dev/midi.c 9 Jul 2007 22:38:34 -0000 @@ -105,7 +105,7 @@ void midi_rcv_asense(void *); void midi_softintr_rd(void *); void midi_softintr_wr(void *); -int midiprobe(struct device *, struct cfdata *, void *); +int midiprobe(struct device *, cfdata_t, void *); void midiattach(struct device *, struct device *, void *); int mididetach(struct device *, int); int midiactivate(struct device *, enum devact); @@ -132,7 +132,7 @@ CFATTACH_DECL(midi, sizeof(struct midi_s extern struct cfdriver midi_cd; int -midiprobe(struct device *parent, struct cfdata *match, +midiprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *sa = aux; Index: sys/dev/radio.c =================================================================== RCS file: /cvsroot/src/sys/dev/radio.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 radio.c --- sys/dev/radio.c 4 Mar 2007 06:01:43 -0000 1.20 +++ sys/dev/radio.c 9 Jul 2007 22:38:36 -0000 @@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: radio.c,v 1. #include #include -int radioprobe(struct device *, struct cfdata *, void *); +int radioprobe(struct device *, cfdata_t, void *); void radioattach(struct device *, struct device *, void *); int radioprint(void *, const char *); int radiodetach(struct device *, int); @@ -66,7 +66,7 @@ const struct cdevsw radio_cdevsw = { extern struct cfdriver radio_cd; int -radioprobe(struct device *parent, struct cfdata *match, +radioprobe(struct device *parent, cfdata_t cfdata, void *aux) { return (1); Index: sys/dev/vnd.c =================================================================== RCS file: /cvsroot/src/sys/dev/vnd.c,v retrieving revision 1.167 diff -d -p -u -u -r1.167 vnd.c --- sys/dev/vnd.c 7 Apr 2007 15:07:26 -0000 1.167 +++ sys/dev/vnd.c 9 Jul 2007 22:38:37 -0000 @@ -246,7 +246,7 @@ const struct cdevsw vnd_cdevsw = { nostop, notty, nopoll, nommap, nokqfilter, D_DISK }; -static int vnd_match(struct device *, struct cfdata *, void *); +static int vnd_match(struct device *, cfdata_t, void *); static void vnd_attach(struct device *, struct device *, void *); static int vnd_detach(struct device *, int); @@ -269,7 +269,7 @@ vndattach(int num) } static int -vnd_match(struct device *self, struct cfdata *cfdata, +vnd_match(struct device *self, cfdata_t cfdata, void *aux) { return 1; @@ -303,29 +303,16 @@ vnd_detach(struct device *self, int flag static struct vnd_softc * vnd_spawn(int unit) { - struct cfdata *cf; - - cf = malloc(sizeof(*cf), M_DEVBUF, M_WAITOK); - cf->cf_name = vnd_cd.cd_name; - cf->cf_atname = vnd_cd.cd_name; - cf->cf_unit = unit; - cf->cf_fstate = FSTATE_STAR; + KASSERT(unit > 0); - return (struct vnd_softc *)config_attach_pseudo(cf); + return (struct vnd_softc *)config_attach_pseudo(vnd_cd.cd_name, + vnd_cd.cd_name, unit); } int vnd_destroy(struct device *dev) { - int error; - struct cfdata *cf; - - cf = device_cfdata(dev); - error = config_detach(dev, DETACH_QUIET); - if (error) - return error; - free(cf, M_DEVBUF); - return 0; + return (config_detach(dev, DETACH_QUIET)); } static int Index: sys/dev/acpi/acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi.c,v retrieving revision 1.101 diff -d -p -u -u -r1.101 acpi.c --- sys/dev/acpi/acpi.c 19 Feb 2007 22:31:05 -0000 1.101 +++ sys/dev/acpi/acpi.c 9 Jul 2007 22:38:38 -0000 @@ -122,7 +122,7 @@ MALLOC_DECLARE(M_ACPI); static int acpi_dbgr = 0x00; #endif -static int acpi_match(struct device *, struct cfdata *, void *); +static int acpi_match(struct device *, cfdata_t, void *); static void acpi_attach(struct device *, struct device *, void *); static int acpi_print(void *aux, const char *); @@ -243,11 +243,12 @@ acpi_probe(void) } static int -acpi_submatch(device_t parent, cfdata_t cf, const int *locs, void *aux) +acpi_submatch(device_t parent, cfdata_t cfdata, prop_dictionary_t locs, + void *aux) { struct cfattach *ca; - ca = config_cfattach_lookup(cf->cf_name, cf->cf_atname); + ca = config_cfattach_lookup(cfdata); return (ca == &acpi_ca); } @@ -286,8 +287,7 @@ acpi_OsGetRootPointer(UINT32 Flags, ACPI * Autoconfiguration `match' routine. */ static int -acpi_match(struct device *parent, struct cfdata *match, - void *aux) +acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { /* * XXX Check other locators? Hard to know -- machine Index: sys/dev/acpi/acpi_acad.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_acad.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 acpi_acad.c --- sys/dev/acpi/acpi_acad.c 16 Nov 2006 01:32:47 -0000 1.21 +++ sys/dev/acpi/acpi_acad.c 9 Jul 2007 22:38:38 -0000 @@ -118,7 +118,7 @@ do { \ splx((s)); \ } while(/*CONSTCOND*/0) -static int acpiacad_match(struct device *, struct cfdata *, void *); +static int acpiacad_match(struct device *, cfdata_t, void *); static void acpiacad_attach(struct device *, struct device *, void *); CFATTACH_DECL(acpiacad, sizeof(struct acpiacad_softc), @@ -137,8 +137,7 @@ static int acpiacad_streinfo(struct sysm * Autoconfiguration `match' routine. */ static int -acpiacad_match(struct device *parent, struct cfdata *match, - void *aux) +acpiacad_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/acpi_apm.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_apm.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 acpi_apm.c --- sys/dev/acpi/acpi_apm.c 11 Mar 2007 01:24:12 -0000 1.9 +++ sys/dev/acpi/acpi_apm.c 9 Jul 2007 22:38:38 -0000 @@ -105,7 +105,7 @@ static int acpiapm_node = CTL_EOL, stand struct acpi_softc; extern ACPI_STATUS acpi_enter_sleep_state(struct acpi_softc *, int); -static int acpiapm_match(struct device *, struct cfdata *, void *); +static int acpiapm_match(struct device *, cfdata_t, void *); static void acpiapm_attach(struct device *, struct device *, void *); static int sysctl_state(SYSCTLFN_PROTO); @@ -114,8 +114,7 @@ CFATTACH_DECL(acpiapm, sizeof(struct apm static int /*ARGSUSED*/ -acpiapm_match(struct device *parent, - struct cfdata *match, void *aux) +acpiapm_match(struct device *parent, cfdata_t cfdata, void *aux) { return apm_match(); } Index: sys/dev/acpi/acpi_bat.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_bat.c,v retrieving revision 1.45 diff -d -p -u -u -r1.45 acpi_bat.c --- sys/dev/acpi/acpi_bat.c 16 Nov 2006 01:32:47 -0000 1.45 +++ sys/dev/acpi/acpi_bat.c 9 Jul 2007 22:38:38 -0000 @@ -213,7 +213,7 @@ do { \ splx((s)); \ } while(/*CONSTCOND*/0) -static int acpibat_match(struct device *, struct cfdata *, void *); +static int acpibat_match(struct device *, cfdata_t, void *); static void acpibat_attach(struct device *, struct device *, void *); CFATTACH_DECL(acpibat, sizeof(struct acpibat_softc), @@ -240,8 +240,7 @@ static int acpibat_streinfo(struct sysmo * Autoconfiguration `match' routine. */ static int -acpibat_match(struct device *parent, struct cfdata *match, - void *aux) +acpibat_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/acpi_button.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_button.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 acpi_button.c --- sys/dev/acpi/acpi_button.c 16 Nov 2006 01:32:47 -0000 1.22 +++ sys/dev/acpi/acpi_button.c 9 Jul 2007 22:38:38 -0000 @@ -71,7 +71,7 @@ static const char * const sleep_button_h #define ACPIBUT_F_VERBOSE 0x01 /* verbose events */ -static int acpibut_match(struct device *, struct cfdata *, void *); +static int acpibut_match(struct device *, cfdata_t, void *); static void acpibut_attach(struct device *, struct device *, void *); CFATTACH_DECL(acpibut, sizeof(struct acpibut_softc), @@ -86,8 +86,7 @@ static void acpibut_notify_handler(ACPI_ * Autoconfiguration `match' routine. */ static int -acpibut_match(struct device *parent, struct cfdata *match, - void *aux) +acpibut_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/acpi_ec.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_ec.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 acpi_ec.c --- sys/dev/acpi/acpi_ec.c 16 Nov 2006 01:32:47 -0000 1.40 +++ sys/dev/acpi/acpi_ec.c 9 Jul 2007 22:38:38 -0000 @@ -262,7 +262,7 @@ static inline void EcLock(struct acpi_ec static inline void EcUnlock(struct acpi_ec_softc *); -static int acpiec_match(struct device *, struct cfdata *, void *); +static int acpiec_match(struct device *, cfdata_t, void *); static void acpiec_attach(struct device *, struct device *, void *); CFATTACH_DECL(acpiec, sizeof(struct acpi_ec_softc), @@ -348,8 +348,7 @@ EcUnlock(struct acpi_ec_softc *sc) * Autoconfiguration `match' routine. */ static int -acpiec_match(struct device *parent, struct cfdata *match, - void *aux) +acpiec_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/acpi_lid.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_lid.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 acpi_lid.c --- sys/dev/acpi/acpi_lid.c 16 Nov 2006 01:32:47 -0000 1.21 +++ sys/dev/acpi/acpi_lid.c 9 Jul 2007 22:38:38 -0000 @@ -63,7 +63,7 @@ static const char * const lid_hid[] = { NULL }; -static int acpilid_match(struct device *, struct cfdata *, void *); +static int acpilid_match(struct device *, cfdata_t, void *); static void acpilid_attach(struct device *, struct device *, void *); CFATTACH_DECL(acpilid, sizeof(struct acpilid_softc), @@ -78,8 +78,7 @@ static void acpilid_notify_handler(ACPI_ * Autoconfiguration `match' routine. */ static int -acpilid_match(struct device *parent, struct cfdata *match, - void *aux) +acpilid_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/acpi_tz.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_tz.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 acpi_tz.c --- sys/dev/acpi/acpi_tz.c 16 Nov 2006 01:32:47 -0000 1.20 +++ sys/dev/acpi/acpi_tz.c 9 Jul 2007 22:38:39 -0000 @@ -73,7 +73,7 @@ static const struct envsys_range acpitz_ { 0, 1, ATZ_SENSOR_TEMP }, }; -static int acpitz_match(struct device *, struct cfdata *, void *); +static int acpitz_match(struct device *, cfdata_t, void *); static void acpitz_attach(struct device *, struct device *, void *); /* @@ -146,8 +146,7 @@ CFATTACH_DECL(acpitz, sizeof(struct acpi * acpitz_match: autoconf(9) match routine */ static int -acpitz_match(struct device *parent, struct cfdata *match, - void *aux) +acpitz_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/aiboost.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/aiboost.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 aiboost.c --- sys/dev/acpi/aiboost.c 19 Apr 2007 14:51:47 -0000 1.5 +++ sys/dev/acpi/aiboost.c 9 Jul 2007 22:38:40 -0000 @@ -83,7 +83,7 @@ static int aiboost_streinfo(struct sysmo static void aiboost_refresh_sensors(struct aiboost_softc *); /* autoconf(9) glue */ -static int aiboost_acpi_match(struct device *, struct cfdata *, void *); +static int aiboost_acpi_match(struct device *, cfdata_t, void *); static void aiboost_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(aiboost, sizeof(struct aiboost_softc), aiboost_acpi_match, @@ -99,7 +99,7 @@ static const char * const aiboost_acpi_i }; static int -aiboost_acpi_match(struct device *parent, struct cfdata *match, void *aux) +aiboost_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/atppc_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/atppc_acpi.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 atppc_acpi.c --- sys/dev/acpi/atppc_acpi.c 4 Mar 2007 06:01:43 -0000 1.9 +++ sys/dev/acpi/atppc_acpi.c 9 Jul 2007 22:38:40 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c #include #include -static int atppc_acpi_match(struct device *, struct cfdata *, void *); +static int atppc_acpi_match(struct device *, cfdata_t, void *); static void atppc_acpi_attach(struct device *, struct device *, void *); struct atppc_acpi_softc { @@ -96,7 +96,7 @@ static void atppc_acpi_dma_free(struct d * atppc_acpi_match: autoconf(9) match routine */ static int -atppc_acpi_match(struct device *parent, struct cfdata *match, void *aux) +atppc_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/attimer_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/attimer_acpi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 attimer_acpi.c --- sys/dev/acpi/attimer_acpi.c 16 Nov 2006 01:32:47 -0000 1.5 +++ sys/dev/acpi/attimer_acpi.c 9 Jul 2007 22:38:40 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: attimer_acpi #include -static int attimer_acpi_match(struct device *, struct cfdata *, void *); +static int attimer_acpi_match(struct device *, cfdata_t, void *); static void attimer_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(attimer_acpi, sizeof(struct attimer_softc), attimer_acpi_match, @@ -102,8 +102,7 @@ static const char * const attimer_acpi_i * attimer_acpi_match: autoconf(9) match routine */ static int -attimer_acpi_match(struct device *parent, - struct cfdata *match, void *aux) +attimer_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/com_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/com_acpi.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 com_acpi.c --- sys/dev/acpi/com_acpi.c 4 May 2007 14:18:36 -0000 1.23 +++ sys/dev/acpi/com_acpi.c 9 Jul 2007 22:38:40 -0000 @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v #include -static int com_acpi_match(struct device *, struct cfdata *, void *); +static int com_acpi_match(struct device *, cfdata_t, void *); static void com_acpi_attach(struct device *, struct device *, void *); struct com_acpi_softc { @@ -79,7 +79,7 @@ static const char * const com_acpi_ids[] * com_acpi_match: autoconf(9) match routine */ static int -com_acpi_match(struct device *parent, struct cfdata *match, +com_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/fdc_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/fdc_acpi.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 fdc_acpi.c --- sys/dev/acpi/fdc_acpi.c 16 Nov 2006 01:32:47 -0000 1.30 +++ sys/dev/acpi/fdc_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v #include -static int fdc_acpi_match(struct device *, struct cfdata *, void *); +static int fdc_acpi_match(struct device *, cfdata_t, void *); static void fdc_acpi_attach(struct device *, struct device *, void *); struct fdc_acpi_softc { @@ -93,7 +93,7 @@ static const char * const fdc_acpi_ids[] * fdc_acpi_match: autoconf(9) match routine */ static int -fdc_acpi_match(struct device *parent, struct cfdata *match, +fdc_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/hpet_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/hpet_acpi.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 hpet_acpi.c --- sys/dev/acpi/hpet_acpi.c 8 Mar 2007 14:26:28 -0000 1.1 +++ sys/dev/acpi/hpet_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpet_acpi.c, #include -static int hpet_acpi_match(struct device *, struct cfdata *, void *); +static int hpet_acpi_match(struct device *, cfdata_t, void *); static void hpet_acpi_attach(struct device *, struct device *, void *); @@ -67,7 +67,7 @@ static const char * const hpet_acpi_ids[ * hpet_acpi_match: autoconf(9) match routine */ static int -hpet_acpi_match(struct device *parent, struct cfdata *match, +hpet_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/joy_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/joy_acpi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 joy_acpi.c --- sys/dev/acpi/joy_acpi.c 16 Nov 2006 01:32:47 -0000 1.5 +++ sys/dev/acpi/joy_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: joy_acpi.c,v #include -static int joy_acpi_match(struct device *, struct cfdata *, void *); +static int joy_acpi_match(struct device *, cfdata_t, void *); static void joy_acpi_attach(struct device *, struct device *, void *); struct joy_acpi_softc { @@ -106,7 +106,7 @@ static const char * const joy_acpi_ids[] * joy_acpi_match: autoconf(9) match routine */ static int -joy_acpi_match(struct device *parent, struct cfdata *match, +joy_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/lpt_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/lpt_acpi.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 lpt_acpi.c --- sys/dev/acpi/lpt_acpi.c 16 Nov 2006 01:32:47 -0000 1.14 +++ sys/dev/acpi/lpt_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_acpi.c,v #include -static int lpt_acpi_match(struct device *, struct cfdata *, void *); +static int lpt_acpi_match(struct device *, cfdata_t, void *); static void lpt_acpi_attach(struct device *, struct device *, void *); struct lpt_acpi_softc { @@ -71,7 +71,7 @@ static const char * const lpt_acpi_ids[] * lpt_acpi_match: autoconf(9) match routine */ static int -lpt_acpi_match(struct device *parent, struct cfdata *match, +lpt_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/mpu_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/mpu_acpi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 mpu_acpi.c --- sys/dev/acpi/mpu_acpi.c 16 Nov 2006 01:32:47 -0000 1.5 +++ sys/dev/acpi/mpu_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_acpi.c,v #include -static int mpu_acpi_match(struct device *, struct cfdata *, void *); +static int mpu_acpi_match(struct device *, cfdata_t, void *); static void mpu_acpi_attach(struct device *, struct device *, void *); struct mpu_acpi_softc { @@ -110,7 +110,7 @@ static const char * const mpu_acpi_ids[] * mpu_acpi_match: autoconf(9) match routine */ static int -mpu_acpi_match(struct device *parent, struct cfdata *match, +mpu_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/pckbc_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/pckbc_acpi.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 pckbc_acpi.c --- sys/dev/acpi/pckbc_acpi.c 16 Nov 2006 01:32:47 -0000 1.19 +++ sys/dev/acpi/pckbc_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c #include -static int pckbc_acpi_match(struct device *, struct cfdata *, void *); +static int pckbc_acpi_match(struct device *, cfdata_t, void *); static void pckbc_acpi_attach(struct device *, struct device *, void *); struct pckbc_acpi_softc { @@ -117,7 +117,7 @@ static const char * const pckbc_acpi_ids * pckbc_acpi_match: autoconf(9) match routine */ static int -pckbc_acpi_match(struct device *parent, struct cfdata *match, +pckbc_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/pcppi_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/pcppi_acpi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 pcppi_acpi.c --- sys/dev/acpi/pcppi_acpi.c 16 Nov 2006 01:32:47 -0000 1.5 +++ sys/dev/acpi/pcppi_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: pcppi_acpi.c #include -static int pcppi_acpi_match(struct device *, struct cfdata *, void *); +static int pcppi_acpi_match(struct device *, cfdata_t, void *); static void pcppi_acpi_attach(struct device *, struct device *, void *); struct pcppi_acpi_softc { @@ -106,7 +106,7 @@ static const char * const pcppi_acpi_ids * pcppi_acpi_match: autoconf(9) match routine */ static int -pcppi_acpi_match(struct device *parent, struct cfdata *match, +pcppi_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/ug_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/ug_acpi.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 ug_acpi.c --- sys/dev/acpi/ug_acpi.c 8 May 2007 17:17:14 -0000 1.2 +++ sys/dev/acpi/ug_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: ug_acpi.c,v #include /* autoconf(9) functions */ -static int ug_acpi_match(struct device *, struct cfdata *, void *); +static int ug_acpi_match(struct device *, cfdata_t, void *); static void ug_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(ug_acpi, sizeof(struct ug_softc), ug_acpi_match, @@ -66,7 +66,7 @@ static const char* const ug_acpi_ids[] = }; static int -ug_acpi_match(struct device *parent, struct cfdata *match, +ug_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/wss_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/wss_acpi.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 wss_acpi.c --- sys/dev/acpi/wss_acpi.c 16 Nov 2006 01:32:47 -0000 1.17 +++ sys/dev/acpi/wss_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v #include #include -static int wss_acpi_match(struct device *, struct cfdata *, void *); +static int wss_acpi_match(struct device *, cfdata_t, void *); static void wss_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(wss_acpi, sizeof(struct wss_softc), wss_acpi_match, @@ -97,7 +97,7 @@ wss_acpi_hints_index(idstr) * wss_acpi_match: autoconf(9) match routine */ static int -wss_acpi_match(struct device *parent, struct cfdata *match, +wss_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/acpi/ym_acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/ym_acpi.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 ym_acpi.c --- sys/dev/acpi/ym_acpi.c 16 Nov 2006 01:32:47 -0000 1.3 +++ sys/dev/acpi/ym_acpi.c 9 Jul 2007 22:38:41 -0000 @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: ym_acpi.c,v #include -static int ym_acpi_match(struct device *, struct cfdata *, void *); +static int ym_acpi_match(struct device *, cfdata_t, void *); static void ym_acpi_attach(struct device *, struct device *, void *); CFATTACH_DECL(ym_acpi, sizeof(struct ym_softc), ym_acpi_match, @@ -58,7 +58,7 @@ CFATTACH_DECL(ym_acpi, sizeof(struct ym_ * ym_acpi_match: autoconf(9) match routine */ static int -ym_acpi_match(struct device *parent, struct cfdata *match, +ym_acpi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct acpi_attach_args *aa = aux; Index: sys/dev/adb/adb_bt.c =================================================================== RCS file: /cvsroot/src/sys/dev/adb/adb_bt.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 adb_bt.c --- sys/dev/adb/adb_bt.c 16 Apr 2007 23:34:43 -0000 1.1 +++ sys/dev/adb/adb_bt.c 9 Jul 2007 22:38:41 -0000 @@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: adb_bt.c,v 1 #define BT_F7 0x0c #define BT_NUMLOCK 0x7f -static int adbbt_match(struct device *, struct cfdata *, void *); +static int adbbt_match(struct device *, cfdata_t, void *); static void adbbt_attach(struct device *, struct device *, void *); struct adbbt_softc { @@ -120,7 +120,7 @@ struct wskbd_mapdata adbbt_keymapdata = static int adbbt_match(parent, cf, aux) struct device *parent; - struct cfdata *cf; + cfdata_tcf; void *aux; { struct adb_attach_args *aaa = aux; Index: sys/dev/adb/adb_bus.c =================================================================== RCS file: /cvsroot/src/sys/dev/adb/adb_bus.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 adb_bus.c --- sys/dev/adb/adb_bus.c 16 Apr 2007 00:18:34 -0000 1.5 +++ sys/dev/adb/adb_bus.c 9 Jul 2007 22:38:41 -0000 @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: adb_bus.c,v #define DPRINTF while (0) printf #endif -static int nadb_match(struct device *, struct cfdata *, void *); +static int nadb_match(struct device *, cfdata_t, void *); static void nadb_attach(struct device *, struct device *, void *); struct nadb_softc { @@ -75,7 +75,7 @@ static void nadb_remove(struct nadb_soft static int nadb_devprint(void *, const char *); static int -nadb_match(struct device *parent, struct cfdata *cf, void *aux) +nadb_match(struct device *parent, cfdata_t cf, void *aux) { return 1; Index: sys/dev/adb/adb_kbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/adb/adb_kbd.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 adb_kbd.c --- sys/dev/adb/adb_kbd.c 9 May 2007 00:10:56 -0000 1.10 +++ sys/dev/adb/adb_kbd.c 9 Jul 2007 22:38:41 -0000 @@ -91,7 +91,7 @@ struct adbkbd_softc { /* * Function declarations. */ -static int adbkbd_match(struct device *, struct cfdata *, void *); +static int adbkbd_match(struct device *, cfdata_t, void *); static void adbkbd_attach(struct device *, struct device *, void *); static void adbkbd_initleds(struct adbkbd_softc *); Index: sys/dev/adb/adb_ms.c =================================================================== RCS file: /cvsroot/src/sys/dev/adb/adb_ms.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 adb_ms.c --- sys/dev/adb/adb_ms.c 16 Apr 2007 00:22:55 -0000 1.7 +++ sys/dev/adb/adb_ms.c 9 Jul 2007 22:38:42 -0000 @@ -104,7 +104,7 @@ struct adbms_softc { /* * Function declarations. */ -static int adbms_match(struct device *, struct cfdata *, void *); +static int adbms_match(struct device *, cfdata_t, void *); static void adbms_attach(struct device *, struct device *, void *); static void ems_init(struct adbms_softc *); //static void ms_processevent(adb_event_t *event, struct adbms_softc *); @@ -141,7 +141,7 @@ const struct wsmouse_accessops adbms_acc }; static int -adbms_match(struct device *parent, struct cfdata *cf, void *aux) +adbms_match(struct device *parent, cfdata_t cf, void *aux) { struct adb_attach_args *aaa = aux; Index: sys/dev/ata/ata.c =================================================================== RCS file: /cvsroot/src/sys/dev/ata/ata.c,v retrieving revision 1.88 diff -d -p -u -u -r1.88 ata.c --- sys/dev/ata/ata.c 17 Mar 2007 06:41:36 -0000 1.88 +++ sys/dev/ata/ata.c 9 Jul 2007 22:38:43 -0000 @@ -55,8 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.88 #include #include /* for PIOBM */ -#include "locators.h" - #include "atapibus.h" #include "ataraid.h" @@ -389,18 +387,18 @@ atabus_create_thread(void *arg) * Autoconfiguration match routine. */ static int -atabus_match(struct device *parent, struct cfdata *cf, void *aux) +atabus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ata_channel *chp = aux; if (chp == NULL) return (0); - if (cf->cf_loc[ATACF_CHANNEL] != chp->ch_channel && - cf->cf_loc[ATACF_CHANNEL] != ATACF_CHANNEL_DEFAULT) - return (0); + if (locator_match_uint64(cfdata_locators(cfdata), "channel", + chp->ch_channel)) + return (1); - return (1); + return (0); } /* @@ -1072,7 +1070,7 @@ ata_downgrade_mode(struct ata_drive_data struct ata_channel *chp = drvp->chnl_softc; struct atac_softc *atac = chp->ch_atac; struct device *drv_dev = drvp->drv_softc; - int cf_flags = device_cfdata(drv_dev)->cf_flags; + uint64_t cf_flags = cfdata_flags(device_cfdata(drv_dev)); /* if drive or controller don't know its mode, we can't do much */ if ((drvp->drive_flags & DRIVE_MODE) == 0 || @@ -1127,7 +1125,7 @@ ata_probe_caps(struct ata_drive_datas *d struct device *drv_dev = drvp->drv_softc; int i, printed, s; const char *sep = ""; - int cf_flags; + uint64_t cf_flags = cfdata_flags(device_cfdata(drv_dev)); if (ata_get_params(drvp, AT_WAIT, ¶ms) != CMD_OK) { /* IDENTIFY failed. Can't tell more about the device */ @@ -1327,7 +1325,6 @@ ata_probe_caps(struct ata_drive_datas *d if (drvp->PIO_cap > 2) drvp->ata_vers = 2; /* should be at last ATA-2 */ } - cf_flags = device_cfdata(drv_dev)->cf_flags; if (cf_flags & ATA_CONFIG_PIO_SET) { s = splbio(); drvp->PIO_mode = Index: sys/dev/ata/ata_raid.c =================================================================== RCS file: /cvsroot/src/sys/dev/ata/ata_raid.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 ata_raid.c --- sys/dev/ata/ata_raid.c 27 Mar 2007 00:10:20 -0000 1.22 +++ sys/dev/ata/ata_raid.c 9 Jul 2007 22:38:43 -0000 @@ -62,8 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v #include #include -#include "locators.h" - #ifdef ATA_RAID_DEBUG #define DPRINTF(x) printf x #else @@ -72,7 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v void ataraidattach(int); -static int ataraid_match(struct device *, struct cfdata *, void *); +static int ataraid_match(struct device *, cfdata_t, void *); static void ataraid_attach(struct device *, struct device *, void *); static int ataraid_print(void *, const char *); @@ -130,12 +128,6 @@ ata_raid_type_name(u_int type) static int ata_raid_finalize(struct device *self) { - static struct cfdata ataraid_cfdata = { - .cf_name = "ataraid", - .cf_atname = "ataraid", - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - }; extern struct cfdriver ataraid_cd; static int done_once; int error; @@ -159,7 +151,7 @@ ata_raid_finalize(struct device *self) goto out; } - if (config_attach_pseudo(&ataraid_cfdata) == NULL) + if (config_attach_pseudo("ataraid", "ataraid", WILDUNIT) == NULL) printf("%s: unable to attach an instance\n", ataraid_cd.cd_name); @@ -173,10 +165,8 @@ ata_raid_finalize(struct device *self) * Autoconfiguration glue: match routine. */ static int -ataraid_match(struct device *parent, struct cfdata *cf, - void *aux) +ataraid_match(struct device *parent, cfdata_t cf, void *aux) { - /* pseudo-device; always present */ return (1); } @@ -191,7 +181,11 @@ ataraid_attach(struct device *parent, st void *aux) { struct ataraid_array_info *aai; - int locs[ATARAIDCF_NLOCS]; + prop_dictionary_t locs; + + locs = prop_dictionary_create(); + if (locs == NULL) + panic("ataraid_attach: could not create locators"); /* * We're a pseudo-device, so we get to announce our own @@ -202,12 +196,17 @@ ataraid_attach(struct device *parent, st ataraid_array_info_count == 1 ? "" : "s"); TAILQ_FOREACH(aai, &ataraid_array_info_list, aai_list) { - locs[ATARAIDCF_VENDTYPE] = aai->aai_type; - locs[ATARAIDCF_UNIT] = aai->aai_arrayno; + if (! prop_dictionary_set_uint32(locs, "vendtype", + aai->aai_type) || + ! prop_dictionary_set_uint32(locs, "unit", + aai->aai_arrayno)) + panic("ataraid_attach: could not set locators"); config_found_sm_loc(self, "ataraid", locs, aai, ataraid_print, config_stdsubmatch); } + + prop_object_release(locs); } /* Index: sys/dev/ata/ld_ataraid.c =================================================================== RCS file: /cvsroot/src/sys/dev/ata/ld_ataraid.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 ld_ataraid.c --- sys/dev/ata/ld_ataraid.c 12 Mar 2007 18:18:30 -0000 1.20 +++ sys/dev/ata/ld_ataraid.c 9 Jul 2007 22:38:44 -0000 @@ -82,7 +82,7 @@ struct ld_ataraid_softc { void (*sc_iodone)(struct buf *); }; -static int ld_ataraid_match(struct device *, struct cfdata *, void *); +static int ld_ataraid_match(struct device *, cfdata_t, void *); static void ld_ataraid_attach(struct device *, struct device *, void *); static int ld_ataraid_dump(struct ld_softc *, void *, int, int); @@ -114,7 +114,7 @@ struct cbuf { static int ld_ataraid_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { return (1); Index: sys/dev/ata/wd.c =================================================================== RCS file: /cvsroot/src/sys/dev/ata/wd.c,v retrieving revision 1.338 diff -d -p -u -u -r1.338 wd.c --- sys/dev/ata/wd.c 8 Apr 2007 06:58:47 -0000 1.338 +++ sys/dev/ata/wd.c 9 Jul 2007 22:38:45 -0000 @@ -101,9 +101,6 @@ __KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.338 #include #include #include -#include "locators.h" - -#include #define LBA48_THRESHOLD (0xfffffff) /* 128GB / DEV_BSIZE */ @@ -132,7 +129,7 @@ int wdcdebug_wd_mask = 0x0; #define ATADEBUG_PRINT(args, level) #endif -int wdprobe(struct device *, struct cfdata *, void *); +int wdprobe(struct device *, cfdata_t, void *); void wdattach(struct device *, struct device *, void *); int wddetach(struct device *, int); int wdactivate(struct device *, enum devact); @@ -276,17 +273,18 @@ wd_lookup_quirks(const char *name) } int -wdprobe(struct device *parent, struct cfdata *match, void *aux) +wdprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct ata_device *adev = aux; + prop_dictionary_t cflocs = cfdata_locators(cfdata); if (adev == NULL) return 0; if (adev->adev_bustype->bustype_type != SCSIPI_BUSTYPE_ATA) return 0; - if (match->cf_loc[ATA_HLCF_DRIVE] != ATA_HLCF_DRIVE_DEFAULT && - match->cf_loc[ATA_HLCF_DRIVE] != adev->adev_drv_data->drive) + if (! locator_match_uint64(cflocs, "driver", + adev->adev_drv_data->drive)) return 0; return 1; } Index: sys/dev/bi/if_ni.c =================================================================== RCS file: /cvsroot/src/sys/dev/bi/if_ni.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 if_ni.c --- sys/dev/bi/if_ni.c 8 Mar 2007 23:17:56 -0000 1.30 +++ sys/dev/bi/if_ni.c 9 Jul 2007 22:38:45 -0000 @@ -140,7 +140,7 @@ struct ni_softc { u_int8_t sc_enaddr[ETHER_ADDR_LEN]; }; -static int nimatch(struct device *, struct cfdata *, void *); +static int nimatch(struct device *, cfdata_t, void *); static void niattach(struct device *, struct device *, void *); static void niinit(struct ni_softc *); static void nistart(struct ifnet *); Index: sys/dev/bi/kdb.c =================================================================== RCS file: /cvsroot/src/sys/dev/bi/kdb.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 kdb.c --- sys/dev/bi/kdb.c 4 Mar 2007 06:01:45 -0000 1.40 +++ sys/dev/bi/kdb.c 9 Jul 2007 22:38:45 -0000 @@ -90,7 +90,7 @@ struct kdb_softc { bus_space_handle_t sc_ioh; }; -int kdbmatch(struct device *, struct cfdata *, void *); +int kdbmatch(struct device *, cfdata_t, void *); void kdbattach(struct device *, struct device *, void *); void kdbreset(int); void kdbintr(void *); Index: sys/dev/bi/uba_bi.c =================================================================== RCS file: /cvsroot/src/sys/dev/bi/uba_bi.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 uba_bi.c --- sys/dev/bi/uba_bi.c 11 Dec 2005 12:21:15 -0000 1.11 +++ sys/dev/bi/uba_bi.c 9 Jul 2007 22:38:45 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: uba_bi.c,v 1 #define BUA(uba) ((struct dwbua_regs *)(uba)) -static int uba_bi_match(struct device *, struct cfdata *, void *); +static int uba_bi_match(struct device *, cfdata_t, void *); static void uba_bi_attach(struct device *, struct device *, void *); static void bua_init(struct uba_softc *); static void bua_purge(struct uba_softc *, int); Index: sys/dev/bluetooth/bthidev.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/bthidev.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 bthidev.c --- sys/dev/bluetooth/bthidev.c 21 Apr 2007 06:15:22 -0000 1.8 +++ sys/dev/bluetooth/bthidev.c 9 Jul 2007 22:38:45 -0000 @@ -55,8 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: bthidev.c,v #include #include -#include "locators.h" - /***************************************************************************** * * Bluetooth HID device @@ -109,7 +107,7 @@ static int bthidev_output(struct bthide static void bthidev_null(struct bthidev *, uint8_t *, int); /* autoconf(9) glue */ -static int bthidev_match(struct device *, struct cfdata *, void *); +static int bthidev_match(struct device *, cfdata_t, void *); static void bthidev_attach(struct device *, struct device *, void *); static int bthidev_detach(struct device *, int); static int bthidev_print(void *, const char *); @@ -155,8 +153,7 @@ static const struct btproto bthidev_int_ */ static int -bthidev_match(struct device *self, struct cfdata *cfdata, - void *aux) +bthidev_match(struct device *self, cfdata_t cfdata, void *aux) { prop_dictionary_t dict = aux; prop_object_t obj; @@ -173,15 +170,22 @@ bthidev_attach(struct device *parent, st { struct bthidev_softc *sc = (struct bthidev_softc *)self; prop_dictionary_t dict = aux; + prop_dictionary_t locs; prop_object_t obj; struct bthidev_attach_args bha; struct bthidev *dev; struct hid_data *d; struct hid_item h; const void *desc; - int locs[BTHIDBUSCF_NLOCS]; int maxid, rep, s, dlen; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("\n%s: could not create locators\n", + device_xname(self)); + return; + } + /* * Init softc */ @@ -283,7 +287,8 @@ bthidev_attach(struct device *parent, st bha.ba_output = bthidev_output; bha.ba_id = rep; - locs[BTHIDBUSCF_REPORTID] = rep; + if (! prop_dictionary_set_uint32(locs, "reportid", rep)) + panic("%s: could not set locator", device_xname(self)); dev = (struct bthidev *)config_found_sm_loc((struct device *)sc, "bthidbus", locs, &bha, bthidev_print, config_stdsubmatch); Index: sys/dev/bluetooth/bthub.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/bthub.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 bthub.c --- sys/dev/bluetooth/bthub.c 13 Mar 2007 19:26:06 -0000 1.10 +++ sys/dev/bluetooth/bthub.c 9 Jul 2007 22:38:46 -0000 @@ -64,7 +64,7 @@ struct bthub_softc { }; /* autoconf(9) glue */ -static int bthub_match(struct device *, struct cfdata *, void *); +static int bthub_match(struct device *, cfdata_t, void *); static void bthub_attach(struct device *, struct device *, void *); static int bthub_detach(struct device *, int); @@ -91,8 +91,7 @@ static int bthub_pioctl(dev_t, unsigned */ static int -bthub_match(struct device *self, struct cfdata *cfdata, - void *arg) +bthub_match(struct device *self, cfdata_t cfdata, void *arg) { return 1; Index: sys/dev/bluetooth/btkbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/btkbd.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 btkbd.c --- sys/dev/bluetooth/btkbd.c 4 Mar 2007 06:01:45 -0000 1.6 +++ sys/dev/bluetooth/btkbd.c 9 Jul 2007 22:38:46 -0000 @@ -114,7 +114,7 @@ struct btkbd_softc { }; /* autoconf(9) methods */ -static int btkbd_match(struct device *, struct cfdata *, void *); +static int btkbd_match(struct device *, cfdata_t, void *); static void btkbd_attach(struct device *, struct device *, void *); static int btkbd_detach(struct device *, int); @@ -164,8 +164,7 @@ static void btkbd_repeat(void *); */ static int -btkbd_match(struct device *self, struct cfdata *cfdata, - void *aux) +btkbd_match(struct device *self, cfdata_t cfdata, void *aux) { struct bthidev_attach_args *ba = aux; Index: sys/dev/bluetooth/btms.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/btms.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 btms.c --- sys/dev/bluetooth/btms.c 4 Mar 2007 06:01:45 -0000 1.6 +++ sys/dev/bluetooth/btms.c 9 Jul 2007 22:38:46 -0000 @@ -84,7 +84,7 @@ struct btms_softc { #define BTMS_HASW (1 << 2) /* has W direction */ /* autoconf(9) methods */ -static int btms_match(struct device *, struct cfdata *, void *); +static int btms_match(struct device *, cfdata_t, void *); static void btms_attach(struct device *, struct device *, void *); static int btms_detach(struct device *, int); @@ -111,7 +111,7 @@ static void btms_input(struct bthidev *, */ static int -btms_match(struct device *parent, struct cfdata *match, +btms_match(struct device *parent, cfdata_t cfdata, void *aux) { struct bthidev_attach_args *ba = aux; Index: sys/dev/bluetooth/btsco.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/btsco.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 btsco.c --- sys/dev/bluetooth/btsco.c 21 Apr 2007 06:15:22 -0000 1.14 +++ sys/dev/bluetooth/btsco.c 9 Jul 2007 22:38:46 -0000 @@ -131,7 +131,7 @@ struct btsco_softc { #define BTSCO_LISTEN (1 << 1) /* autoconf(9) glue */ -static int btsco_match(struct device *, struct cfdata *, void *); +static int btsco_match(struct device *, cfdata_t, void *); static void btsco_attach(struct device *, struct device *, void *); static int btsco_detach(struct device *, int); @@ -256,8 +256,7 @@ static void btsco_intr(void *); */ static int -btsco_match(struct device *self, struct cfdata *cfdata, - void *aux) +btsco_match(struct device *self, cfdata_t cfdata, void *aux) { prop_dictionary_t dict = aux; prop_object_t obj; Index: sys/dev/bluetooth/btuart.c =================================================================== RCS file: /cvsroot/src/sys/dev/bluetooth/btuart.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 btuart.c --- sys/dev/bluetooth/btuart.c 13 Mar 2007 19:26:06 -0000 1.5 +++ sys/dev/bluetooth/btuart.c 9 Jul 2007 22:38:47 -0000 @@ -96,7 +96,7 @@ struct btuart_softc { }; void btuartattach(int); -static int btuart_match(struct device *, struct cfdata *, void *); +static int btuart_match(struct device *, cfdata_t, void *); static void btuart_attach(struct device *, struct device *, void *); static int btuart_detach(struct device *, int); @@ -197,7 +197,7 @@ btuartattach(int num __unused) /* ARGSUSED */ static int btuart_match(struct device *self __unused, - struct cfdata *cfdata __unused, void *arg __unused) + cfdata_t cfdata __unused, void *arg __unused) { /* pseudo-device; always present */ @@ -1060,9 +1060,8 @@ static int bth4open(dev_t device __unused, struct tty *tp) { struct btuart_softc *sc; - struct cfdata *cfdata; struct lwp *l = curlwp; /* XXX */ - int error, unit, s; + int error, s; static char name[] = "btuart"; if ((error = kauth_authorize_device_tty(l->l_cred, @@ -1081,22 +1080,13 @@ bth4open(dev_t device __unused, struct t KASSERT(tp->t_oproc != NULL); - cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK); - for (unit = 0; unit < btuart_cd.cd_ndevs; unit++) - if (btuart_cd.cd_devs[unit] == NULL) - break; - cfdata->cf_name = name; - cfdata->cf_atname = name; - cfdata->cf_unit = unit; - cfdata->cf_fstate = FSTATE_STAR; - - printf("%s%d at tty major %d minor %d", - name, unit, major(tp->t_dev), minor(tp->t_dev)); - sc = (struct btuart_softc *)config_attach_pseudo(cfdata); + sc = (struct btuart_softc *)config_attach_pseudo(name, name, WILDUNIT); if (sc == NULL) { splx(s); return EIO; } + printf("%s at tty major %d minor %d", + device_xname(&sc->sc_dev), major(tp->t_dev), minor(tp->t_dev)); tp->t_sc = sc; sc->sc_tp = tp; @@ -1112,7 +1102,6 @@ static int bth4close(struct tty *tp, int flag __unused) { struct btuart_softc *sc; - struct cfdata *cfdata; int s, baud; sc = tp->t_sc; @@ -1138,9 +1127,7 @@ bth4close(struct tty *tp, int flag __unu if (sc != NULL) { tp->t_sc = NULL; if (sc->sc_tp == tp) { - cfdata = sc->sc_dev.dv_cfdata; config_detach(&sc->sc_dev, 0); - free(cfdata, M_DEVBUF); } } Index: sys/dev/cardbus/adv_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/adv_cardbus.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 adv_cardbus.c --- sys/dev/cardbus/adv_cardbus.c 16 Nov 2006 01:32:48 -0000 1.15 +++ sys/dev/cardbus/adv_cardbus.c 9 Jul 2007 22:38:47 -0000 @@ -89,7 +89,7 @@ struct adv_cardbus_softc { bus_size_t sc_size; }; -int adv_cardbus_match(struct device *, struct cfdata *, void *); +int adv_cardbus_match(struct device *, cfdata_t, void *); void adv_cardbus_attach(struct device *, struct device *, void *); int adv_cardbus_detach(struct device *, int); @@ -97,8 +97,7 @@ CFATTACH_DECL(adv_cardbus, sizeof(struct adv_cardbus_match, adv_cardbus_attach, adv_cardbus_detach, NULL); int -adv_cardbus_match(struct device *parent, struct cfdata *match, - void *aux) +adv_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/ahc_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/ahc_cardbus.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 ahc_cardbus.c --- sys/dev/cardbus/ahc_cardbus.c 16 Nov 2006 01:32:48 -0000 1.21 +++ sys/dev/cardbus/ahc_cardbus.c 9 Jul 2007 22:38:47 -0000 @@ -92,7 +92,7 @@ struct ahc_cardbus_softc { bus_size_t sc_size; }; -int ahc_cardbus_match(struct device *, struct cfdata *, void *); +int ahc_cardbus_match(struct device *, cfdata_t, void *); void ahc_cardbus_attach(struct device *, struct device *, void *); int ahc_cardbus_detach(struct device *, int); int ahc_activate(struct device *self, enum devact act); @@ -101,8 +101,7 @@ CFATTACH_DECL(ahc_cardbus, sizeof(struct ahc_cardbus_match, ahc_cardbus_attach, ahc_cardbus_detach, ahc_activate); int -ahc_cardbus_match(struct device *parent, struct cfdata *match, - void *aux) +ahc_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/cardbus.c,v retrieving revision 1.75 diff -d -p -u -u -r1.75 cardbus.c --- sys/dev/cardbus/cardbus.c 17 Feb 2007 20:20:08 -0000 1.75 +++ sys/dev/cardbus/cardbus.c 9 Jul 2007 22:38:47 -0000 @@ -58,8 +58,6 @@ __KERNEL_RCSID(0, "$NetBSD: cardbus.c,v #include -#include "locators.h" - #if defined CARDBUS_DEBUG #define STATIC #define DPRINTF(a) printf a @@ -70,8 +68,8 @@ __KERNEL_RCSID(0, "$NetBSD: cardbus.c,v STATIC void cardbusattach(struct device *, struct device *, void *); -STATIC int cardbusmatch(struct device *, struct cfdata *, void *); -int cardbus_rescan(struct device *, const char *, const int *); +STATIC int cardbusmatch(struct device *, cfdata_t, void *); +int cardbus_rescan(struct device *, const char *, prop_dictionary_t); void cardbus_childdetached(struct device *, struct device *); static int cardbusprint(void *, const char *); @@ -100,13 +98,14 @@ struct cfdriver cardbus_cd = { STATIC int -cardbusmatch(struct device *parent, struct cfdata *cf, void *aux) +cardbusmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct cbslot_attach_args *cba = aux; + const char *cfname = cfdata_driver(cfdata); - if (strcmp(cba->cba_busname, cf->cf_name)) { + if (strcmp(cba->cba_busname, cfname)) { DPRINTF(("cardbusmatch: busname differs %s <=> %s\n", - cba->cba_busname, cf->cf_name)); + cba->cba_busname, cfname)); return (0); } @@ -385,9 +384,6 @@ cardbus_attach_card(struct cardbus_softc cardbus_chipset_tag_t cc; cardbus_function_tag_t cf; int cdstatus; - static int wildcard[CARDBUSCF_NLOCS] = { - CARDBUSCF_FUNCTION_DEFAULT - }; cc = sc->sc_cc; cf = sc->sc_cf; @@ -402,15 +398,15 @@ cardbus_attach_card(struct cardbus_softc return (0); } - cardbus_rescan(&sc->sc_dev, "cardbus", wildcard); + cardbus_rescan(&sc->sc_dev, "cardbus", NULL); return (1); /* XXX */ } int -cardbus_rescan(struct device *self, const char *ifattr, - const int *locators) +cardbus_rescan(device_t self, const char *ifattr, prop_dictionary_t locators) { struct cardbus_softc *sc = device_private(self); + prop_dictionary_t mylocs; cardbus_chipset_tag_t cc; cardbus_function_tag_t cf; cardbustag_t tag; @@ -424,6 +420,14 @@ cardbus_rescan(struct device *self, cons cc = sc->sc_cc; cf = sc->sc_cf; + /* actual locators passed to children */ + mylocs = prop_dictionary_create(); + if (mylocs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return (ENOMEM); + } + /* inspect initial voltage */ if ((cdstatus = (*cf->cardbus_ctrl)(cc, CARDBUS_CD)) == 0) { DPRINTF(("%s: no CardBus card on cb%d\n", __func__, @@ -471,11 +475,8 @@ cardbus_rescan(struct device *self, cons for (function = 0; function < nfunction; function++) { struct cardbus_attach_args ca; - int locs[CARDBUSCF_NLOCS]; - if (locators[CARDBUSCF_FUNCTION] != - CARDBUSCF_FUNCTION_DEFAULT && - locators[CARDBUSCF_FUNCTION] != function) + if (! locator_match_uint64(locators, "function", function)) continue; if (sc->sc_funcs[function]) @@ -585,9 +586,10 @@ cardbus_rescan(struct device *self, cons free(tuple, M_DEVBUF); } - locs[CARDBUSCF_FUNCTION] = function; + if (! prop_dictionary_set_uint64(mylocs, "function", function)) + panic("cardbus_rescan: could not set locator"); - if ((csc = config_found_sm_loc((void *)sc, "cardbus", locs, + if ((csc = config_found_sm_loc((void *)sc, "cardbus", mylocs, &ca, cardbusprint, config_stdsubmatch)) == NULL) { /* do not match */ disable_function(sc, function); @@ -604,6 +606,7 @@ cardbus_rescan(struct device *self, cons */ disable_function(sc, 8); + prop_object_release(mylocs); return (0); } @@ -675,7 +678,7 @@ cardbus_childdetached(struct device *sel struct cardbus_softc *sc = device_private(self); struct cardbus_devfunc *ct; - ct = sc->sc_funcs[device_locator(child, CARDBUSCF_FUNCTION)]; + ct = sc->sc_funcs[device_locator(child, "function")]; KASSERT(ct->ct_device == child); sc->sc_poweron_func &= ~(1 << ct->ct_func); Index: sys/dev/cardbus/cardslot.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/cardslot.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 cardslot.c --- sys/dev/cardbus/cardslot.c 4 Feb 2007 23:39:02 -0000 1.34 +++ sys/dev/cardbus/cardslot.c 9 Jul 2007 22:38:47 -0000 @@ -53,8 +53,6 @@ __KERNEL_RCSID(0, "$NetBSD: cardslot.c,v #include #include -#include "locators.h" - #if defined CARDSLOT_DEBUG #define STATIC #define DPRINTF(a) printf a @@ -67,21 +65,20 @@ __KERNEL_RCSID(0, "$NetBSD: cardslot.c,v STATIC void cardslotattach(struct device *, struct device *, void *); -STATIC int cardslotmatch(struct device *, struct cfdata *, void *); +STATIC int cardslotmatch(struct device *, cfdata_t, void *); static void create_slot_manager(void *); static void cardslot_event_thread(void *arg); STATIC int cardslot_cb_print(void *aux, const char *pcic); static int cardslot_16_print(void *, const char *); -static int cardslot_16_submatch(struct device *, struct cfdata *, - const int *, void *); +static int cardslot_16_submatch(struct device *, cfdata_t, + prop_dictionary_t, void *); CFATTACH_DECL(cardslot, sizeof(struct cardslot_softc), cardslotmatch, cardslotattach, NULL, NULL); STATIC int -cardslotmatch(struct device *parent, struct cfdata *cf, - void *aux) +cardslotmatch(struct device *parent, cfdata_t cf, void *aux) { struct cardslot_attach_args *caa = aux; @@ -115,7 +112,7 @@ cardslotattach(struct device *parent, st sc->sc_th_enable = 0; printf(" slot %d flags %x\n", sc->sc_slot, - device_cfdata(&sc->sc_dev)->cf_flags); + (u_int)cfdata_flags(device_cfdata(&sc->sc_dev))); DPRINTF(("%s attaching CardBus bus...\n", sc->sc_dev.dv_xname)); if (cba != NULL) { @@ -179,20 +176,17 @@ cardslot_cb_print(void *aux, const char static int -cardslot_16_submatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +cardslot_16_submatch(struct device *parent, cfdata_t cf, + prop_dictionary_t locs, void *aux) { + prop_dictionary_t cflocs = cfdata_locators(cf); + uint64_t controller; - if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] != PCMCIABUSCF_CONTROLLER_DEFAULT - && cf->cf_loc[PCMCIABUSCF_CONTROLLER] != 0) { - return 0; - } - - if ((cf->cf_loc[PCMCIABUSCF_CONTROLLER] == PCMCIABUSCF_CONTROLLER_DEFAULT)) { + /* XXXfreza: huh? but that's how the code used to work. */ + if (! prop_dictionary_get_uint64(cflocs, "controller", &controller)) return (config_match(parent, cf, aux)); - } - return 0; + return (0); } Index: sys/dev/cardbus/com_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/com_cardbus.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 com_cardbus.c --- sys/dev/cardbus/com_cardbus.c 16 Nov 2006 01:32:48 -0000 1.20 +++ sys/dev/cardbus/com_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -71,7 +71,7 @@ struct com_cardbus_softc { #define DEVNAME(CSC) ((CSC)->cc_com.sc_dev.dv_xname) -static int com_cardbus_match (struct device*, struct cfdata*, void*); +static int com_cardbus_match (struct device*, cfdata_t, void*); static void com_cardbus_attach (struct device*, struct device*, void*); static int com_cardbus_detach (struct device*, int); @@ -115,8 +115,7 @@ find_csdev(struct cardbus_attach_args *c } static int -com_cardbus_match(struct device *parent, struct cfdata *match, - void *aux) +com_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/ehci_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/ehci_cardbus.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 ehci_cardbus.c --- sys/dev/cardbus/ehci_cardbus.c 16 Nov 2006 01:32:48 -0000 1.16 +++ sys/dev/cardbus/ehci_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -72,7 +72,7 @@ extern int ehcidebug; #define DPRINTF(x) #endif -int ehci_cardbus_match(struct device *, struct cfdata *, void *); +int ehci_cardbus_match(struct device *, cfdata_t, void *); void ehci_cardbus_attach(struct device *, struct device *, void *); int ehci_cardbus_detach(device_ptr_t, int); @@ -97,7 +97,7 @@ static TAILQ_HEAD(, usb_cardbus) ehci_ca int ehci_cardbus_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; Index: sys/dev/cardbus/fwohci_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/fwohci_cardbus.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 fwohci_cardbus.c --- sys/dev/cardbus/fwohci_cardbus.c 16 Nov 2006 01:32:48 -0000 1.18 +++ sys/dev/cardbus/fwohci_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -69,7 +69,7 @@ struct fwohci_cardbus_softc { void *sc_ih; }; -static int fwohci_cardbus_match(struct device *, struct cfdata *, void *); +static int fwohci_cardbus_match(struct device *, cfdata_t, void *); static void fwohci_cardbus_attach(struct device *, struct device *, void *); static int fwohci_cardbus_detach(struct device *, int); @@ -83,7 +83,7 @@ CFATTACH_DECL(fwohci_cardbus, sizeof(str static int fwohci_cardbus_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; Index: sys/dev/cardbus/if_ath_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_ath_cardbus.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 if_ath_cardbus.c --- sys/dev/cardbus/if_ath_cardbus.c 16 Nov 2006 01:32:48 -0000 1.18 +++ sys/dev/cardbus/if_ath_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -110,7 +110,7 @@ struct ath_cardbus_softc { void *sc_sdhook; }; -int ath_cardbus_match(struct device *, struct cfdata *, void *); +int ath_cardbus_match(struct device *, cfdata_t, void *); void ath_cardbus_attach(struct device *, struct device *, void *); int ath_cardbus_detach(struct device *, int); void ath_cardbus_shutdown(void *arg); @@ -125,7 +125,7 @@ void ath_cardbus_disable(struct ath_soft void ath_cardbus_power(struct ath_softc *, int); int -ath_cardbus_match(struct device *parent, struct cfdata *match, +ath_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_atw_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_atw_cardbus.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 if_atw_cardbus.c --- sys/dev/cardbus/if_atw_cardbus.c 16 Nov 2006 01:32:48 -0000 1.17 +++ sys/dev/cardbus/if_atw_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -118,7 +118,7 @@ struct atw_cardbus_softc { int sc_intrline; /* interrupt line */ }; -int atw_cardbus_match(struct device *, struct cfdata *, void *); +int atw_cardbus_match(struct device *, cfdata_t, void *); void atw_cardbus_attach(struct device *, struct device *, void *); int atw_cardbus_detach(struct device *, int); @@ -163,7 +163,7 @@ atw_cardbus_lookup(const struct cardbus_ } int -atw_cardbus_match(struct device *parent, struct cfdata *match, +atw_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_ex_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_ex_cardbus.c,v retrieving revision 1.39 diff -d -p -u -u -r1.39 if_ex_cardbus.c --- sys/dev/cardbus/if_ex_cardbus.c 16 Nov 2006 01:32:48 -0000 1.39 +++ sys/dev/cardbus/if_ex_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ex_cardbu #define EX_CB_INTR 4 /* intr acknowledge reg. CardBus only */ #define EX_CB_INTR_ACK 0x8000 /* intr acknowledge bit */ -int ex_cardbus_match(struct device *, struct cfdata *, void *); +int ex_cardbus_match(struct device *, cfdata_t, void *); void ex_cardbus_attach(struct device *, struct device *,void *); int ex_cardbus_detach(struct device *, int); void ex_cardbus_intr_ack(struct ex_softc *); @@ -206,7 +206,7 @@ ex_cardbus_lookup(ca) } int -ex_cardbus_match(struct device *parent, struct cfdata *cf, +ex_cardbus_match(struct device *parent, cfdata_t cf, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_fxp_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_fxp_cardbus.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 if_fxp_cardbus.c --- sys/dev/cardbus/if_fxp_cardbus.c 16 Nov 2006 01:32:48 -0000 1.26 +++ sys/dev/cardbus/if_fxp_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_fxp_cardb #include #include -static int fxp_cardbus_match(struct device *, struct cfdata *, void *); +static int fxp_cardbus_match(struct device *, cfdata_t, void *); static void fxp_cardbus_attach(struct device *, struct device *, void *); static int fxp_cardbus_detach(struct device * self, int flags); static void fxp_cardbus_setup(struct fxp_softc * sc); @@ -118,7 +118,7 @@ CFATTACH_DECL(fxp_cardbus, sizeof(struct #endif static int -fxp_cardbus_match(struct device *parent, struct cfdata *match, +fxp_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_ral_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_ral_cardbus.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 if_ral_cardbus.c --- sys/dev/cardbus/if_ral_cardbus.c 16 Nov 2006 01:32:48 -0000 1.8 +++ sys/dev/cardbus/if_ral_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -92,7 +92,7 @@ struct ral_cardbus_softc { int sc_intrline; }; -int ral_cardbus_match(struct device *, struct cfdata *, void *); +int ral_cardbus_match(struct device *, cfdata_t, void *); void ral_cardbus_attach(struct device *, struct device *, void *); int ral_cardbus_detach(struct device *, int); @@ -105,8 +105,7 @@ void ral_cardbus_power(struct rt2560_sof void ral_cardbus_setup(struct ral_cardbus_softc *); int -ral_cardbus_match(struct device *parent, - struct cfdata *cfdata, void *aux) +ral_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_re_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_re_cardbus.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 if_re_cardbus.c --- sys/dev/cardbus/if_re_cardbus.c 21 Mar 2007 12:17:31 -0000 1.13 +++ sys/dev/cardbus/if_re_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -105,7 +105,7 @@ static const struct rtk_type re_cardbus_ { 0, 0, 0, NULL } }; -static int re_cardbus_match(struct device *, struct cfdata *, void *); +static int re_cardbus_match(struct device *, cfdata_t, void *); static void re_cardbus_attach(struct device *, struct device *, void *); static int re_cardbus_detach(struct device *, int); @@ -150,7 +150,7 @@ re_cardbus_lookup(const struct cardbus_a } int -re_cardbus_match(struct device *parent, struct cfdata *match, void *aux) +re_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_rtk_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_rtk_cardbus.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 if_rtk_cardbus.c --- sys/dev/cardbus/if_rtk_cardbus.c 21 Mar 2007 12:17:31 -0000 1.32 +++ sys/dev/cardbus/if_rtk_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -120,7 +120,7 @@ static const struct rtk_type rtk_cardbus { 0, 0, 0, NULL } }; -static int rtk_cardbus_match(struct device *, struct cfdata *, void *); +static int rtk_cardbus_match(struct device *, cfdata_t, void *); static void rtk_cardbus_attach(struct device *, struct device *, void *); static int rtk_cardbus_detach(struct device *, int); @@ -166,7 +166,7 @@ rtk_cardbus_lookup(ca) } int -rtk_cardbus_match(struct device *parent, struct cfdata *match, +rtk_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_rtw_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_rtw_cardbus.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_rtw_cardbus.c --- sys/dev/cardbus/if_rtw_cardbus.c 16 Nov 2006 01:32:48 -0000 1.15 +++ sys/dev/cardbus/if_rtw_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -150,7 +150,7 @@ struct rtw_cardbus_softc { int sc_intrline; /* interrupt line */ }; -int rtw_cardbus_match(struct device *, struct cfdata *, void *); +int rtw_cardbus_match(struct device *, cfdata_t, void *); void rtw_cardbus_attach(struct device *, struct device *, void *); int rtw_cardbus_detach(struct device *, int); @@ -199,7 +199,7 @@ rtw_cardbus_lookup(const struct cardbus_ } int -rtw_cardbus_match(struct device *parent, struct cfdata *match, +rtw_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/if_tlp_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/if_tlp_cardbus.c,v retrieving revision 1.53 diff -d -p -u -u -r1.53 if_tlp_cardbus.c --- sys/dev/cardbus/if_tlp_cardbus.c 16 Nov 2006 01:32:48 -0000 1.53 +++ sys/dev/cardbus/if_tlp_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -119,7 +119,7 @@ struct tulip_cardbus_softc { int sc_intrline; /* interrupt line */ }; -int tlp_cardbus_match(struct device *, struct cfdata *, void *); +int tlp_cardbus_match(struct device *, cfdata_t, void *); void tlp_cardbus_attach(struct device *, struct device *, void *); int tlp_cardbus_detach(struct device *, int); @@ -229,7 +229,7 @@ tlp_cardbus_get_quirks(csc, enaddr, tpq) } int -tlp_cardbus_match(struct device *parent, struct cfdata *match, +tlp_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/njata_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/njata_cardbus.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 njata_cardbus.c --- sys/dev/cardbus/njata_cardbus.c 31 Dec 2006 12:50:19 -0000 1.4 +++ sys/dev/cardbus/njata_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -64,7 +64,7 @@ struct njata32_cardbus_softc { static const struct njata32_cardbus_product *njata_cardbus_lookup (const struct cardbus_attach_args *); -static int njata_cardbus_match(struct device *, struct cfdata *, +static int njata_cardbus_match(struct device *, cfdata_t, void *); static void njata_cardbus_attach(struct device *, struct device *, void *); @@ -114,7 +114,7 @@ njata_cardbus_lookup(ca) static int njata_cardbus_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/njs_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/njs_cardbus.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 njs_cardbus.c --- sys/dev/cardbus/njs_cardbus.c 16 Nov 2006 01:32:48 -0000 1.5 +++ sys/dev/cardbus/njs_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -72,7 +72,7 @@ struct njsc32_cardbus_softc { bus_size_t sc_regmap_size; }; -static int njs_cardbus_match(struct device *, struct cfdata *, void *); +static int njs_cardbus_match(struct device *, cfdata_t, void *); static void njs_cardbus_attach(struct device *, struct device *, void *); static int njs_cardbus_detach(struct device *, int); @@ -114,7 +114,7 @@ njs_cardbus_lookup(const struct cardbus_ } static int -njs_cardbus_match(struct device *parent, struct cfdata *match, +njs_cardbus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/ohci_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/ohci_cardbus.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 ohci_cardbus.c --- sys/dev/cardbus/ohci_cardbus.c 16 Nov 2006 01:32:48 -0000 1.23 +++ sys/dev/cardbus/ohci_cardbus.c 9 Jul 2007 22:38:48 -0000 @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: ohci_cardbus #include #include -int ohci_cardbus_match(struct device *, struct cfdata *, void *); +int ohci_cardbus_match(struct device *, cfdata_t, void *); void ohci_cardbus_attach(struct device *, struct device *, void *); int ohci_cardbus_detach(device_ptr_t, int); @@ -99,7 +99,7 @@ CFATTACH_DECL(ohci_cardbus, sizeof(struc int ohci_cardbus_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; Index: sys/dev/cardbus/rbus_ppb.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/rbus_ppb.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 rbus_ppb.c --- sys/dev/cardbus/rbus_ppb.c 29 Mar 2006 06:22:38 -0000 1.19 +++ sys/dev/cardbus/rbus_ppb.c 9 Jul 2007 22:38:49 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v struct ppb_softc; -static int ppb_cardbus_match(struct device *, struct cfdata *, void *); +static int ppb_cardbus_match(struct device *, cfdata_t, void *); static void ppb_cardbus_attach(struct device *, struct device *, void *); static int ppb_cardbus_detach(struct device * self, int flags); /*static*/ void ppb_cardbus_setup(struct ppb_softc * sc); @@ -126,7 +126,7 @@ int rbus_ppb_debug = 0; /* hack with k static int ppb_cardbus_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct cardbus_attach_args *ca = aux; Index: sys/dev/cardbus/uhci_cardbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/cardbus/uhci_cardbus.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 uhci_cardbus.c --- sys/dev/cardbus/uhci_cardbus.c 16 Nov 2006 01:32:48 -0000 1.5 +++ sys/dev/cardbus/uhci_cardbus.c 9 Jul 2007 22:38:49 -0000 @@ -74,7 +74,7 @@ struct uhci_cardbus_softc { void *sc_ih; /* interrupt vectoring */ }; -static int uhci_cardbus_match(struct device *, struct cfdata *, void *); +static int uhci_cardbus_match(struct device *, cfdata_t, void *); static void uhci_cardbus_attach(struct device *, struct device *, void *); static int uhci_cardbus_detach(device_ptr_t, int); @@ -88,7 +88,7 @@ CFATTACH_DECL(uhci_cardbus, sizeof(struc static int uhci_cardbus_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; Index: sys/dev/dec/dzkbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/dec/dzkbd.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 dzkbd.c --- sys/dev/dec/dzkbd.c 4 Mar 2007 06:01:45 -0000 1.17 +++ sys/dev/dec/dzkbd.c 9 Jul 2007 22:38:49 -0000 @@ -90,7 +90,7 @@ struct dzkbd_softc { static int dzkbd_input(void *, int); -static int dzkbd_match(struct device *, struct cfdata *, void *); +static int dzkbd_match(struct device *, cfdata_t, void *); static void dzkbd_attach(struct device *, struct device *, void *); CFATTACH_DECL(dzkbd, sizeof(struct dzkbd_softc), @@ -129,7 +129,7 @@ const struct wskbd_mapdata dzkbd_keymapd * kbd_match: how is this dz line configured? */ static int -dzkbd_match(struct device *parent, struct cfdata *cf, void *aux) +dzkbd_match(struct device *parent, cfdata_t cf, void *aux) { struct dzkm_attach_args *daa = aux; Index: sys/dev/dec/dzms.c =================================================================== RCS file: /cvsroot/src/sys/dev/dec/dzms.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 dzms.c --- sys/dev/dec/dzms.c 4 Mar 2007 06:01:45 -0000 1.16 +++ sys/dev/dec/dzms.c 9 Jul 2007 22:38:49 -0000 @@ -82,7 +82,7 @@ struct dzms_softc { /* driver status in struct device *sc_wsmousedev; }; -static int dzms_match(struct device *, struct cfdata *, void *); +static int dzms_match(struct device *, cfdata_t, void *); static void dzms_attach(struct device *, struct device *, void *); static int dzms_input(void *, int); Index: sys/dev/dkwedge/dk.c =================================================================== RCS file: /cvsroot/src/sys/dev/dkwedge/dk.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 dk.c --- sys/dev/dkwedge/dk.c 4 Mar 2007 06:01:45 -0000 1.22 +++ sys/dev/dkwedge/dk.c 9 Jul 2007 22:38:50 -0000 @@ -75,7 +75,6 @@ typedef enum { struct dkwedge_softc { struct device *sc_dev; /* pointer to our pseudo-device */ - struct cfdata sc_cfdata; /* our cfdata structure */ uint8_t sc_wname[128]; /* wedge name (Unicode, UTF-8) */ dkwedge_state_t sc_state; /* state this wedge is in */ @@ -135,8 +134,7 @@ static struct lock dkwedge_discovery_met * Autoconfiguration match function for pseudo-device glue. */ static int -dkwedge_match(struct device *parent, struct cfdata *match, - void *aux) +dkwedge_match(struct device *parent, cfdata_t match, void *aux) { /* Pseudo-device; always present. */ @@ -272,7 +270,7 @@ dkwedge_add(struct dkwedge_info *dkw) { struct dkwedge_softc *sc, *lsc; struct disk *pdk; - u_int unit; + u_int unit, myunit; int error; dev_t pdev; @@ -347,26 +345,24 @@ dkwedge_add(struct dkwedge_info *dkw) return (error); } - /* Fill in our cfdata for the pseudo-device glue. */ - sc->sc_cfdata.cf_name = dk_cd.cd_name; - sc->sc_cfdata.cf_atname = dk_ca.ca_name; - /* sc->sc_cfdata.cf_unit set below */ - sc->sc_cfdata.cf_fstate = FSTATE_STAR; - /* Insert the larval wedge into the array. */ (void) lockmgr(&dkwedges_lock, LK_EXCLUSIVE, NULL); - for (error = 0;;) { + for (error = 0, myunit = -1;;) { struct dkwedge_softc **scpp; /* * Check for a duplicate wname while searching for * a slot. */ + /* XXXfreza: this dance is weird. autoconf(9) is responsible + * XXXfreza: for picking unit number for us. the cfdata stuff + * XXXfreza: that used to be here was broken anyway. + */ for (scpp = NULL, unit = 0; unit < ndkwedges; unit++) { if (dkwedges[unit] == NULL) { if (scpp == NULL) { scpp = &dkwedges[unit]; - sc->sc_cfdata.cf_unit = unit; + myunit = unit; } } else { /* XXX Unicode. */ @@ -383,7 +379,7 @@ dkwedge_add(struct dkwedge_info *dkw) if (scpp == NULL) dkwedge_array_expand(); else { - KASSERT(scpp == &dkwedges[sc->sc_cfdata.cf_unit]); + KASSERT(scpp == &dkwedges[myunit]); *scpp = sc; break; } @@ -408,13 +404,18 @@ dkwedge_add(struct dkwedge_info *dkw) * * This should never fail, unless we're almost totally out of * memory. + * + * XXXfreza: the unit number in 'myunit' is a guess! And we don't + * XXXfreza: really use it anyway. This needs to be revisited. */ - if ((sc->sc_dev = config_attach_pseudo(&sc->sc_cfdata)) == NULL) { + sc->sc_dev = config_attach_pseudo(dk_cd.cd_name, dk_ca.ca_name, + WILDUNIT); + if (sc->sc_dev == NULL) { aprint_error("%s%u: unable to attach pseudo-device\n", - sc->sc_cfdata.cf_name, sc->sc_cfdata.cf_unit); + dk_cd.cd_name, myunit); (void) lockmgr(&dkwedges_lock, LK_EXCLUSIVE, NULL); - dkwedges[sc->sc_cfdata.cf_unit] = NULL; + dkwedges[myunit] = NULL; (void) lockmgr(&dkwedges_lock, LK_RELEASE, NULL); (void) lockmgr(&pdk->dk_openlock, LK_EXCLUSIVE, NULL); Index: sys/dev/ebus/cs4231_ebus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ebus/cs4231_ebus.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 cs4231_ebus.c --- sys/dev/ebus/cs4231_ebus.c 15 Oct 2006 19:43:45 -0000 1.22 +++ sys/dev/ebus/cs4231_ebus.c 9 Jul 2007 22:38:53 -0000 @@ -67,7 +67,7 @@ struct cs4231_ebus_softc { void cs4231_ebus_attach(struct device *, struct device *, void *); -int cs4231_ebus_match(struct device *, struct cfdata *, void *); +int cs4231_ebus_match(struct device *, cfdata_t, void *); CFATTACH_DECL(audiocs_ebus, sizeof(struct cs4231_ebus_softc), cs4231_ebus_match, cs4231_ebus_attach, NULL, NULL); @@ -133,7 +133,7 @@ static int cs4231_ebus_intr(void *); int -cs4231_ebus_match(struct device *parent, struct cfdata *cf, void *aux) +cs4231_ebus_match(struct device *parent, cfdata_t cf, void *aux) { struct ebus_attach_args *ea; Index: sys/dev/eisa/ahb.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/ahb.c,v retrieving revision 1.48 diff -d -p -u -u -r1.48 ahb.c --- sys/dev/eisa/ahb.c 4 Mar 2007 06:01:46 -0000 1.48 +++ sys/dev/eisa/ahb.c 9 Jul 2007 22:38:53 -0000 @@ -144,7 +144,7 @@ static int ahb_create_ecbs(struct ahb_so static int ahb_init_ecb(struct ahb_softc *, struct ahb_ecb *); -static int ahbmatch(struct device *, struct cfdata *, void *); +static int ahbmatch(struct device *, cfdata_t, void *); static void ahbattach(struct device *, struct device *, void *); CFATTACH_DECL(ahb, sizeof(struct ahb_softc), @@ -158,8 +158,7 @@ CFATTACH_DECL(ahb, sizeof(struct ahb_sof * the actual probe routine to check it out. */ static int -ahbmatch(struct device *parent, struct cfdata *match, - void *aux) +ahbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; bus_space_tag_t iot = ea->ea_iot; Index: sys/dev/eisa/ahc_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/ahc_eisa.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 ahc_eisa.c --- sys/dev/eisa/ahc_eisa.c 16 Nov 2006 01:32:50 -0000 1.33 +++ sys/dev/eisa/ahc_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: ahc_eisa.c,v #include #include -static int ahc_eisa_match(struct device *, struct cfdata *, void *); +static int ahc_eisa_match(struct device *, cfdata_t, void *); static void ahc_eisa_attach(struct device *, struct device *, void *); @@ -69,8 +69,7 @@ CFATTACH_DECL(ahc_eisa, sizeof(struct ah * the actual probe routine to check it out. */ static int -ahc_eisa_match(struct device *parent, struct cfdata *match, - void *aux) +ahc_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; bus_space_tag_t iot = ea->ea_iot; Index: sys/dev/eisa/bha_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/bha_eisa.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 bha_eisa.c --- sys/dev/eisa/bha_eisa.c 16 Nov 2006 01:32:50 -0000 1.28 +++ sys/dev/eisa/bha_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: bha_eisa.c,v #define BHA_EISA_IOCONF 0x0c static int bha_eisa_address(bus_space_tag_t, bus_space_handle_t, int *); -static int bha_eisa_match(struct device *, struct cfdata *, void *); +static int bha_eisa_match(struct device *, cfdata_t, void *); static void bha_eisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(bha_eisa, sizeof(struct bha_softc), @@ -106,7 +106,7 @@ bha_eisa_address(bus_space_tag_t iot, bu * the actual probe routine to check it out. */ static int -bha_eisa_match(struct device *parent, struct cfdata *match, +bha_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; Index: sys/dev/eisa/cac_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/cac_eisa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 cac_eisa.c --- sys/dev/eisa/cac_eisa.c 4 Mar 2007 06:01:46 -0000 1.17 +++ sys/dev/eisa/cac_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -88,7 +88,7 @@ __KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v #define CAC_EISA_IOCONF 0x38 static void cac_eisa_attach(struct device *, struct device *, void *); -static int cac_eisa_match(struct device *, struct cfdata *, void *); +static int cac_eisa_match(struct device *, cfdata_t, void *); static struct cac_ccb *cac_eisa_l0_completed(struct cac_softc *); static int cac_eisa_l0_fifo_full(struct cac_softc *); @@ -120,7 +120,7 @@ static struct cac_eisa_type { }; static int -cac_eisa_match(struct device *parent, struct cfdata *match, +cac_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea; Index: sys/dev/eisa/depca_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/depca_eisa.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 depca_eisa.c --- sys/dev/eisa/depca_eisa.c 29 Mar 2006 06:32:36 -0000 1.9 +++ sys/dev/eisa/depca_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: depca_eisa.c #include #include -static int depca_eisa_match(struct device *, struct cfdata *, void *); +static int depca_eisa_match(struct device *, cfdata_t, void *); static void depca_eisa_attach(struct device *, struct device *, void *); struct depca_eisa_softc { @@ -94,7 +94,7 @@ static void *depca_eisa_intr_establish(s struct lance_softc *); static int -depca_eisa_match(struct device *parent, struct cfdata *match, void *aux) +depca_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; Index: sys/dev/eisa/dpt_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/dpt_eisa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 dpt_eisa.c --- sys/dev/eisa/dpt_eisa.c 16 Nov 2006 01:32:50 -0000 1.16 +++ sys/dev/eisa/dpt_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: dpt_eisa.c,v static void dpt_eisa_attach(struct device *, struct device *, void *); static int dpt_eisa_irq(bus_space_tag_t, bus_space_handle_t, int *); -static int dpt_eisa_match(struct device *, struct cfdata *, void *); +static int dpt_eisa_match(struct device *, cfdata_t, void *); CFATTACH_DECL(dpt_eisa, sizeof(struct dpt_softc), dpt_eisa_match, dpt_eisa_attach, NULL, NULL); @@ -103,7 +103,7 @@ dpt_eisa_irq(bus_space_tag_t iot, bus_sp } static int -dpt_eisa_match(struct device *parent, struct cfdata *match, +dpt_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea; Index: sys/dev/eisa/eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/eisa.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 eisa.c --- sys/dev/eisa/eisa.c 16 Nov 2006 01:32:50 -0000 1.41 +++ sys/dev/eisa/eisa.c 9 Jul 2007 22:38:54 -0000 @@ -53,9 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.4 #include #include -#include "locators.h" - -static int eisamatch(struct device *, struct cfdata *, void *); +static int eisamatch(struct device *, cfdata_t, void *); static void eisaattach(struct device *, struct device *, void *); CFATTACH_DECL(eisa, sizeof(struct device), @@ -65,8 +63,7 @@ static int eisaprint(void *, const char static void eisa_devinfo(const char *, char *, size_t); static int -eisamatch(struct device *parent, struct cfdata *cf, - void *aux) +eisamatch(struct device *parent, cfdata_t cfdata, void *aux) { /* XXX check other indicators */ @@ -90,6 +87,7 @@ eisaprint(void *aux, const char *pnp) static void eisaattach(struct device *parent, struct device *self, void *aux) { + prop_dictionary_t locs; struct eisabus_attach_args *eba = aux; bus_space_tag_t iot, memt; bus_dma_tag_t dmat; @@ -99,6 +97,13 @@ eisaattach(struct device *parent, struct eisa_attach_hook(parent, self, eba); printf("\n"); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return ; + } + iot = eba->eba_iot; memt = eba->eba_memt; ec = eba->eba_ec; @@ -116,7 +121,6 @@ eisaattach(struct device *parent, struct u_int slotaddr; bus_space_handle_t slotioh; int i; - int locs[EISACF_NLOCS]; ea.ea_iot = iot; ea.ea_memt = memt; @@ -179,7 +183,11 @@ eisaattach(struct device *parent, struct /* We no longer need the I/O handle; free it. */ bus_space_unmap(iot, slotioh, EISA_SLOT_SIZE); - locs[EISACF_SLOT] = slot; + if (! prop_dictionary_set_uint64(locs, "slot", slot)) { + aprint_error("%s: could not set locator\n", + device_xname(self)); + break; + } /* Attach matching device. */ config_found_sm_loc(self, "eisa", locs, &ea, Index: sys/dev/eisa/if_ep_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/if_ep_eisa.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 if_ep_eisa.c --- sys/dev/eisa/if_ep_eisa.c 16 Nov 2006 01:32:50 -0000 1.35 +++ sys/dev/eisa/if_ep_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -118,7 +118,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_eisa.c #include #include -static int ep_eisa_match(struct device *, struct cfdata *, void *); +static int ep_eisa_match(struct device *, cfdata_t, void *); static void ep_eisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(ep_eisa, sizeof(struct ep_softc), @@ -193,7 +193,7 @@ ep_eisa_lookup(const struct eisa_attach_ } static int -ep_eisa_match(struct device *parent, struct cfdata *match, +ep_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; Index: sys/dev/eisa/if_fea.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/if_fea.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 if_fea.c --- sys/dev/eisa/if_fea.c 4 Mar 2007 06:01:46 -0000 1.34 +++ sys/dev/eisa/if_fea.c 9 Jul 2007 22:38:54 -0000 @@ -333,7 +333,7 @@ pdq_eisa_shutdown( static int pdq_eisa_probe( struct device *parent, - struct cfdata *cf, + cfdata_t cf, void *aux) { struct isa_attach_args *ia = (struct isa_attach_args *) aux; @@ -445,7 +445,7 @@ struct cfdriver feacd = { static int pdq_eisa_match( struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux) { const struct eisa_attach_args * const ea = (struct eisa_attach_args *) aux; Index: sys/dev/eisa/if_tlp_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/if_tlp_eisa.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 if_tlp_eisa.c --- sys/dev/eisa/if_tlp_eisa.c 16 Nov 2006 01:32:50 -0000 1.18 +++ sys/dev/eisa/if_tlp_eisa.c 9 Jul 2007 22:38:54 -0000 @@ -113,7 +113,7 @@ struct tulip_eisa_softc { void *sc_ih; /* interrupt handle */ }; -static int tlp_eisa_match(struct device *, struct cfdata *, void *); +static int tlp_eisa_match(struct device *, cfdata_t, void *); static void tlp_eisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(tlp_eisa, sizeof(struct tulip_eisa_softc), @@ -146,7 +146,7 @@ tlp_eisa_lookup(const struct eisa_attach } static int -tlp_eisa_match(struct device *parent, struct cfdata *match, +tlp_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; Index: sys/dev/eisa/mlx_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/mlx_eisa.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 mlx_eisa.c --- sys/dev/eisa/mlx_eisa.c 16 Nov 2006 01:32:50 -0000 1.18 +++ sys/dev/eisa/mlx_eisa.c 9 Jul 2007 22:38:55 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v #define MLX_EISA_CFG10 (0x0c95 - MLX_EISA_SLOT_OFFSET) static void mlx_eisa_attach(struct device *, struct device *, void *); -static int mlx_eisa_match(struct device *, struct cfdata *, void *); +static int mlx_eisa_match(struct device *, cfdata_t, void *); static int mlx_v1_submit(struct mlx_softc *, struct mlx_ccb *); static int mlx_v1_findcomplete(struct mlx_softc *, u_int *, u_int *); @@ -99,7 +99,7 @@ static struct mlx_eisa_prod { }; static int -mlx_eisa_match(struct device *parent, struct cfdata *match, +mlx_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea; Index: sys/dev/eisa/uha_eisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/eisa/uha_eisa.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 uha_eisa.c --- sys/dev/eisa/uha_eisa.c 16 Nov 2006 01:32:50 -0000 1.26 +++ sys/dev/eisa/uha_eisa.c 9 Jul 2007 22:38:55 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: uha_eisa.c,v #define UHA_EISA_SLOT_OFFSET 0xc80 #define UHA_EISA_IOSIZE 0x020 -static int uha_eisa_match(struct device *, struct cfdata *, void *); +static int uha_eisa_match(struct device *, cfdata_t, void *); static void uha_eisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(uha_eisa, sizeof(struct uha_softc), @@ -87,7 +87,7 @@ static void u24_init(struct uha_softc *) * the actual probe routine to check it out. */ static int -uha_eisa_match(struct device *parent, struct cfdata *match, +uha_eisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct eisa_attach_args *ea = aux; Index: sys/dev/gpib/cs80bus.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/cs80bus.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 cs80bus.c --- sys/dev/gpib/cs80bus.c 4 Mar 2007 06:01:46 -0000 1.9 +++ sys/dev/gpib/cs80bus.c 9 Jul 2007 22:38:55 -0000 @@ -64,14 +64,14 @@ int cs80busdebug = 0xff; #define cs80buscf_slave cf_loc[CS80BUSCF_SLAVE] #define cs80buscf_punit cf_loc[CS80BUSCF_PUNIT] -int cs80busmatch(struct device *, struct cfdata *, void *); +int cs80busmatch(struct device *, cfdata_t, void *); void cs80busattach(struct device *, struct device *, void *); CFATTACH_DECL(cs80bus, sizeof(struct cs80bus_softc), cs80busmatch, cs80busattach, NULL, NULL); static int cs80bus_alloc(struct cs80bus_softc *, int, int); -static int cs80bussearch(struct device *, struct cfdata *, +static int cs80bussearch(struct device *, cfdata_t, const int *, void *); static int cs80busprint(void *, const char *); @@ -100,7 +100,7 @@ static int cs80busprint(void *, const ch int cs80busmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { Index: sys/dev/gpib/ct.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/ct.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 ct.c --- sys/dev/gpib/ct.c 4 Mar 2007 06:01:46 -0000 1.10 +++ sys/dev/gpib/ct.c 9 Jul 2007 22:38:55 -0000 @@ -198,7 +198,7 @@ struct ct_softc { int sc_eofs[EOFS]; }; -int ctmatch(struct device *, struct cfdata *, void *); +int ctmatch(struct device *, cfdata_t, void *); void ctattach(struct device *, struct device *, void *); CFATTACH_DECL(ct, sizeof(struct ct_softc), @@ -274,7 +274,7 @@ ctlookup(id, slave, punit) int ctmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct cs80bus_attach_args *ca = aux; Index: sys/dev/gpib/gpib.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/gpib.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 gpib.c --- sys/dev/gpib/gpib.c 4 Mar 2007 06:01:46 -0000 1.10 +++ sys/dev/gpib/gpib.c 9 Jul 2007 22:38:55 -0000 @@ -65,15 +65,15 @@ int gpibdebug = 0xff; #define DPRINTF(mask, str) /* nothing */ #endif -int gpibmatch(struct device *, struct cfdata *, void *); +int gpibmatch(struct device *, cfdata_t, void *); void gpibattach(struct device *, struct device *, void *); CFATTACH_DECL(gpib, sizeof(struct gpib_softc), gpibmatch, gpibattach, NULL, NULL); -static int gpibsubmatch1(struct device *, struct cfdata *, +static int gpibsubmatch1(struct device *, cfdata_t, const int *, void *); -static int gpibsubmatch2(struct device *, struct cfdata *, +static int gpibsubmatch2(struct device *, cfdata_t, const int *, void *); static int gpibprint(void *, const char *); @@ -98,7 +98,7 @@ int gpibtimeout = 100000; /* # of status int gpibmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { Index: sys/dev/gpib/hil_gpib.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/hil_gpib.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 hil_gpib.c --- sys/dev/gpib/hil_gpib.c 29 Mar 2006 06:33:50 -0000 1.6 +++ sys/dev/gpib/hil_gpib.c 9 Jul 2007 22:38:55 -0000 @@ -39,7 +39,7 @@ struct hil_softc { #define HILF_DELAY 0x10 }; -int hilmatch(struct device *, struct cfdata *, void *); +int hilmatch(struct device *, cfdata_t, void *); void hilattach(struct device *, struct device *, void *); const struct cfattach hil_ca = { @@ -52,7 +52,7 @@ void hilstart(void *); int hilmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct gpib_attach_args *ga = aux; Index: sys/dev/gpib/mt.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/mt.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 mt.c --- sys/dev/gpib/mt.c 4 Mar 2007 06:01:46 -0000 1.9 +++ sys/dev/gpib/mt.c 9 Jul 2007 22:38:55 -0000 @@ -181,7 +181,7 @@ struct mt_softc { #define B_CMD B_DEVPRIVATE /* command buf instead of data */ #define b_cmd b_blkno /* blkno holds cmd when B_CMD */ -int mtmatch(struct device *, struct cfdata *, void *); +int mtmatch(struct device *, cfdata_t, void *); void mtattach(struct device *, struct device *, void *); CFATTACH_DECL(mt, sizeof(struct mt_softc), @@ -249,7 +249,7 @@ mtlookup(id, slave, punit) int mtmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct cs80bus_attach_args *ca = aux; Index: sys/dev/gpib/ppi.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/ppi.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 ppi.c --- sys/dev/gpib/ppi.c 4 Mar 2007 06:01:46 -0000 1.9 +++ sys/dev/gpib/ppi.c 9 Jul 2007 22:38:56 -0000 @@ -110,7 +110,7 @@ struct ppi_softc { #define PPIF_TIMO 0x08 #define PPIF_DELAY 0x10 -int ppimatch(struct device *, struct cfdata *, void *); +int ppimatch(struct device *, cfdata_t, void *); void ppiattach(struct device *, struct device *, void *); CFATTACH_DECL(ppi, sizeof(struct ppi_softc), @@ -152,7 +152,7 @@ int ppidebug = 0x80; int ppimatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { Index: sys/dev/gpib/rd.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpib/rd.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 rd.c --- sys/dev/gpib/rd.c 4 Mar 2007 06:01:46 -0000 1.15 +++ sys/dev/gpib/rd.c 9 Jul 2007 22:38:56 -0000 @@ -290,7 +290,7 @@ void rdstart(struct rd_softc *); void rdintr(struct rd_softc *); int rderror(struct rd_softc *); -int rdmatch(struct device *, struct cfdata *, void *); +int rdmatch(struct device *, cfdata_t, void *); void rdattach(struct device *, struct device *, void *); CFATTACH_DECL(rd, sizeof(struct rd_softc), @@ -337,7 +337,7 @@ rdlookup(id, slave, punit) int rdmatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct cs80bus_attach_args *ca = aux; Index: sys/dev/gpio/gpio.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpio/gpio.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 gpio.c --- sys/dev/gpio/gpio.c 4 Mar 2007 06:01:46 -0000 1.12 +++ sys/dev/gpio/gpio.c 9 Jul 2007 22:38:56 -0000 @@ -34,8 +34,6 @@ __KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.1 #include -#include "locators.h" - struct gpio_softc { struct device sc_dev; @@ -47,11 +45,11 @@ struct gpio_softc { int sc_dying; }; -int gpio_match(struct device *, struct cfdata *, void *); +int gpio_match(struct device *, cfdata_t, void *); void gpio_attach(struct device *, struct device *, void *); int gpio_detach(struct device *, int); int gpio_activate(struct device *, enum devact); -int gpio_search(struct device *, struct cfdata *, const int *, void *); +int gpio_search(struct device *, cfdata_t, prop_dictionary_t, void *); int gpio_print(void *, const char *); CFATTACH_DECL(gpio, sizeof(struct gpio_softc), @@ -69,7 +67,7 @@ const struct cdevsw gpio_cdevsw = { extern struct cfdriver gpio_cd; int -gpio_match(struct device *parent, struct cfdata *cf, +gpio_match(struct device *parent, cfdata_t cf, void *aux) { @@ -131,14 +129,20 @@ gpio_activate(struct device *self, enum } int -gpio_search(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +gpio_search(struct device *parent, cfdata_t cf, prop_dictionary_t locs, + void *aux) { struct gpio_attach_args ga; + prop_dictionary_t cflocs = cfdata_locators(cf); + int32_t offs; ga.ga_gpio = aux; - ga.ga_offset = cf->cf_loc[GPIOCF_OFFSET]; - ga.ga_mask = cf->cf_loc[GPIOCF_MASK]; + + if (! prop_dictionary_get_uint32(cflocs, "mask", &ga.ga_mask) || + ! prop_dictionary_get_int32(cflocs, "offset", &offs)) + panic("gpio_search: could not get locator"); + + ga.ga_offset = offs; if (config_match(parent, cf, &ga) > 0) config_attach(parent, cf, &ga, gpio_print); Index: sys/dev/gpio/gpioow.c =================================================================== RCS file: /cvsroot/src/sys/dev/gpio/gpioow.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 gpioow.c --- sys/dev/gpio/gpioow.c 16 Nov 2006 01:32:50 -0000 1.3 +++ sys/dev/gpio/gpioow.c 9 Jul 2007 22:38:56 -0000 @@ -50,7 +50,7 @@ struct gpioow_softc { int sc_dying; }; -int gpioow_match(struct device *, struct cfdata *, void *); +int gpioow_match(struct device *, cfdata_t, void *); void gpioow_attach(struct device *, struct device *, void *); int gpioow_detach(struct device *, int); int gpioow_activate(struct device *, enum devact); @@ -76,7 +76,7 @@ static const struct onewire_bbops gpioow }; int -gpioow_match(struct device *parent, struct cfdata *cf, +gpioow_match(struct device *parent, cfdata_t cf, void *aux) { return 1; Index: sys/dev/hpc/bivideo.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/bivideo.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 bivideo.c --- sys/dev/hpc/bivideo.c 4 Mar 2007 06:01:46 -0000 1.26 +++ sys/dev/hpc/bivideo.c 9 Jul 2007 22:38:57 -0000 @@ -79,7 +79,7 @@ int bivideo_dont_attach = 0; /* * function prototypes */ -int bivideomatch(struct device *, struct cfdata *, void *); +int bivideomatch(struct device *, cfdata_t, void *); void bivideoattach(struct device *, struct device *, void *); int bivideo_ioctl(void *, u_long, void *, int, struct lwp *); paddr_t bivideo_mmap(void *, off_t, int); @@ -140,7 +140,7 @@ static int attach_flag = 0; * function bodies */ int -bivideomatch(struct device *parent, struct cfdata *match, void *aux) +bivideomatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mainbus_attach_args *ma = aux; Index: sys/dev/hpc/btnmgr.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/btnmgr.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 btnmgr.c --- sys/dev/hpc/btnmgr.c 4 Mar 2007 06:01:46 -0000 1.21 +++ sys/dev/hpc/btnmgr.c 9 Jul 2007 22:38:57 -0000 @@ -83,7 +83,7 @@ struct btnmgr_softc { #endif }; -int btnmgrmatch(struct device *, struct cfdata *, void *); +int btnmgrmatch(struct device *, cfdata_t, void *); void btnmgrattach(struct device *, struct device *, void *); const char *btnmgr_name(long); static int btnmgr_hook(void *, int, long, void *); @@ -173,7 +173,7 @@ struct wskbd_mapdata btnmgr_keymapdata = * function bodies */ int -btnmgrmatch(struct device *parent, struct cfdata *match, void *aux) +btnmgrmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mainbus_attach_args *ma = aux; Index: sys/dev/hpc/button.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/button.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 button.c --- sys/dev/hpc/button.c 29 Mar 2006 04:16:49 -0000 1.12 +++ sys/dev/hpc/button.c 9 Jul 2007 22:38:57 -0000 @@ -62,7 +62,7 @@ struct button_softc { config_hook_tag sc_ghook_tag; }; -static int button_match(struct device *, struct cfdata *, void *); +static int button_match(struct device *, cfdata_t, void *); static void button_attach(struct device *, struct device *, void *); static int button_intr(void *); static int button_state(void *, int, long, void *); @@ -71,7 +71,7 @@ CFATTACH_DECL(button, sizeof(struct butt button_match, button_attach, NULL, NULL); int -button_match(struct device *parent, struct cfdata *match, void *aux) +button_match(struct device *parent, cfdata_t cfdata, void *aux) { struct hpcio_attach_args *haa = aux; platid_mask_t mask; Index: sys/dev/hpc/hpcapm.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpcapm.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 hpcapm.c --- sys/dev/hpc/hpcapm.c 16 Nov 2006 01:32:50 -0000 1.12 +++ sys/dev/hpc/hpcapm.c 9 Jul 2007 22:38:57 -0000 @@ -60,7 +60,7 @@ int hpcapm_debug = HPCAPMDEBUG_CONF; #endif /* Definition of the driver for autoconfig. */ -static int hpcapm_match(struct device *, struct cfdata *, void *); +static int hpcapm_match(struct device *, cfdata_t, void *); static void hpcapm_attach(struct device *, struct device *, void *); static int hpcapm_hook(void *, int, long, void *); @@ -106,7 +106,7 @@ extern struct cfdriver hpcapm_cd; static int hpcapm_match(struct device *parent, - struct cfdata *cf, void *aux) + cfdata_t cf, void *aux) { return 1; Index: sys/dev/hpc/hpcfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpcfb.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 hpcfb.c --- sys/dev/hpc/hpcfb.c 4 Mar 2007 06:01:46 -0000 1.41 +++ sys/dev/hpc/hpcfb.c 9 Jul 2007 22:38:58 -0000 @@ -176,7 +176,7 @@ struct hpcfb_softc { /* * function prototypes */ -int hpcfbmatch(struct device *, struct cfdata *, void *); +int hpcfbmatch(struct device *, cfdata_t, void *); void hpcfbattach(struct device *, struct device *, void *); int hpcfbprint(void *, const char *); @@ -284,7 +284,7 @@ struct hpcfb_tvrow hpcfb_console_tvram[H int hpcfbmatch(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { return (1); } Index: sys/dev/hpc/hpcin.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpcin.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 hpcin.c --- sys/dev/hpc/hpcin.c 29 Mar 2006 06:37:35 -0000 1.9 +++ sys/dev/hpc/hpcin.c 9 Jul 2007 22:38:58 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpcin.c,v 1. #include "locators.h" -int hpcin_match(struct device *, struct cfdata *, void *); +int hpcin_match(struct device *, cfdata_t, void *); void hpcin_attach(struct device *, struct device *, void *); int hpcin_intr(void *); @@ -76,7 +76,7 @@ CFATTACH_DECL(hpcin, sizeof(struct hpcin hpcin_match, hpcin_attach, NULL, NULL); int -hpcin_match(struct device *parent, struct cfdata *cf, void *aux) +hpcin_match(struct device *parent, cfdata_t cf, void *aux) { return (1); } Index: sys/dev/hpc/hpcioman.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpcioman.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 hpcioman.c --- sys/dev/hpc/hpcioman.c 11 Dec 2005 12:21:22 -0000 1.14 +++ sys/dev/hpc/hpcioman.c 9 Jul 2007 22:38:58 -0000 @@ -53,10 +53,10 @@ __KERNEL_RCSID(0, "$NetBSD: hpcioman.c,v #include "locators.h" -int hpcioman_match(struct device *, struct cfdata *, void *); +int hpcioman_match(struct device *, cfdata_t, void *); void hpcioman_attach(struct device *, struct device *, void *); int hpcioman_print(void *, const char *); -int hpcioman_search(struct device *, struct cfdata *, +int hpcioman_search(struct device *, cfdata_t, const int *, void *); struct hpcioman_softc { @@ -67,7 +67,7 @@ CFATTACH_DECL(hpcioman, sizeof(struct hp hpcioman_match, hpcioman_attach, NULL, NULL); int -hpcioman_match(struct device *parent, struct cfdata *cf, void *aux) +hpcioman_match(struct device *parent, cfdata_t cf, void *aux) { struct hpcio_attach_args *haa = aux; platid_mask_t mask; @@ -89,7 +89,7 @@ hpcioman_attach(struct device *parent, s } int -hpcioman_search(struct device *parent, struct cfdata *cf, +hpcioman_search(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { //struct hpcioman_softc *sc = (struct hpcioman_softc *)parent; Index: sys/dev/hpc/hpckbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpckbd.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 hpckbd.c --- sys/dev/hpc/hpckbd.c 4 Mar 2007 06:01:47 -0000 1.22 +++ sys/dev/hpc/hpckbd.c 9 Jul 2007 22:38:58 -0000 @@ -99,7 +99,7 @@ struct hpckbd_softc { struct hpckbd_core sc_coredata; }; -int hpckbd_match(struct device *, struct cfdata *, void *); +int hpckbd_match(struct device *, cfdata_t, void *); void hpckbd_attach(struct device *, struct device *, void *); void hpckbd_initcore(struct hpckbd_core *, struct hpckbd_ic_if *, int); @@ -147,7 +147,7 @@ struct wskbd_mapdata hpckbd_keymapdata = int hpckbd_match(struct device *parent, - struct cfdata *cf, void *aux) + cfdata_t cf, void *aux) { return (1); } Index: sys/dev/hpc/hpcout.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpcout.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 hpcout.c --- sys/dev/hpc/hpcout.c 29 Mar 2006 06:37:35 -0000 1.10 +++ sys/dev/hpc/hpcout.c 9 Jul 2007 22:38:58 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpcout.c,v 1 #include "locators.h" -int hpcout_match(struct device *, struct cfdata *, void *); +int hpcout_match(struct device *, cfdata_t, void *); void hpcout_attach(struct device *, struct device *, void *); int hpcout_hook(void *, int, long, void *); @@ -73,7 +73,7 @@ CFATTACH_DECL(hpcout, sizeof(struct hpco hpcout_match, hpcout_attach, NULL, NULL); int -hpcout_match(struct device *parent, struct cfdata *cf, void *aux) +hpcout_match(struct device *parent, cfdata_t cf, void *aux) { return (1); } Index: sys/dev/hpc/hpf1275a_tty.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/hpf1275a_tty.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 hpf1275a_tty.c --- sys/dev/hpc/hpf1275a_tty.c 9 Mar 2007 15:41:02 -0000 1.21 +++ sys/dev/hpc/hpf1275a_tty.c 9 Jul 2007 22:38:59 -0000 @@ -76,7 +76,7 @@ static int hpf1275a_close(struct tty *, static int hpf1275a_input(int, struct tty *); /* autoconf(9) methods */ -static int hpf1275a_match(struct device *, struct cfdata *, void *); +static int hpf1275a_match(struct device *, cfdata_t, void *); static void hpf1275a_attach(struct device *, struct device *, void *); static int hpf1275a_detach(struct device *, int); @@ -245,7 +245,7 @@ hpf1275aattach(int n) */ static int hpf1275a_match(struct device *self, - struct cfdata *cfdata, void *arg) + cfdata_t cfdata, void *arg) { /* pseudo-device; always present */ Index: sys/dev/hpc/pwctl.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/pwctl.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 pwctl.c --- sys/dev/hpc/pwctl.c 9 Oct 2006 10:33:42 -0000 1.16 +++ sys/dev/hpc/pwctl.c 9 Jul 2007 22:38:59 -0000 @@ -82,7 +82,7 @@ struct pwctl_softc { int sc_initvalue; }; -static int pwctl_match(struct device *, struct cfdata *, void *); +static int pwctl_match(struct device *, cfdata_t, void *); static void pwctl_attach(struct device *, struct device *, void *); static int pwctl_hook(void *, int, long, void *); static int pwctl_ghook(void *, int, long, void *); @@ -92,7 +92,7 @@ CFATTACH_DECL(pwctl, sizeof(struct pwctl pwctl_match, pwctl_attach, NULL, NULL); int -pwctl_match(struct device *parent, struct cfdata *match, void *aux) +pwctl_match(struct device *parent, cfdata_t cfdata, void *aux) { struct hpcio_attach_args *haa = aux; platid_mask_t mask; Index: sys/dev/hpc/apm/apmdev.c =================================================================== RCS file: /cvsroot/src/sys/dev/hpc/apm/apmdev.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 apmdev.c --- sys/dev/hpc/apm/apmdev.c 4 Mar 2007 06:01:47 -0000 1.10 +++ sys/dev/hpc/apm/apmdev.c 9 Jul 2007 22:39:00 -0000 @@ -131,7 +131,7 @@ struct apm_softc { (void) lockmgr(&(apmsc)->sc_lock, LK_RELEASE, NULL) static void apmattach(struct device *, struct device *, void *); -static int apmmatch(struct device *, struct cfdata *, void *); +static int apmmatch(struct device *, cfdata_t, void *); static void apm_event_handle(struct apm_softc *, u_int, u_int); static void apm_periodic_check(struct apm_softc *); @@ -645,7 +645,7 @@ ok: static int apmmatch(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { /* There can be only one! */ Index: sys/dev/i2c/adm1030.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/adm1030.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 adm1030.c --- sys/dev/i2c/adm1030.c 5 Jan 2007 23:09:33 -0000 1.7 +++ sys/dev/i2c/adm1030.c 9 Jul 2007 22:39:00 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: adm1030.c,v #include static void adm1030c_attach(struct device *, struct device *, void *); -static int adm1030c_match(struct device *, struct cfdata *, void *); +static int adm1030c_match(struct device *, cfdata_t, void *); struct adm1030c_sysmon { struct sysmon_envsys sme; Index: sys/dev/i2c/adt7463.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/adt7463.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 adt7463.c --- sys/dev/i2c/adt7463.c 16 Nov 2006 01:32:50 -0000 1.6 +++ sys/dev/i2c/adt7463.c 9 Jul 2007 22:39:00 -0000 @@ -63,7 +63,7 @@ static void adt7463c_refresh_temp(struct static void adt7463c_refresh_fan(struct adt7463c_softc *sc); static int adt7463c_verify(struct adt7463c_softc *sc); -static int adt7463c_match(struct device *, struct cfdata *, void *); +static int adt7463c_match(struct device *, cfdata_t, void *); static void adt7463c_attach(struct device *, struct device *, void *); @@ -71,7 +71,7 @@ CFATTACH_DECL(adt7463c, sizeof(struct ad adt7463c_match, adt7463c_attach, NULL, NULL); static int -adt7463c_match(struct device *parent, struct cfdata *cf, +adt7463c_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/adt7467.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/adt7467.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 adt7467.c --- sys/dev/i2c/adt7467.c 29 Mar 2006 06:41:24 -0000 1.6 +++ sys/dev/i2c/adt7467.c 9 Jul 2007 22:39:00 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: adt7467.c,v static void adt7467c_attach(struct device *, struct device *, void *); -static int adt7467c_match(struct device *, struct cfdata *, void *); +static int adt7467c_match(struct device *, cfdata_t, void *); struct adt7467c_sysmon { struct sysmon_envsys sme; Index: sys/dev/i2c/at24cxx.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/at24cxx.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 at24cxx.c --- sys/dev/i2c/at24cxx.c 12 Jan 2007 08:47:43 -0000 1.7 +++ sys/dev/i2c/at24cxx.c 9 Jul 2007 22:39:00 -0000 @@ -78,7 +78,7 @@ struct seeprom_softc { int sc_open; }; -static int seeprom_match(struct device *, struct cfdata *, void *); +static int seeprom_match(struct device *, cfdata_t, void *); static void seeprom_attach(struct device *, struct device *, void *); CFATTACH_DECL(seeprom, sizeof(struct seeprom_softc), @@ -99,7 +99,7 @@ static int seeprom_wait_idle(struct seep static int -seeprom_match(struct device *parent, struct cfdata *cf, void *aux) +seeprom_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/ddc.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/ddc.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 ddc.c --- sys/dev/i2c/ddc.c 25 Apr 2006 21:18:16 -0000 1.1 +++ sys/dev/i2c/ddc.c 9 Jul 2007 22:39:00 -0000 @@ -59,14 +59,14 @@ struct ddc_softc { int sc_address; }; -static int ddc_match(struct device *, struct cfdata *, void *); +static int ddc_match(struct device *, cfdata_t, void *); static void ddc_attach(struct device *, struct device *, void *); CFATTACH_DECL(ddc, sizeof (struct ddc_softc), ddc_match, ddc_attach, NULL, NULL); static int -ddc_match(struct device *parent, struct cfdata *cf, void *aux) +ddc_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/ds1307.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/ds1307.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 ds1307.c --- sys/dev/i2c/ds1307.c 12 Jan 2007 19:33:21 -0000 1.8 +++ sys/dev/i2c/ds1307.c 9 Jul 2007 22:39:00 -0000 @@ -58,7 +58,7 @@ struct dsrtc_softc { }; static void dsrtc_attach(struct device *, struct device *, void *); -static int dsrtc_match(struct device *, struct cfdata *, void *); +static int dsrtc_match(struct device *, cfdata_t, void *); CFATTACH_DECL(dsrtc, sizeof(struct dsrtc_softc), dsrtc_match, dsrtc_attach, NULL, NULL); @@ -80,7 +80,7 @@ static int dsrtc_gettime(struct todr_chi static int dsrtc_settime(struct todr_chip_handle *, struct clock_ymdhms *); static int -dsrtc_match(struct device *parent, struct cfdata *cf, void *arg) +dsrtc_match(struct device *parent, cfdata_t cf, void *arg) { struct i2c_attach_args *ia = arg; Index: sys/dev/i2c/i2c.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/i2c.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 i2c.c --- sys/dev/i2c/i2c.c 6 Feb 2007 12:39:15 -0000 1.13 +++ sys/dev/i2c/i2c.c 9 Jul 2007 22:39:00 -0000 @@ -47,8 +47,6 @@ #include -#include "locators.h" - struct iic_softc { struct device sc_dev; i2c_tag_t sc_tag; @@ -80,17 +78,23 @@ iic_print(void *aux, const char *pnp) } static int -iic_search(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +iic_search(struct device *parent, cfdata_t cf, prop_dictionary_t locs, + void *aux) { - struct iic_softc *sc = (void *) parent; + prop_dictionary_t mylocs = cfdata_locators(cf); + struct iic_softc *sc = (void *)parent; struct i2c_attach_args ia; + int32_t addr; ia.ia_tag = sc->sc_tag; - ia.ia_addr = cf->cf_loc[IICCF_ADDR]; - ia.ia_size = cf->cf_loc[IICCF_SIZE]; ia.ia_type = sc->sc_type; + if (! prop_dictionary_get_uint16(mylocs, "addr", &ia.ia_addr) || + ! prop_dictionary_get_int32(mylocs, "size", &addr)) + panic("iic_search: could not get locator"); + + ia.ia_addr = addr; + if (config_match(parent, cf, &ia) > 0) config_attach(parent, cf, &ia, iic_print); @@ -98,7 +102,7 @@ iic_search(struct device *parent, struct } static int -iic_match(struct device *parent, struct cfdata *cf, +iic_match(struct device *parent, cfdata_t cf, void *aux) { Index: sys/dev/i2c/lm75.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/lm75.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 lm75.c --- sys/dev/i2c/lm75.c 10 Jul 2006 16:28:44 -0000 1.11 +++ sys/dev/i2c/lm75.c 9 Jul 2007 22:39:00 -0000 @@ -58,7 +58,7 @@ struct lmtemp_softc { uint32_t (*sc_lmtemp_decode)(const uint8_t *); }; -static int lmtemp_match(struct device *, struct cfdata *, void *); +static int lmtemp_match(struct device *, cfdata_t, void *); static void lmtemp_attach(struct device *, struct device *, void *); CFATTACH_DECL(lmtemp, sizeof(struct lmtemp_softc), @@ -103,7 +103,7 @@ static const struct { }; static int -lmtemp_match(struct device *parent, struct cfdata *cf, void *aux) +lmtemp_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; int i; Index: sys/dev/i2c/m41st84.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/m41st84.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 m41st84.c --- sys/dev/i2c/m41st84.c 12 Jan 2007 19:33:21 -0000 1.9 +++ sys/dev/i2c/m41st84.c 9 Jul 2007 22:39:01 -0000 @@ -58,7 +58,7 @@ struct strtc_softc { }; static void strtc_attach(struct device *, struct device *, void *); -static int strtc_match(struct device *, struct cfdata *, void *); +static int strtc_match(struct device *, cfdata_t, void *); CFATTACH_DECL(strtc, sizeof(struct strtc_softc), strtc_match, strtc_attach, NULL, NULL); @@ -80,7 +80,7 @@ static int strtc_gettime(struct todr_chi static int strtc_settime(struct todr_chip_handle *, volatile struct timeval *); static int -strtc_match(struct device *parent, struct cfdata *cf, void *arg) +strtc_match(struct device *parent, cfdata_t cf, void *arg) { struct i2c_attach_args *ia = arg; Index: sys/dev/i2c/m41t00.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/m41t00.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 m41t00.c --- sys/dev/i2c/m41t00.c 12 Jan 2007 19:33:21 -0000 1.8 +++ sys/dev/i2c/m41t00.c 9 Jul 2007 22:39:01 -0000 @@ -60,7 +60,7 @@ struct m41t00_softc { struct todr_chip_handle sc_todr; }; -static int m41t00_match(struct device *, struct cfdata *, void *); +static int m41t00_match(struct device *, cfdata_t, void *); static void m41t00_attach(struct device *, struct device *, void *); CFATTACH_DECL(m41trtc, sizeof(struct m41t00_softc), @@ -83,7 +83,7 @@ static int m41t00_gettime(struct todr_ch static int m41t00_settime(struct todr_chip_handle *, volatile struct timeval *); int -m41t00_match(struct device *parent, struct cfdata *cf, void *aux) +m41t00_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/max6900.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/max6900.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 max6900.c --- sys/dev/i2c/max6900.c 12 Jan 2007 19:33:21 -0000 1.7 +++ sys/dev/i2c/max6900.c 9 Jul 2007 22:39:01 -0000 @@ -57,7 +57,7 @@ struct maxrtc_softc { struct todr_chip_handle sc_todr; }; -static int maxrtc_match(struct device *, struct cfdata *, void *); +static int maxrtc_match(struct device *, cfdata_t, void *); static void maxrtc_attach(struct device *, struct device *, void *); CFATTACH_DECL(maxrtc, sizeof(struct maxrtc_softc), @@ -80,7 +80,7 @@ static int maxrtc_gettime(struct todr_ch static int maxrtc_settime(struct todr_chip_handle *, volatile struct timeval *); int -maxrtc_match(struct device *parent, struct cfdata *cf, void *aux) +maxrtc_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/pcf8583.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/pcf8583.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 pcf8583.c --- sys/dev/i2c/pcf8583.c 13 Jan 2007 18:42:45 -0000 1.7 +++ sys/dev/i2c/pcf8583.c 9 Jul 2007 22:39:01 -0000 @@ -65,7 +65,7 @@ struct pcfrtc_softc { struct todr_chip_handle sc_todr; }; -static int pcfrtc_match(struct device *, struct cfdata *, void *); +static int pcfrtc_match(struct device *, cfdata_t, void *); static void pcfrtc_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcfrtc, sizeof(struct pcfrtc_softc), @@ -90,7 +90,7 @@ static int pcfrtc_gettime(struct todr_ch static int pcfrtc_settime(struct todr_chip_handle *, volatile struct timeval *); int -pcfrtc_match(struct device *parent, struct cfdata *cf, void *aux) +pcfrtc_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *ia = aux; Index: sys/dev/i2c/pic16lc.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/pic16lc.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 pic16lc.c --- sys/dev/i2c/pic16lc.c 5 Feb 2007 23:33:53 -0000 1.6 +++ sys/dev/i2c/pic16lc.c 9 Jul 2007 22:39:01 -0000 @@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: pic16lc.c,v #include #include -static int pic16lc_match(struct device *, struct cfdata *, void *); +static int pic16lc_match(struct device *, cfdata_t, void *); static void pic16lc_attach(struct device *, struct device *, void *); static int pic16lc_intr(void *); @@ -97,7 +97,7 @@ CFATTACH_DECL(pic16lc, sizeof(struct pic pic16lc_match, pic16lc_attach, NULL, NULL); static int -pic16lc_match(struct device *parent, struct cfdata *cf, void *opaque) +pic16lc_match(struct device *parent, cfdata_t cf, void *opaque) { struct i2c_attach_args *ia; Index: sys/dev/i2c/r2025.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/r2025.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 r2025.c --- sys/dev/i2c/r2025.c 4 Sep 2006 23:45:30 -0000 1.3 +++ sys/dev/i2c/r2025.c 9 Jul 2007 22:39:01 -0000 @@ -58,7 +58,7 @@ struct r2025rtc_softc { }; static void r2025rtc_attach(struct device *, struct device *, void *); -static int r2025rtc_match(struct device *, struct cfdata *, void *); +static int r2025rtc_match(struct device *, cfdata_t, void *); CFATTACH_DECL(r2025rtc, sizeof(struct r2025rtc_softc), r2025rtc_match, r2025rtc_attach, NULL, NULL); @@ -72,7 +72,7 @@ static int r2025rtc_reg_read(struct r202 static int -r2025rtc_match(struct device *parent, struct cfdata *cf, void *arg) +r2025rtc_match(struct device *parent, cfdata_t cf, void *arg) { struct i2c_attach_args *ia = arg; Index: sys/dev/i2c/rs5c372.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/rs5c372.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 rs5c372.c --- sys/dev/i2c/rs5c372.c 4 Sep 2006 23:45:30 -0000 1.6 +++ sys/dev/i2c/rs5c372.c 9 Jul 2007 22:39:01 -0000 @@ -47,7 +47,7 @@ struct rs5c372rtc_softc { struct todr_chip_handle sc_todr; }; -static int rs5c372rtc_match(struct device *, struct cfdata *, void *); +static int rs5c372rtc_match(struct device *, cfdata_t, void *); static void rs5c372rtc_attach(struct device *, struct device *, void *); CFATTACH_DECL(rs5c372rtc, sizeof(struct rs5c372rtc_softc), @@ -60,7 +60,7 @@ static int rs5c372rtc_gettime(struct tod static int rs5c372rtc_settime(struct todr_chip_handle *, volatile struct timeval *); static int -rs5c372rtc_match(struct device *parent, struct cfdata *cf, void *arg) +rs5c372rtc_match(struct device *parent, cfdata_t cf, void *arg) { struct i2c_attach_args *ia = arg; Index: sys/dev/i2c/sgsmix.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/sgsmix.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 sgsmix.c --- sys/dev/i2c/sgsmix.c 17 Jan 2007 23:32:10 -0000 1.1 +++ sys/dev/i2c/sgsmix.c 9 Jul 2007 22:39:01 -0000 @@ -72,7 +72,7 @@ struct sgsmix_softc { #define SGSREG_HEADPHONES_R 6 static void sgsmix_attach(struct device *, struct device *, void *); -static int sgsmix_match(struct device *, struct cfdata *, void *); +static int sgsmix_match(struct device *, cfdata_t, void *); static void sgsmix_setup(struct sgsmix_softc *); static void sgsmix_writereg(struct sgsmix_softc *, int, uint8_t); @@ -80,7 +80,7 @@ CFATTACH_DECL(sgsmix, sizeof(struct sgsm sgsmix_match, sgsmix_attach, NULL, NULL); static int -sgsmix_match(struct device *parent, struct cfdata *cf, void *aux) +sgsmix_match(struct device *parent, cfdata_t cf, void *aux) { struct i2c_attach_args *args = aux; int ret = -1; Index: sys/dev/i2c/x1226.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/x1226.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 x1226.c --- sys/dev/i2c/x1226.c 13 Jan 2007 18:42:45 -0000 1.10 +++ sys/dev/i2c/x1226.c 9 Jul 2007 22:39:01 -0000 @@ -61,7 +61,7 @@ struct xrtc_softc { }; static void xrtc_attach(struct device *, struct device *, void *); -static int xrtc_match(struct device *, struct cfdata *, void *); +static int xrtc_match(struct device *, cfdata_t, void *); CFATTACH_DECL(xrtc, sizeof(struct xrtc_softc), xrtc_match, xrtc_attach, NULL, NULL); @@ -86,7 +86,7 @@ static int xrtc_settime(struct todr_chip * xrtc_match() */ static int -xrtc_match(struct device *parent, struct cfdata *cf, void *arg) +xrtc_match(struct device *parent, cfdata_t cf, void *arg) { struct i2c_attach_args *ia = arg; Index: sys/dev/i2c/xbseeprom.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2c/xbseeprom.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 xbseeprom.c --- sys/dev/i2c/xbseeprom.c 6 Jan 2007 18:04:53 -0000 1.1 +++ sys/dev/i2c/xbseeprom.c 9 Jul 2007 22:39:01 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: xbseeprom.c, MALLOC_DEFINE(M_XBSEEPROM, "xbseeprom", "Xbox Serial EEPROM"); -static int xbseeprom_match(struct device *, struct cfdata *, void *); +static int xbseeprom_match(struct device *, cfdata_t, void *); static void xbseeprom_attach(struct device *, struct device *, void *); struct xbseeprom_data { @@ -113,7 +113,7 @@ CFATTACH_DECL(xbseeprom, sizeof(struct x xbseeprom_match, xbseeprom_attach, NULL, NULL); static int -xbseeprom_match(struct device *parent, struct cfdata *cf, void *opaque) +xbseeprom_match(struct device *parent, cfdata_t cf, void *opaque) { struct i2c_attach_args *ia; Index: sys/dev/i2o/dpti.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2o/dpti.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 dpti.c --- sys/dev/i2o/dpti.c 4 Mar 2007 06:01:47 -0000 1.33 +++ sys/dev/i2o/dpti.c 9 Jul 2007 22:39:01 -0000 @@ -139,7 +139,7 @@ static struct dpt_sig dpti_sig = { void dpti_attach(struct device *, struct device *, void *); int dpti_blinkled(struct dpti_softc *); int dpti_ctlrinfo(struct dpti_softc *, int, void *); -int dpti_match(struct device *, struct cfdata *, void *); +int dpti_match(struct device *, cfdata_t, void *); int dpti_passthrough(struct dpti_softc *, void *, struct proc *); int dpti_sysinfo(struct dpti_softc *, int, void *); @@ -157,7 +157,7 @@ CFATTACH_DECL(dpti, sizeof(struct dpti_s dpti_match, dpti_attach, NULL, NULL); int -dpti_match(struct device *parent, struct cfdata *match, void *aux) +dpti_match(struct device *parent, cfdata_t cfdata, void *aux) { struct iop_attach_args *ia; struct iop_softc *iop; Index: sys/dev/i2o/iop.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2o/iop.c,v retrieving revision 1.64 diff -d -p -u -u -r1.64 iop.c --- sys/dev/i2o/iop.c 4 Mar 2007 06:01:47 -0000 1.64 +++ sys/dev/i2o/iop.c 9 Jul 2007 22:39:03 -0000 @@ -68,8 +68,6 @@ __KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.64 #include #include -#include "locators.h" - #define POLL(ms, cond) \ do { \ int xi; \ @@ -483,10 +481,10 @@ static void iop_config_interrupts(struct device *self) { struct iop_attach_args ia; + prop_dictionary_t locs; struct iop_softc *sc, *iop; struct i2o_systab_entry *ste; int rv, i, niop; - int locs[IOPCF_NLOCS]; sc = device_private(self); LIST_INIT(&sc->sc_iilist); @@ -498,6 +496,13 @@ iop_config_interrupts(struct device *sel return; } + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return; + } + /* * Build the system table. */ @@ -590,9 +595,12 @@ iop_config_interrupts(struct device *sel */ 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); + + if (prop_dictionary_set_uint16(locs, "tid", I2O_TID_IOP)) + config_found_sm_loc(self, "iop", locs, &ia, iop_print, + config_stdsubmatch); + + prop_object_release(locs); /* * Start device configuration. @@ -799,12 +807,19 @@ static void iop_configure_devices(struct iop_softc *sc, int mask, int maskval) { struct iop_attach_args ia; + prop_dictionary_t locs; struct iop_initiator *ii; const struct i2o_lct_entry *le; struct device *dv; int i, j, nent; u_int usertid; - int locs[IOPCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dv)); + return; + } nent = sc->sc_nlctent; for (i = 0, le = sc->sc_lct->entry; i < nent; i++, le++) { @@ -841,7 +856,11 @@ iop_configure_devices(struct iop_softc * if (ii != NULL) continue; - locs[IOPCF_TID] = ia.ia_tid; + if (! prop_dictionary_set_uint16(locs, "tid", ia.ia_tid)) { + aprint_error("%s: could not set locators\n", + device_xname(&sc->sc_dv)); + break; + } dv = config_found_sm_loc(&sc->sc_dv, "iop", locs, &ia, iop_print, config_stdsubmatch); @@ -850,6 +869,8 @@ iop_configure_devices(struct iop_softc * strcpy(sc->sc_tidmap[i].it_dvname, dv->dv_xname); } } + + prop_object_release(locs); } /* Index: sys/dev/i2o/iopl.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2o/iopl.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 iopl.c --- sys/dev/i2o/iopl.c 4 Mar 2007 06:01:47 -0000 1.24 +++ sys/dev/i2o/iopl.c 9 Jul 2007 22:39:03 -0000 @@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.2 #include static void iopl_attach(struct device *, struct device *, void *); -static int iopl_match(struct device *, struct cfdata *, void *); +static int iopl_match(struct device *, cfdata_t, void *); static void iopl_error(struct iopl_softc *, u_int); static void iopl_getpg(struct iopl_softc *, int); @@ -178,7 +178,7 @@ static const struct iopl_media iopl_fddi * Match a supported device. */ static int -iopl_match(struct device *parent, struct cfdata *match, void *aux) +iopl_match(struct device *parent, cfdata_t cfdata, void *aux) { return (((struct iop_attach_args *)aux)->ia_class == I2O_CLASS_LAN); Index: sys/dev/i2o/iopsp.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2o/iopsp.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 iopsp.c --- sys/dev/i2o/iopsp.c 4 Mar 2007 06:01:47 -0000 1.27 +++ sys/dev/i2o/iopsp.c 9 Jul 2007 22:39:04 -0000 @@ -76,7 +76,7 @@ static void iopsp_attach(struct device * static void iopsp_intr(struct device *, struct iop_msg *, void *); static int iopsp_ioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); -static int iopsp_match(struct device *, struct cfdata *, void *); +static int iopsp_match(struct device *, cfdata_t, void *); static int iopsp_rescan(struct iopsp_softc *); static int iopsp_reconfig(struct device *); static void iopsp_scsipi_request(struct scsipi_channel *, @@ -89,7 +89,7 @@ CFATTACH_DECL(iopsp, sizeof(struct iopsp * Match a supported device. */ static int -iopsp_match(struct device *parent, struct cfdata *match, void *aux) +iopsp_match(struct device *parent, cfdata_t cfdata, void *aux) { struct iop_attach_args *ia; struct { Index: sys/dev/i2o/ld_iop.c =================================================================== RCS file: /cvsroot/src/sys/dev/i2o/ld_iop.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 ld_iop.c --- sys/dev/i2o/ld_iop.c 16 Nov 2006 01:32:50 -0000 1.23 +++ sys/dev/i2o/ld_iop.c 9 Jul 2007 22:39:04 -0000 @@ -89,7 +89,7 @@ static int ld_iop_dump(struct ld_softc * static int ld_iop_flush(struct ld_softc *); static void ld_iop_intr(struct device *, struct iop_msg *, void *); static void ld_iop_intr_event(struct device *, struct iop_msg *, void *); -static int ld_iop_match(struct device *, struct cfdata *, void *); +static int ld_iop_match(struct device *, cfdata_t, void *); static int ld_iop_start(struct ld_softc *, struct buf *); static void ld_iop_unconfig(struct ld_iop_softc *, int); @@ -117,7 +117,7 @@ static const char * const ld_iop_errors[ #endif static int -ld_iop_match(struct device *parent, struct cfdata *match, +ld_iop_match(struct device *parent, cfdata_t cfdata, void *aux) { struct iop_attach_args *ia; Index: sys/dev/ic/aac.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/aac.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 aac.c --- sys/dev/ic/aac.c 5 Jun 2007 04:04:13 -0000 1.34 +++ sys/dev/ic/aac.c 9 Jul 2007 22:39:04 -0000 @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.34 #include #include -#include "locators.h" +#include static int aac_new_intr(void *); static int aac_alloc_commands(struct aac_softc *); @@ -156,8 +156,9 @@ int aac_attach(struct aac_softc *sc) { struct aac_attach_args aaca; - int i, rv; - int locs[AACCF_NLOCS]; + prop_dictionary_t locs; + uint8_t i; + int rv; SIMPLEQ_INIT(&sc->sc_ccb_free); SIMPLEQ_INIT(&sc->sc_ccb_queue); @@ -193,17 +194,26 @@ aac_attach(struct aac_softc *sc) /* * Attach devices. */ + locs = prop_dictionary_create(); + if (locs == NULL) + return (ENOMEM); + for (i = 0; i < AAC_MAX_CONTAINERS; i++) { if (!sc->sc_hdr[i].hd_present) continue; aaca.aaca_unit = i; - locs[AACCF_UNIT] = i; + if (! prop_dictionary_set_uint8(locs, "unit", i)) { + prop_object_release(locs); + return (ENOMEM); + } config_found_sm_loc(&sc->sc_dv, "aac", locs, &aaca, aac_print, config_stdsubmatch); } + prop_object_release(locs); + /* * Enable interrupts, and register our shutdown hook. */ Index: sys/dev/ic/cac.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/cac.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 cac.c --- sys/dev/ic/cac.c 4 Mar 2007 06:01:51 -0000 1.40 +++ sys/dev/ic/cac.c 9 Jul 2007 22:39:31 -0000 @@ -62,8 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.40 #include #include -#include "locators.h" - static struct cac_ccb *cac_ccb_alloc(struct cac_softc *, int); static void cac_ccb_done(struct cac_softc *, struct cac_ccb *); static void cac_ccb_free(struct cac_softc *, struct cac_ccb *); @@ -96,12 +94,19 @@ cac_init(struct cac_softc *sc, const cha { struct cac_controller_info cinfo; struct cac_attach_args caca; + prop_dictionary_t locs; int error, rseg, size, i; bus_dma_segment_t seg; struct cac_ccb *ccb; - int locs[CACCF_NLOCS]; char firm[8]; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dv)); + return (ENOMEM); + } + if (intrstr != NULL) aprint_normal("%s: interrupting at %s\n", sc->sc_dv.dv_xname, intrstr); @@ -189,12 +194,18 @@ cac_init(struct cac_softc *sc, const cha for (i = 0; i < cinfo.num_drvs; i++) { caca.caca_unit = i; - locs[CACCF_UNIT] = i; + if (! prop_dictionary_set_uint32(locs, "unit", i)) { + aprint_error("%s: could not set locator\n", + device_xname(&sc->sc_dv)); + break; + } config_found_sm_loc(&sc->sc_dv, "cac", locs, &caca, cac_print, config_stdsubmatch); } + prop_object_release(locs); + /* Set our `shutdownhook' before we start any device activity. */ if (cac_sdh == NULL) cac_sdh = shutdownhook_establish(cac_shutdown, NULL); Index: sys/dev/ic/com_cpcbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/com_cpcbus.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 com_cpcbus.c --- sys/dev/ic/com_cpcbus.c 16 Aug 2006 21:28:36 -0000 1.8 +++ sys/dev/ic/com_cpcbus.c 9 Jul 2007 22:39:33 -0000 @@ -57,14 +57,14 @@ struct com_cpc_softc { void *sc_ih; }; -static int com_cpc_match(struct device *, struct cfdata *, void *); +static int com_cpc_match(struct device *, cfdata_t, void *); static void com_cpc_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_cpcbus, sizeof(struct com_cpc_softc), com_cpc_match, com_cpc_attach, NULL, NULL); int -com_cpc_match(struct device *parent, struct cfdata *cf, void *aux) +com_cpc_match(struct device *parent, cfdata_t cf, void *aux) { struct cpcbus_attach_args *caa = aux; Index: sys/dev/ic/com_upc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/com_upc.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 com_upc.c --- sys/dev/ic/com_upc.c 13 Jul 2006 22:56:02 -0000 1.8 +++ sys/dev/ic/com_upc.c 9 Jul 2007 22:39:33 -0000 @@ -41,14 +41,14 @@ __KERNEL_RCSID(0, "$NetBSD: com_upc.c,v #include #include -static int com_upc_match(struct device *, struct cfdata *, void *); +static int com_upc_match(struct device *, cfdata_t, void *); static void com_upc_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_upc, sizeof(struct com_softc), com_upc_match, com_upc_attach, NULL, NULL); static int -com_upc_match(struct device *parent, struct cfdata *cf, void *aux) +com_upc_match(struct device *parent, cfdata_t cf, void *aux) { /* upc_submatch does it all anyway */ Index: sys/dev/ic/cpc700.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/cpc700.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 cpc700.c --- sys/dev/ic/cpc700.c 11 Dec 2005 12:21:26 -0000 1.11 +++ sys/dev/ic/cpc700.c 9 Jul 2007 22:39:34 -0000 @@ -111,7 +111,7 @@ cpc_print(void *aux, const char *pnp) } static int -cpc_submatch(struct device *parent, struct cfdata *cf, +cpc_submatch(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct cpcbus_attach_args *caa = aux; Index: sys/dev/ic/depca.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/depca.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 depca.c --- sys/dev/ic/depca.c 16 Nov 2006 01:32:51 -0000 1.14 +++ sys/dev/ic/depca.c 9 Jul 2007 22:39:36 -0000 @@ -105,7 +105,7 @@ struct le_depca_softc { void *sc_ih; }; -int le_depca_match(struct device *, struct cfdata *, void *); +int le_depca_match(struct device *, cfdata_t, void *); void le_depca_attach(struct device *, struct device *, void *); CFATTACH_DECL(le_depca, sizeof(struct le_depca_softc), @@ -235,7 +235,7 @@ found: } int -le_depca_match(struct device *parent, struct cfdata *match, void *aux) +le_depca_match(struct device *parent, cfdata_t cfdata, void *aux) { struct depca_attach_args *da = aux; Index: sys/dev/ic/i82365.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/i82365.c,v retrieving revision 1.98 diff -d -p -u -u -r1.98 i82365.c --- sys/dev/ic/i82365.c 4 Mar 2007 06:01:55 -0000 1.98 +++ sys/dev/ic/i82365.c 9 Jul 2007 22:39:44 -0000 @@ -70,8 +70,6 @@ __KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1 #include #include -#include "locators.h" - #ifdef PCICDEBUG int pcic_debug = 0; #define DPRINTF(arg) if (pcic_debug) printf arg; @@ -396,8 +394,8 @@ pcic_attach_socket(h) struct pcic_handle *h; { struct pcmciabus_attach_args paa; + prop_dictionary_t locs; struct pcic_softc *sc = (struct pcic_softc *)h->ph_parent; - int locs[PCMCIABUSCF_NLOCS]; /* initialize the rest of the handle */ @@ -414,11 +412,22 @@ pcic_attach_socket(h) paa.iobase = sc->iobase; paa.iosize = sc->iosize; - locs[PCMCIABUSCF_CONTROLLER] = h->chip; - locs[PCMCIABUSCF_SOCKET] = h->socket; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("pcic_attach_socket: could not create locators"); + return; + } + + if (! prop_dictionary_set_uint8(locs, "controller", (u_int)h->chip) || + ! prop_dictionary_set_uint8(locs, "socket", (u_int)h->socket)) { + aprint_error("pcic_attach_socket: could not set locators"); + return; + } h->pcmcia = config_found_sm_loc(&sc->dev, "pcmciabus", locs, &paa, pcic_print, config_stdsubmatch); + prop_object_release(locs); + if (h->pcmcia == NULL) { h->flags &= ~PCIC_FLAG_SOCKETP; return; Index: sys/dev/ic/icp.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/icp.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 icp.c --- sys/dev/ic/icp.c 11 Mar 2007 22:16:32 -0000 1.24 +++ sys/dev/ic/icp.c 9 Jul 2007 22:39:48 -0000 @@ -111,8 +111,6 @@ __KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.24 #include #include -#include "locators.h" - int icp_async_event(struct icp_softc *, int); void icp_ccb_submit(struct icp_softc *icp, struct icp_ccb *ic); void icp_chain(struct icp_softc *); @@ -136,13 +134,20 @@ icp_init(struct icp_softc *icp, const ch { struct icp_attach_args icpa; struct icp_binfo binfo; + prop_dictionary_t locs; struct icp_ccb *ic; u_int16_t cdev_cnt; int i, j, state, feat, nsegs, rv; - int locs[ICPCF_NLOCS]; state = 0; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&icp->icp_dv)); + return (1); + } + if (intrstr != NULL) aprint_normal("%s: interrupting at %s\n", icp->icp_dv.dv_xname, intrstr); @@ -382,7 +387,12 @@ icp_init(struct icp_softc *icp, const ch icpa.icpa_unit = j + ICPA_UNIT_SCSI; - locs[ICPCF_UNIT] = j + ICPA_UNIT_SCSI; + if (! prop_dictionary_set_int32(locs, "unit", + (int32_t)(j + ICPA_UNIT_SCSI))) { + aprint_error("%s: could not set locator\n", + device_xname(&icp->icp_dv)); + goto bail_out; + } icp->icp_children[icpa.icpa_unit] = config_found_sm_loc(&icp->icp_dv, "icp", locs, @@ -400,7 +410,12 @@ icp_init(struct icp_softc *icp, const ch icpa.icpa_unit = j; - locs[ICPCF_UNIT] = j; + if (! prop_dictionary_set_int32(locs, "unit", + (int32_t)j)) { + aprint_error("%s: could not set locator\n", + device_xname(&icp->icp_dv)); + goto bail_out; + } icp->icp_children[icpa.icpa_unit] = config_found_sm_loc(&icp->icp_dv, "icp", locs, @@ -419,6 +434,7 @@ icp_init(struct icp_softc *icp, const ch if (icp_count++ == 0) mutex_init(&icp_ioctl_mutex, MUTEX_DEFAULT, IPL_NONE); + prop_object_release(locs); return (0); bail_out: @@ -435,7 +451,9 @@ icp_init(struct icp_softc *icp, const ch ICP_SCRATCH_SIZE); if (state > 0) bus_dmamem_free(icp->icp_dmat, icp->icp_scr_seg, nsegs); + bus_dmamap_destroy(icp->icp_dmat, icp->icp_scr_dmamap); + prop_object_release(locs); return (1); } @@ -452,8 +470,8 @@ void icp_rescan(struct icp_softc *icp, int unit) { struct icp_attach_args icpa; + prop_dictionary_t locs; u_int newsize, newtype; - int locs[ICPCF_NLOCS]; /* * NOTE: It is very important that the queue be frozen and not @@ -465,6 +483,13 @@ icp_rescan(struct icp_softc *icp, int un KASSERT(icp->icp_running == 0); KASSERT(unit < ICP_MAX_HDRIVES); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: rescan: could not create locators\n", + device_xname(&icp->icp_dv)); + return; + } + if (!icp_cmd(icp, ICP_CACHESERVICE, ICP_INFO, unit, 0, 0)) { #ifdef ICP_DEBUG printf("%s: rescan: unit %d ICP_INFO failed -> 0x%04x\n", @@ -526,12 +551,18 @@ icp_rescan(struct icp_softc *icp, int un icpa.icpa_unit = unit; - locs[ICPCF_UNIT] = unit; + if (! prop_dictionary_set_int32(locs, "unit", (int32_t)unit)) { + aprint_error("%s: rescan: could not set locator", + device_xname(&icp->icp_dv)); + prop_object_release(locs); + return; + } icp->icp_children[unit] = config_found_sm_loc(&icp->icp_dv, "icp", locs, &icpa, icp_print, config_stdsubmatch); } + prop_object_release(locs); icp_recompute_openings(icp); } Index: sys/dev/ic/icpsp.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/icpsp.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 icpsp.c --- sys/dev/ic/icpsp.c 4 Mar 2007 06:01:56 -0000 1.17 +++ sys/dev/ic/icpsp.c 9 Jul 2007 22:39:48 -0000 @@ -75,7 +75,7 @@ struct icpsp_softc { void icpsp_attach(struct device *, struct device *, void *); void icpsp_intr(struct icp_ccb *); -int icpsp_match(struct device *, struct cfdata *, void *); +int icpsp_match(struct device *, cfdata_t, void *); void icpsp_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); @@ -89,7 +89,7 @@ static const struct icp_servicecb icpsp_ }; int -icpsp_match(struct device *parent, struct cfdata *match, +icpsp_match(struct device *parent, cfdata_t cfdata, void *aux) { struct icp_attach_args *icpa; Index: sys/dev/ic/iic_cpcbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/iic_cpcbus.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 iic_cpcbus.c --- sys/dev/ic/iic_cpcbus.c 11 Dec 2005 12:21:27 -0000 1.7 +++ sys/dev/ic/iic_cpcbus.c 9 Jul 2007 22:39:50 -0000 @@ -54,14 +54,14 @@ struct iic_cpcbus_softc { void *sc_ih; }; -static int iic_cpcbus_match(struct device *, struct cfdata *, void *); +static int iic_cpcbus_match(struct device *, cfdata_t, void *); static void iic_cpcbus_attach(struct device *, struct device *, void *); CFATTACH_DECL(iic_cpcbus, sizeof(struct iic_cpcbus_softc), iic_cpcbus_match, iic_cpcbus_attach, NULL, NULL); int -iic_cpcbus_match(struct device *parent, struct cfdata *cf, void *aux) +iic_cpcbus_match(struct device *parent, cfdata_t cf, void *aux) { struct cpcbus_attach_args *caa = aux; Index: sys/dev/ic/ld_aac.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ld_aac.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 ld_aac.c --- sys/dev/ic/ld_aac.c 5 Jun 2007 04:04:14 -0000 1.15 +++ sys/dev/ic/ld_aac.c 9 Jul 2007 22:39:59 -0000 @@ -73,14 +73,14 @@ static void ld_aac_intr(struct aac_ccb * static int ld_aac_dobio(struct ld_aac_softc *, void *, int, int, int, struct buf *); static int ld_aac_dump(struct ld_softc *, void *, int, int); -static int ld_aac_match(struct device *, struct cfdata *, void *); +static int ld_aac_match(struct device *, cfdata_t, void *); static int ld_aac_start(struct ld_softc *, struct buf *); CFATTACH_DECL(ld_aac, sizeof(struct ld_aac_softc), ld_aac_match, ld_aac_attach, NULL, NULL); static int -ld_aac_match(struct device *parent, struct cfdata *match, +ld_aac_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/ic/ld_cac.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ld_cac.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 ld_cac.c --- sys/dev/ic/ld_cac.c 9 Feb 2007 21:55:27 -0000 1.17 +++ sys/dev/ic/ld_cac.c 9 Jul 2007 22:39:59 -0000 @@ -76,7 +76,7 @@ struct ld_cac_softc { void ld_cac_attach(struct device *, struct device *, void *); void ld_cac_done(struct device *, void *, int); int ld_cac_dump(struct ld_softc *, void *, int, int); -int ld_cac_match(struct device *, struct cfdata *, void *); +int ld_cac_match(struct device *, cfdata_t, void *); int ld_cac_start(struct ld_softc *, struct buf *); static const struct timeval ld_cac_serrintvl = { 60, 0 }; @@ -85,7 +85,7 @@ CFATTACH_DECL(ld_cac, sizeof(struct ld_c ld_cac_match, ld_cac_attach, NULL, NULL); int -ld_cac_match(struct device *parent, struct cfdata *match, +ld_cac_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/ic/ld_icp.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ld_icp.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 ld_icp.c --- sys/dev/ic/ld_icp.c 16 Nov 2006 01:32:51 -0000 1.16 +++ sys/dev/ic/ld_icp.c 9 Jul 2007 22:39:59 -0000 @@ -79,7 +79,7 @@ int ld_icp_dobio(struct ld_icp_softc *, int ld_icp_dump(struct ld_softc *, void *, int, int); int ld_icp_flush(struct ld_softc *); void ld_icp_intr(struct icp_ccb *); -int ld_icp_match(struct device *, struct cfdata *, void *); +int ld_icp_match(struct device *, cfdata_t, void *); int ld_icp_start(struct ld_softc *, struct buf *); void ld_icp_adjqparam(struct device *, int); @@ -92,7 +92,7 @@ static const struct icp_servicecb ld_icp }; int -ld_icp_match(struct device *parent, struct cfdata *match, +ld_icp_match(struct device *parent, cfdata_t cfdata, void *aux) { struct icp_attach_args *icpa; Index: sys/dev/ic/ld_mlx.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ld_mlx.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 ld_mlx.c --- sys/dev/ic/ld_mlx.c 16 Nov 2006 01:32:51 -0000 1.13 +++ sys/dev/ic/ld_mlx.c 9 Jul 2007 22:39:59 -0000 @@ -78,14 +78,14 @@ static int ld_mlx_dobio(struct ld_mlx_so struct buf *); static int ld_mlx_dump(struct ld_softc *, void *, int, int); static void ld_mlx_handler(struct mlx_ccb *); -static int ld_mlx_match(struct device *, struct cfdata *, void *); +static int ld_mlx_match(struct device *, cfdata_t, void *); static int ld_mlx_start(struct ld_softc *, struct buf *); CFATTACH_DECL(ld_mlx, sizeof(struct ld_mlx_softc), ld_mlx_match, ld_mlx_attach, ld_mlx_detach, NULL); static int -ld_mlx_match(struct device *parent, struct cfdata *match, +ld_mlx_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/ic/lpt_upc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/lpt_upc.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 lpt_upc.c --- sys/dev/ic/lpt_upc.c 11 Dec 2005 12:21:27 -0000 1.7 +++ sys/dev/ic/lpt_upc.c 9 Jul 2007 22:40:00 -0000 @@ -40,14 +40,14 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_upc.c,v #include #include -static int lpt_upc_match(struct device *, struct cfdata *, void *); +static int lpt_upc_match(struct device *, cfdata_t, void *); static void lpt_upc_attach(struct device *, struct device *, void *); CFATTACH_DECL(lpt_upc, sizeof(struct lpt_softc), lpt_upc_match, lpt_upc_attach, NULL, NULL); static int -lpt_upc_match(struct device *parent, struct cfdata *cf, void *aux) +lpt_upc_match(struct device *parent, cfdata_t cf, void *aux) { /* upc_submatch does it all anyway */ Index: sys/dev/ic/mb86960.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/mb86960.c,v retrieving revision 1.66 diff -d -p -u -u -r1.66 mb86960.c --- sys/dev/ic/mb86960.c 4 Mar 2007 06:01:58 -0000 1.66 +++ sys/dev/ic/mb86960.c 9 Jul 2007 22:40:01 -0000 @@ -184,7 +184,7 @@ mb86960_attach(struct mb86960_softc *sc, void mb86960_config(struct mb86960_softc *sc, int *media, int nmedia, int defmedia) { - struct cfdata *cf = device_cfdata(&sc->sc_dev); + cfdata_t cf = device_cfdata(&sc->sc_dev); struct ifnet *ifp = &sc->sc_ec.ec_if; int i; @@ -213,8 +213,8 @@ mb86960_config(struct mb86960_softc *sc, #endif /* Modify hardware config if it is requested. */ - if ((cf->cf_flags & FE_FLAGS_OVERRIDE_DLCR6) != 0) - sc->proto_dlcr6 = cf->cf_flags & FE_FLAGS_DLCR6_VALUE; + if ((cfdata_flags(cf) & FE_FLAGS_OVERRIDE_DLCR6) != 0) + sc->proto_dlcr6 = cfdata_flags(cf) & FE_FLAGS_DLCR6_VALUE; /* Find TX buffer size, based on the hardware dependent proto. */ switch (sc->proto_dlcr6 & FE_D6_TXBSIZ) { Index: sys/dev/ic/mlx.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/mlx.c,v retrieving revision 1.51 diff -d -p -u -u -r1.51 mlx.c --- sys/dev/ic/mlx.c 4 Mar 2007 06:01:58 -0000 1.51 +++ sys/dev/ic/mlx.c 9 Jul 2007 22:40:05 -0000 @@ -104,8 +104,6 @@ __KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.51 #include #include -#include "locators.h" - #define MLX_TIMEOUT 60 #ifdef DIAGNOSTIC @@ -550,6 +548,7 @@ mlx_describe(struct mlx_softc *mlx) static void mlx_configure(struct mlx_softc *mlx, int waitok) { + prop_dictionary_t locs; struct mlx_enquiry *me; struct mlx_enquiry_old *meo; struct mlx_enq_sys_drive *mes; @@ -557,7 +556,13 @@ mlx_configure(struct mlx_softc *mlx, int struct mlx_attach_args mlxa; int i, nunits; u_int size; - int locs[MLXCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&mlx->mlx_dv)); + return; + } mlx->mlx_flags |= MLXF_RESCANNING; @@ -622,7 +627,11 @@ mlx_configure(struct mlx_softc *mlx, int */ mlxa.mlxa_unit = i; - locs[MLXCF_UNIT] = i; + if (! prop_dictionary_set_uint32(locs, "unit", i)) { + aprint_error("%s: could not create locators\n", + device_xname(&mlx->mlx_dv)); + break; + } ms->ms_dv = config_found_sm_loc(&mlx->mlx_dv, "mlx", locs, &mlxa, mlx_print, config_stdsubmatch); @@ -636,6 +645,7 @@ mlx_configure(struct mlx_softc *mlx, int mlx->mlx_max_queuecnt % nunits); out: mlx->mlx_flags &= ~MLXF_RESCANNING; + prop_object_release(locs); } /* Index: sys/dev/ic/ncr53c9x.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ncr53c9x.c,v retrieving revision 1.127 diff -d -p -u -u -r1.127 ncr53c9x.c --- sys/dev/ic/ncr53c9x.c 12 Mar 2007 18:18:30 -0000 1.127 +++ sys/dev/ic/ncr53c9x.c 9 Jul 2007 22:40:11 -0000 @@ -302,7 +302,7 @@ ncr53c9x_attach(sc) } /* Reset state & bus */ - sc->sc_cfflags = device_cfdata(&sc->sc_dev)->cf_flags; + sc->sc_cfflags = cfdata_flags(device_cfdata(&sc->sc_dev)); sc->sc_state = 0; ncr53c9x_init(sc, 1); Index: sys/dev/ic/opl.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/opl.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 opl.c --- sys/dev/ic/opl.c 16 Nov 2006 01:32:52 -0000 1.31 +++ sys/dev/ic/opl.c 9 Jul 2007 22:40:15 -0000 @@ -148,6 +148,7 @@ void opl_attach(sc) struct opl_softc *sc; { + u_int flags; int i; if (!opl_find(sc)) { @@ -173,8 +174,10 @@ opl_attach(sc) /* Set up panpot */ sc->panl = OPL_VOICE_TO_LEFT; sc->panr = OPL_VOICE_TO_RIGHT; - if (sc->model == OPL_3 && - device_cfdata(&sc->mididev.dev)->cf_flags & OPL_FLAGS_SWAP_LR) { + + flags = cfdata_flags(device_cfdata(&sc->mididev.dev)); + + if (sc->model == OPL_3 && (flags & OPL_FLAGS_SWAP_LR) != 0){ sc->panl = OPL_VOICE_TO_RIGHT; sc->panr = OPL_VOICE_TO_LEFT; printf(": LR swapped"); Index: sys/dev/ic/pckbc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/pckbc.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 pckbc.c --- sys/dev/ic/pckbc.c 11 Dec 2005 12:21:28 -0000 1.35 +++ sys/dev/ic/pckbc.c 9 Jul 2007 22:40:17 -0000 @@ -48,7 +48,6 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1. #include #include "rnd.h" -#include "locators.h" #if NRND > 0 #include Index: sys/dev/ic/tcic2.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/tcic2.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 tcic2.c --- sys/dev/ic/tcic2.c 16 Nov 2006 01:32:52 -0000 1.26 +++ sys/dev/ic/tcic2.c 9 Jul 2007 22:40:30 -0000 @@ -51,8 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1. #include #include -#include "locators.h" - #ifdef TCICDEBUG int tcic_debug = 1; #define DPRINTF(arg) if (tcic_debug) printf arg; @@ -410,7 +408,14 @@ tcic_attach_socket(h) struct tcic_handle *h; { struct pcmciabus_attach_args paa; - int locs[PCMCIABUSCF_NLOCS]; + prop_dictionary_t locs; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("tcic_attach_socket: could not create " + "locators\n"); + return; + } /* initialize the rest of the handle */ @@ -427,8 +432,12 @@ tcic_attach_socket(h) paa.iobase = h->sc->iobase; paa.iosize = h->sc->iosize; - locs[PCMCIABUSCF_CONTROLLER] = 0; - locs[PCMCIABUSCF_SOCKET] = h->sock; + if (! prop_dictionary_set_uint32(locs, "controller", 0) || + ! prop_dictionary_set_uint32(locs, "socket", h->sock)) { + aprint_error("tcic_attach_socket: could not set locators\n"); + prop_object_release(locs); + return; + } h->pcmcia = config_found_sm_loc(&h->sc->dev, "pcmciabus", locs, &paa, tcic_print, config_stdsubmatch); @@ -437,6 +446,8 @@ tcic_attach_socket(h) if (h->pcmcia) tcic_init_socket(h); + + prop_object_release(locs); } void Index: sys/dev/ic/timer_cpcbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/timer_cpcbus.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 timer_cpcbus.c --- sys/dev/ic/timer_cpcbus.c 11 Dec 2005 12:21:28 -0000 1.7 +++ sys/dev/ic/timer_cpcbus.c 9 Jul 2007 22:40:31 -0000 @@ -51,14 +51,14 @@ struct cpctim_softc { void *sc_ih; }; -static int cpctim_match(struct device *, struct cfdata *, void *); +static int cpctim_match(struct device *, cfdata_t, void *); static void cpctim_attach(struct device *, struct device *, void *); CFATTACH_DECL(cpctim, sizeof(struct cpctim_softc), cpctim_match, cpctim_attach, NULL, NULL); int -cpctim_match(struct device *parent, struct cfdata *cf, void *aux) +cpctim_match(struct device *parent, cfdata_t cf, void *aux) { struct cpcbus_attach_args *caa = aux; Index: sys/dev/ic/wdc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v retrieving revision 1.248 diff -d -p -u -u -r1.248 wdc.c --- sys/dev/ic/wdc.c 16 Apr 2007 05:25:36 -0000 1.248 +++ sys/dev/ic/wdc.c 9 Jul 2007 22:40:38 -0000 @@ -105,8 +105,6 @@ __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.24 #include #include -#include "locators.h" - #include "atapibus.h" #include "wd.h" #include "sata.h" Index: sys/dev/ic/wdc_upc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/wdc_upc.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 wdc_upc.c --- sys/dev/ic/wdc_upc.c 1 Oct 2006 21:50:33 -0000 1.23 +++ sys/dev/ic/wdc_upc.c 9 Jul 2007 22:40:38 -0000 @@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v #include #include -static int wdc_upc_match(struct device *, struct cfdata *, void *); +static int wdc_upc_match(struct device *, cfdata_t, void *); static void wdc_upc_attach(struct device *, struct device *, void *); struct wdc_upc_softc { @@ -59,7 +59,7 @@ CFATTACH_DECL(wdc_upc, sizeof(struct wdc wdc_upc_match, wdc_upc_attach, NULL, NULL); static int -wdc_upc_match(struct device *parent, struct cfdata *cf, void *aux) +wdc_upc_match(struct device *parent, cfdata_t cf, void *aux) { /* upc_submatch does it all anyway */ Index: sys/dev/ic/we.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/we.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 we.c --- sys/dev/ic/we.c 4 Mar 2007 06:02:03 -0000 1.12 +++ sys/dev/ic/we.c 9 Jul 2007 22:40:38 -0000 @@ -150,11 +150,11 @@ we_config(self, wsc, typestr) /* * Allow user to override 16-bit mode. 8-bit takes precedence. */ - if (device_cfdata(self)->cf_flags & DP8390_FORCE_16BIT_MODE) { + if (cfdata_flags(device_cfdata(self)) & DP8390_FORCE_16BIT_MODE) { wsc->sc_flags |= WE_16BIT_ENABLE; forced_16bit = 1; } - if (device_cfdata(self)->cf_flags & DP8390_FORCE_8BIT_MODE) + if (cfdata_flags(device_cfdata(self)) & DP8390_FORCE_8BIT_MODE) wsc->sc_flags &= ~WE_16BIT_ENABLE; /* Registers are linear. */ @@ -255,7 +255,7 @@ we_config(self, wsc, typestr) sc->mem_start = 0; /* sc->mem_size has to be set by frontend */ - sc->sc_flags = device_cfdata(self)->cf_flags; + sc->sc_flags = cfdata_flags(device_cfdata(self)); /* Do generic parts of attach. */ if (wsc->sc_type & WE_SOFTCONFIG) Index: sys/dev/ic/z8530tty.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/z8530tty.c,v retrieving revision 1.113 diff -d -p -u -u -r1.113 z8530tty.c --- sys/dev/ic/z8530tty.c 4 Mar 2007 06:02:04 -0000 1.113 +++ sys/dev/ic/z8530tty.c 9 Jul 2007 22:40:40 -0000 @@ -250,7 +250,7 @@ struct zstty_softc { }; /* Definition of the driver for autoconfig. */ -static int zstty_match(struct device *, struct cfdata *, void *); +static int zstty_match(struct device *, cfdata_t, void *); static void zstty_attach(struct device *, struct device *, void *); CFATTACH_DECL(zstty, sizeof(struct zstty_softc), Index: sys/dev/ieee1394/firewire.c =================================================================== RCS file: /cvsroot/src/sys/dev/ieee1394/firewire.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 firewire.c --- sys/dev/ieee1394/firewire.c 21 Apr 2007 15:27:43 -0000 1.13 +++ sys/dev/ieee1394/firewire.c 9 Jul 2007 22:40:41 -0000 @@ -90,8 +90,6 @@ #include #include #include - -#include "locators.h" #endif struct crom_src_buf { @@ -191,7 +189,7 @@ static int firewire_shutdown (device_ #endif static device_t firewire_add_child (device_t, int, const char *, int); #elif defined(__NetBSD__) -int firewirematch (struct device *, struct cfdata *, void *); +int firewirematch (struct device *, cfdata_t, void *); void firewireattach (struct device *, struct device *, void *); int firewiredetach (struct device *, int); int firewire_print (void *, const char *); @@ -417,8 +415,7 @@ firewire_probe(device_t dev) } #elif defined(__NetBSD__) int -firewirematch(struct device *parent, struct cfdata *cf, - void *aux) +firewirematch(struct device *parent, cfdata_t cfdata, void *aux) { struct fwbus_attach_args *faa = (struct fwbus_attach_args *)aux; Index: sys/dev/ieee1394/fw_port.h =================================================================== RCS file: /cvsroot/src/sys/dev/ieee1394/fw_port.h,v retrieving revision 1.22 diff -d -p -u -u -r1.22 fw_port.h --- sys/dev/ieee1394/fw_port.h 21 Apr 2007 15:27:43 -0000 1.22 +++ sys/dev/ieee1394/fw_port.h 9 Jul 2007 22:40:42 -0000 @@ -840,26 +840,44 @@ struct fwbus_attach_args { do { \ struct firewire_softc *sc = (struct firewire_softc *)fc->bdev;\ struct firewire_dev_list *devlist, *elm; \ - int locs[IEEE1394IFCF_NLOCS]; \ + prop_dictionary_t locs; \ + \ + locs = prop_dictionary_create(); \ + if (locs == NULL) { \ + printf("could not create locators\n"); \ + break; \ + } \ \ devlist = malloc( \ sizeof (struct firewire_dev_list), M_DEVBUF, M_NOWAIT); \ if (devlist == NULL) { \ + prop_object_release(locs); \ printf("memory allocation failed\n"); \ break; \ } \ \ - locs[IEEE1394IFCF_EUIHI] = fwdev->eui.hi; \ - locs[IEEE1394IFCF_EUILO] = fwdev->eui.lo; \ + /* XXXfreza: if EUI fits 64b, make it so! */ \ + if (! prop_dictionary_set_uint64(locs, "euihi", \ + fwdev->eui.hi) || \ + ! prop_dictionary_set_uint64(locs, "euilo", \ + fwdev->eui.lo)) { \ + printf("could not set locators\n"); \ + prop_object_release(locs); \ + free(devlist, M_DEVBUF); \ + break; \ + } \ \ fwa.fwdev = fwdev; \ fwdev->sbp = config_found_sm_loc(sc->dev, "ieee1394if", \ locs, &fwa, firewire_print, config_stdsubmatch); \ if (fwdev->sbp == NULL) { \ + prop_object_release(locs); \ free(devlist, M_DEVBUF); \ break; \ } \ \ + prop_object_release(locs); \ + \ devlist->fwdev = fwdev; \ devlist->dev = fwdev->sbp; \ \ Index: sys/dev/ieee1394/if_fwip.c =================================================================== RCS file: /cvsroot/src/sys/dev/ieee1394/if_fwip.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 if_fwip.c --- sys/dev/ieee1394/if_fwip.c 21 Apr 2007 15:27:44 -0000 1.8 +++ sys/dev/ieee1394/if_fwip.c 9 Jul 2007 22:40:44 -0000 @@ -115,7 +115,7 @@ #define TX_MAX_QUEUE (FWMAXQUEUE - 1) #if defined(__NetBSD__) -int fwipmatch (struct device *, struct cfdata *, void *); +int fwipmatch (struct device *, cfdata_t, void *); void fwipattach (struct device *, struct device *, void *); int fwipdetach (struct device *, int); int fwipactivate (struct device *, enum devact); @@ -241,7 +241,7 @@ fwip_probe(device_t dev) } #elif defined(__NetBSD__) int -fwipmatch(struct device *parent, struct cfdata *cf, void *aux) +fwipmatch(struct device *parent, cfdata_t cf, void *aux) { struct fw_attach_args *fwa = aux; Index: sys/dev/ieee1394/sbp.c =================================================================== RCS file: /cvsroot/src/sys/dev/ieee1394/sbp.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 sbp.c --- sys/dev/ieee1394/sbp.c 21 Apr 2007 15:27:44 -0000 1.16 +++ sys/dev/ieee1394/sbp.c 9 Jul 2007 22:40:44 -0000 @@ -111,8 +111,6 @@ #include #include #include - -#include "locators.h" #endif #define ccb_sdev_ptr spriv_ptr0 @@ -432,7 +430,7 @@ struct sbp_softc { }; #if defined(__NetBSD__) -int sbpmatch (struct device *, struct cfdata *, void *); +int sbpmatch (struct device *, cfdata_t, void *); void sbpattach (struct device *parent, struct device *self, void *aux); int sbpdetach (struct device *self, int flags); #endif @@ -574,7 +572,7 @@ END_DEBUG } #elif defined(__NetBSD__) int -sbpmatch(struct device *parent, struct cfdata *cf, void *aux) +sbpmatch(struct device *parent, cfdata_t cf, void *aux) { struct fw_attach_args *fwa = aux; Index: sys/dev/if_ndis/if_ndis_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/if_ndis/if_ndis_pci.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 if_ndis_pci.c --- sys/dev/if_ndis/if_ndis_pci.c 29 May 2006 20:49:03 -0000 1.7 +++ sys/dev/if_ndis/if_ndis_pci.c 9 Jul 2007 22:40:46 -0000 @@ -108,7 +108,7 @@ static int ndis_probe_pci (device_t); static int ndis_attach_pci (device_t); #else /* __NetBSD__ */ /*static*/ int ndis_probe_pci(struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux); /*static*/ void ndis_attach_pci(struct device *parent, struct device *self, @@ -263,7 +263,7 @@ void load_ndisdrv(void *arg) } /*static*/ int -ndis_probe_pci(struct device *parent, struct cfdata *match, void *aux) +ndis_probe_pci(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; int vendor = PCI_VENDOR(pa->pa_id); Index: sys/dev/ir/cir.c =================================================================== RCS file: /cvsroot/src/sys/dev/ir/cir.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 cir.c --- sys/dev/ir/cir.c 4 Mar 2007 06:02:09 -0000 1.17 +++ sys/dev/ir/cir.c 9 Jul 2007 22:40:46 -0000 @@ -67,7 +67,7 @@ const struct cdevsw cir_cdevsw = { D_OTHER }; -int cir_match(struct device *parent, struct cfdata *match, void *aux); +int cir_match(struct device *parent, cfdata_t match, void *aux); void cir_attach(struct device *parent, struct device *self, void *aux); int cir_activate(struct device *self, enum devact act); int cir_detach(struct device *self, int flags); @@ -80,7 +80,7 @@ extern struct cfdriver cir_cd; #define CIRUNIT(dev) (minor(dev)) int -cir_match(struct device *parent, struct cfdata *match, void *aux) +cir_match(struct device *parent, cfdata_t match, void *aux) { struct ir_attach_args *ia = aux; Index: sys/dev/ir/irframe.c =================================================================== RCS file: /cvsroot/src/sys/dev/ir/irframe.c,v retrieving revision 1.39 diff -d -p -u -u -r1.39 irframe.c --- sys/dev/ir/irframe.c 6 Mar 2007 20:45:59 -0000 1.39 +++ sys/dev/ir/irframe.c 9 Jul 2007 22:40:46 -0000 @@ -78,7 +78,7 @@ const struct cdevsw irframe_cdevsw = { nostop, notty, irframepoll, nommap, irframekqfilter, D_OTHER, }; -int irframe_match(struct device *parent, struct cfdata *match, void *aux); +int irframe_match(struct device *parent, cfdata_t match, void *aux); int irframe_activate(struct device *self, enum devact act); Static int irf_set_params(struct irframe_softc *sc, struct irda_params *p); @@ -97,7 +97,7 @@ extern struct cfdriver irframe_cd; #define IRFRAMEUNIT(dev) (minor(dev)) int -irframe_match(struct device *parent, struct cfdata *match, +irframe_match(struct device *parent, cfdata_t match, void *aux) { struct ir_attach_args *ia = aux; Index: sys/dev/ir/irframe_tty.c =================================================================== RCS file: /cvsroot/src/sys/dev/ir/irframe_tty.c,v retrieving revision 1.43 diff -d -p -u -u -r1.43 irframe_tty.c --- sys/dev/ir/irframe_tty.c 8 Mar 2007 19:35:44 -0000 1.43 +++ sys/dev/ir/irframe_tty.c 9 Jul 2007 22:40:46 -0000 @@ -257,7 +257,6 @@ irframetopen(dev_t dev, struct tty *tp) struct lwp *l = curlwp; /* XXX */ struct irframet_softc *sc; int error, s; - struct cfdata *cfdata; struct ir_attach_args ia; DPRINTF(("%s\n", __FUNCTION__)); @@ -279,12 +278,8 @@ irframetopen(dev_t dev, struct tty *tp) } } - cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK); - cfdata->cf_name = "irframe"; - cfdata->cf_atname = "irframet"; - cfdata->cf_fstate = FSTATE_STAR; - cfdata->cf_unit = 0; - sc = (struct irframet_softc *)config_attach_pseudo(cfdata); + sc = (struct irframet_softc *)config_attach_pseudo("irframe", + "irframet", WILDUNIT); /* XXX should be done in irframet_attach() */ ia.ia_methods = &irframet_methods; @@ -319,7 +314,6 @@ irframetclose(struct tty *tp, int flag) { struct irframet_softc *sc = (struct irframet_softc *)tp->t_sc; int s; - struct cfdata *cfdata; DPRINTF(("%s: tp=%p\n", __FUNCTION__, tp)); @@ -332,11 +326,8 @@ irframetclose(struct tty *tp, int flag) printf("%s detached from tty%02d\n", sc->sc_irp.sc_dev.dv_xname, minor(tp->t_dev)); - if (sc->sc_tp == tp) { - cfdata = sc->sc_irp.sc_dev.dv_cfdata; + if (sc->sc_tp == tp) config_detach(&sc->sc_irp.sc_dev, 0); - free(cfdata, M_DEVBUF); - } } splx(s); return (0); Index: sys/dev/isa/addcom_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/addcom_isa.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 addcom_isa.c --- sys/dev/isa/addcom_isa.c 16 Nov 2006 01:33:00 -0000 1.15 +++ sys/dev/isa/addcom_isa.c 9 Jul 2007 22:40:46 -0000 @@ -105,7 +105,7 @@ static int slave_iobases[8] = { 0x208 }; -int addcomprobe(struct device *, struct cfdata *, void *); +int addcomprobe(struct device *, cfdata_t, void *); void addcomattach(struct device *, struct device *, void *); int addcomintr(void *); @@ -113,7 +113,7 @@ CFATTACH_DECL(addcom_isa, sizeof(struct addcomprobe, addcomattach, NULL, NULL); int -addcomprobe(struct device *parent, struct cfdata *self, +addcomprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/adv_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/adv_isa.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 adv_isa.c --- sys/dev/isa/adv_isa.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/adv_isa.c 9 Jul 2007 22:40:47 -0000 @@ -101,7 +101,7 @@ static int asc_ioport[ASC_IOADR_TABLE_MA /******************************************************************************/ -int adv_isa_probe(struct device *, struct cfdata *, void *); +int adv_isa_probe(struct device *, cfdata_t, void *); void adv_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(adv_isa, sizeof(ASC_SOFTC), @@ -110,8 +110,7 @@ CFATTACH_DECL(adv_isa, sizeof(ASC_SOFTC) /******************************************************************************/ int -adv_isa_probe( struct device *parent, struct cfdata *match, - void *aux) +adv_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/aha_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/aha_isa.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 aha_isa.c --- sys/dev/isa/aha_isa.c 16 Nov 2006 01:33:00 -0000 1.22 +++ sys/dev/isa/aha_isa.c 9 Jul 2007 22:40:47 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: aha_isa.c,v #define AHA_ISA_IOSIZE 4 -int aha_isa_probe(struct device *, struct cfdata *, void *); +int aha_isa_probe(struct device *, cfdata_t, void *); void aha_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(aha_isa, sizeof(struct aha_softc), @@ -70,8 +70,7 @@ CFATTACH_DECL(aha_isa, sizeof(struct aha * the actual probe routine to check it out. */ int -aha_isa_probe(struct device *parent, struct cfdata *match, - void *aux) +aha_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/aic_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/aic_isa.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 aic_isa.c --- sys/dev/isa/aic_isa.c 16 Nov 2006 01:33:00 -0000 1.19 +++ sys/dev/isa/aic_isa.c 9 Jul 2007 22:40:47 -0000 @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: aic_isa.c,v #include #include -int aic_isa_probe(struct device *, struct cfdata *, void *); +int aic_isa_probe(struct device *, cfdata_t, void *); struct aic_isa_softc { struct aic_softc sc_aic; /* real "aic" softc */ @@ -98,8 +98,7 @@ CFATTACH_DECL(aic_isa, sizeof(struct aic * returns non-zero value if a controller is found. */ int -aic_isa_probe(struct device *parent, struct cfdata *match, - void *aux) +aic_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/aria.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/aria.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 aria.c --- sys/dev/isa/aria.c 16 Nov 2006 01:33:00 -0000 1.27 +++ sys/dev/isa/aria.c 9 Jul 2007 22:40:47 -0000 @@ -134,7 +134,7 @@ struct aria_softc { int sc_sendcmd_err; }; -int ariaprobe(struct device *, struct cfdata *, void *); +int ariaprobe(struct device *, cfdata_t, void *); void ariaattach(struct device *, struct device *, void *); void ariaclose(void *); int ariaopen(void *, int); @@ -238,7 +238,7 @@ const struct audio_hw_if aria_hw_if = { * Probe for the aria hardware. */ int -ariaprobe(struct device *parent, struct cfdata *cf, void *aux) +ariaprobe(struct device *parent, cfdata_t cf, void *aux) { bus_space_handle_t ioh; struct isa_attach_args *ia; Index: sys/dev/isa/ast.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/ast.c,v retrieving revision 1.58 diff -d -p -u -u -r1.58 ast.c --- sys/dev/isa/ast.c 16 Nov 2006 01:33:00 -0000 1.58 +++ sys/dev/isa/ast.c 9 Jul 2007 22:40:47 -0000 @@ -64,7 +64,7 @@ struct ast_softc { bus_space_handle_t sc_slaveioh[NSLAVES]; }; -int astprobe(struct device *, struct cfdata *, void *); +int astprobe(struct device *, cfdata_t, void *); void astattach(struct device *, struct device *, void *); int astintr(void *); @@ -72,7 +72,7 @@ CFATTACH_DECL(ast, sizeof(struct ast_sof astprobe, astattach, NULL, NULL); int -astprobe(struct device *parent, struct cfdata *self, +astprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/atppc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/atppc_isa.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 atppc_isa.c --- sys/dev/isa/atppc_isa.c 4 Mar 2007 06:02:10 -0000 1.10 +++ sys/dev/isa/atppc_isa.c 9 Jul 2007 22:40:47 -0000 @@ -76,7 +76,7 @@ struct atppc_isa_softc { }; /* Probe and attach functions for a atppc device on the ISA bus. */ -static int atppc_isa_probe(struct device *, struct cfdata *, void *); +static int atppc_isa_probe(struct device *, cfdata_t, void *); static void atppc_isa_attach(struct device *, struct device *, void *); static int atppc_isa_dma_start(struct atppc_softc *, void *, u_int, @@ -96,7 +96,7 @@ CFATTACH_DECL(atppc_isa, sizeof(struct a * lpt_isa_probe() in lpt.c and atppc_detect_port() from FreeBSD's ppc.c. */ static int -atppc_isa_probe(struct device *parent, struct cfdata *cf, void *aux) +atppc_isa_probe(struct device *parent, cfdata_t cf, void *aux) { bus_space_handle_t ioh; struct isa_attach_args *ia = aux; Index: sys/dev/isa/attimer_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/attimer_isa.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 attimer_isa.c --- sys/dev/isa/attimer_isa.c 10 Dec 2006 00:40:10 -0000 1.5 +++ sys/dev/isa/attimer_isa.c 9 Jul 2007 22:40:47 -0000 @@ -84,15 +84,14 @@ __KERNEL_RCSID(0, "$NetBSD: attimer_isa. #include #include -static int attimer_isa_match(struct device *, struct cfdata *, void *); +static int attimer_isa_match(struct device *, cfdata_t, void *); static void attimer_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(attimer_isa, sizeof(struct attimer_softc), attimer_isa_match, attimer_isa_attach, NULL, NULL); static int -attimer_isa_match(struct device *parent, struct cfdata *match, - void *aux) +attimer_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t att_ioh; Index: sys/dev/isa/aztech.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/aztech.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 aztech.c --- sys/dev/isa/aztech.c 16 Nov 2006 01:33:00 -0000 1.12 +++ sys/dev/isa/aztech.c 9 Jul 2007 22:40:47 -0000 @@ -77,7 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: aztech.c,v 1 #define AZ_DATA_ON (1 << 7) #define AZ_DATA_OFF (0 << 7) -int az_probe(struct device *, struct cfdata *, void *); +int az_probe(struct device *, cfdata_t, void *); void az_attach(struct device *, struct device * self, void *); int az_get_info(void *, struct radio_info *); @@ -118,7 +118,7 @@ u_int8_t az_conv_vol(u_int8_t); u_int8_t az_unconv_vol(u_int8_t); int -az_probe(struct device *parent, struct cfdata *cf, void *aux) +az_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/bha_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/bha_isa.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 bha_isa.c --- sys/dev/isa/bha_isa.c 16 Nov 2006 01:33:00 -0000 1.29 +++ sys/dev/isa/bha_isa.c 9 Jul 2007 22:40:47 -0000 @@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: bha_isa.c,v #define BHA_ISA_IOSIZE 4 -int bha_isa_probe(struct device *, struct cfdata *, void *); +int bha_isa_probe(struct device *, cfdata_t, void *); void bha_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(bha_isa, sizeof(struct bha_softc), @@ -69,7 +69,7 @@ CFATTACH_DECL(bha_isa, sizeof(struct bha * the actual probe routine to check it out. */ int -bha_isa_probe(struct device *parent, struct cfdata *match, +bha_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/boca.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/boca.c,v retrieving revision 1.47 diff -d -p -u -u -r1.47 boca.c --- sys/dev/isa/boca.c 16 Nov 2006 01:33:00 -0000 1.47 +++ sys/dev/isa/boca.c 9 Jul 2007 22:40:47 -0000 @@ -67,7 +67,7 @@ struct boca_softc { struct callout fixup; }; -int bocaprobe(struct device *, struct cfdata *, void *); +int bocaprobe(struct device *, cfdata_t, void *); void bocaattach(struct device *, struct device *, void *); int bocaintr(void *); void boca_fixup(void *); @@ -76,7 +76,7 @@ CFATTACH_DECL(boca, sizeof(struct boca_s bocaprobe, bocaattach, NULL, NULL); int -bocaprobe(struct device *parent, struct cfdata *self, +bocaprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/cec.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/cec.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 cec.c --- sys/dev/isa/cec.c 10 Jan 2007 20:38:32 -0000 1.5 +++ sys/dev/isa/cec.c 9 Jul 2007 22:40:47 -0000 @@ -94,7 +94,7 @@ struct cec_softc { struct callout sc_timeout_ch; }; -int cecprobe(struct device *, struct cfdata *, void *); +int cecprobe(struct device *, cfdata_t, void *); void cecattach(struct device *, struct device *, void *); CFATTACH_DECL(cec, sizeof(struct cec_softc), @@ -145,7 +145,7 @@ int cecwtimeout = 0x10000; int cecdmathresh = 3; int -cecprobe(struct device *parent, struct cfdata *match, void *aux) +cecprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/cms.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/cms.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 cms.c --- sys/dev/isa/cms.c 16 Nov 2006 01:33:00 -0000 1.14 +++ sys/dev/isa/cms.c 9 Jul 2007 22:40:47 -0000 @@ -75,7 +75,7 @@ struct cms_softc { midisyn sc_midisyn; }; -int cms_probe(struct device *, struct cfdata *, void *); +int cms_probe(struct device *, cfdata_t, void *); void cms_attach(struct device *, struct device *, void *); CFATTACH_DECL(cms, sizeof(struct cms_softc), @@ -114,7 +114,7 @@ static char cms_note_table[] = { #define NOTE_TO_COUNT(note) cms_note_table[(((note)-CMS_FIRST_NOTE)%12)] int -cms_probe(struct device *parent, struct cfdata *match, +cms_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/com_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/com_isa.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 com_isa.c --- sys/dev/isa/com_isa.c 10 Jan 2007 20:59:10 -0000 1.28 +++ sys/dev/isa/com_isa.c 9 Jul 2007 22:40:47 -0000 @@ -101,7 +101,7 @@ struct com_isa_softc { void *sc_ih; /* interrupt handler */ }; -int com_isa_probe(struct device *, struct cfdata *, void *); +int com_isa_probe(struct device *, cfdata_t, void *); void com_isa_attach(struct device *, struct device *, void *); #ifdef COM_HAYESP int com_isa_isHAYESP(bus_space_handle_t, struct com_softc *); @@ -112,7 +112,7 @@ CFATTACH_DECL(com_isa, sizeof(struct com com_isa_probe, com_isa_attach, NULL, NULL); int -com_isa_probe(struct device *parent, struct cfdata *match, +com_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { bus_space_tag_t iot; Index: sys/dev/isa/com_multi.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/com_multi.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 com_multi.c --- sys/dev/isa/com_multi.c 16 Nov 2006 01:33:00 -0000 1.24 +++ sys/dev/isa/com_multi.c 9 Jul 2007 22:40:47 -0000 @@ -99,14 +99,14 @@ __KERNEL_RCSID(0, "$NetBSD: com_multi.c, #include "locators.h" -int com_multi_probe(struct device *, struct cfdata *, void *); +int com_multi_probe(struct device *, cfdata_t, void *); void com_multi_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_multi, sizeof(struct com_softc), com_multi_probe, com_multi_attach, NULL, NULL); int -com_multi_probe(struct device *parent, struct cfdata *match, void *aux) +com_multi_probe(struct device *parent, cfdata_t cfdata, void *aux) { int iobase; struct cfdata *cf = match; Index: sys/dev/isa/cy_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/cy_isa.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 cy_isa.c --- sys/dev/isa/cy_isa.c 16 Nov 2006 01:33:00 -0000 1.21 +++ sys/dev/isa/cy_isa.c 9 Jul 2007 22:40:48 -0000 @@ -26,14 +26,14 @@ __KERNEL_RCSID(0, "$NetBSD: cy_isa.c,v 1 #include #include -int cy_isa_probe(struct device *, struct cfdata *, void *); +int cy_isa_probe(struct device *, cfdata_t, void *); void cy_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(cy_isa, sizeof(struct cy_softc), cy_isa_probe, cy_isa_attach, NULL, NULL); int -cy_isa_probe(struct device *parent, struct cfdata *match, void *aux) +cy_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; struct cy_softc sc; Index: sys/dev/isa/daic_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/daic_isa.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 daic_isa.c --- sys/dev/isa/daic_isa.c 11 Dec 2005 12:22:02 -0000 1.13 +++ sys/dev/isa/daic_isa.c 9 Jul 2007 22:40:48 -0000 @@ -67,7 +67,7 @@ struct daic_isa_softc { #ifdef __BROKEN_INDIRECT_CONFIG static int daic_isa_probe(struct device *, void *, void *); #else -static int daic_isa_probe(struct device *, struct cfdata *, void *); +static int daic_isa_probe(struct device *, cfdata_t, void *); #endif static void daic_isa_attach(struct device *, struct device *, void *); static int daic_isa_intr(void *); Index: sys/dev/isa/depca_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/depca_isa.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 depca_isa.c --- sys/dev/isa/depca_isa.c 16 Nov 2006 01:33:00 -0000 1.11 +++ sys/dev/isa/depca_isa.c 9 Jul 2007 22:40:48 -0000 @@ -107,7 +107,7 @@ __KERNEL_RCSID(0, "$NetBSD: depca_isa.c, #include #include -int depca_isa_probe(struct device *, struct cfdata *, void *); +int depca_isa_probe(struct device *, cfdata_t, void *); void depca_isa_attach(struct device *, struct device *, void *); struct depca_isa_softc { @@ -122,7 +122,7 @@ CFATTACH_DECL(depca_isa, sizeof(struct d void *depca_isa_intr_establish(struct depca_softc *, struct lance_softc *); int -depca_isa_probe(struct device *parent, struct cfdata *match, +depca_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/dpt_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/dpt_isa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 dpt_isa.c --- sys/dev/isa/dpt_isa.c 16 Nov 2006 01:33:00 -0000 1.17 +++ sys/dev/isa/dpt_isa.c 9 Jul 2007 22:40:48 -0000 @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v #define DPT_ISA_MAXCCBS 16 static void dpt_isa_attach(struct device *, struct device *, void *); -static int dpt_isa_match(struct device *, struct cfdata *, void *); +static int dpt_isa_match(struct device *, cfdata_t, void *); static int dpt_isa_probe(struct isa_attach_args *, int); static int dpt_isa_wait(bus_space_handle_t, bus_space_tag_t, u_int8_t, u_int8_t); @@ -93,7 +93,7 @@ dpt_isa_wait(bus_space_handle_t ioh, bus * Match a supported board. */ static int -dpt_isa_match(struct device *parent, struct cfdata *match, +dpt_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/ega.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/ega.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 ega.c --- sys/dev/isa/ega.c 4 Mar 2007 06:02:10 -0000 1.21 +++ sys/dev/isa/ega.c 9 Jul 2007 22:40:48 -0000 @@ -99,7 +99,7 @@ static int egaconsole, ega_console_attac static struct egascreen ega_console_screen; static struct ega_config ega_console_dc; -int ega_match(struct device *, struct cfdata *, void *); +int ega_match(struct device *, cfdata_t, void *); void ega_attach(struct device *, struct device *, void *); static int ega_is_console(bus_space_tag_t); @@ -443,7 +443,7 @@ ega_init(vc, iot, memt, mono) int ega_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct isa_attach_args *ia = aux; Index: sys/dev/isa/esp_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/esp_isa.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 esp_isa.c --- sys/dev/isa/esp_isa.c 4 Mar 2007 06:02:10 -0000 1.32 +++ sys/dev/isa/esp_isa.c 9 Jul 2007 22:40:48 -0000 @@ -135,7 +135,7 @@ __KERNEL_RCSID(0, "$NetBSD: esp_isa.c,v #include -int esp_isa_match(struct device *, struct cfdata *, void *); +int esp_isa_match(struct device *, cfdata_t, void *); void esp_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(esp_isa, sizeof(struct esp_isa_softc), @@ -320,7 +320,7 @@ esp_isa_init(esc, epd) int esp_isa_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct isa_attach_args *ia = aux; Index: sys/dev/isa/ess_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/ess_isa.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 ess_isa.c --- sys/dev/isa/ess_isa.c 16 Nov 2006 01:33:00 -0000 1.18 +++ sys/dev/isa/ess_isa.c 9 Jul 2007 22:40:49 -0000 @@ -59,14 +59,14 @@ __KERNEL_RCSID(0, "$NetBSD: ess_isa.c,v #define DPRINTF(x) {} #endif -int ess_isa_probe(struct device *, struct cfdata *, void *); +int ess_isa_probe(struct device *, cfdata_t, void *); void ess_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(ess_isa, sizeof(struct ess_softc), ess_isa_probe, ess_isa_attach, NULL, NULL); int -ess_isa_probe(struct device *parent, struct cfdata *match, +ess_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { int ret; Index: sys/dev/isa/fd.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/fd.c,v retrieving revision 1.73 diff -d -p -u -u -r1.73 fd.c --- sys/dev/isa/fd.c 8 Mar 2007 23:23:45 -0000 1.73 +++ sys/dev/isa/fd.c 9 Jul 2007 22:40:50 -0000 @@ -134,14 +134,10 @@ __KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.73 #include #include -#include "locators.h" - #if defined(atari) /* * On the atari, it is configured as fdcisa */ -#define FDCCF_DRIVE FDCISACF_DRIVE -#define FDCCF_DRIVE_DEFAULT FDCISACF_DRIVE_DEFAULT #define fd_cd fdisa_cd #endif /* atari */ @@ -206,7 +202,7 @@ const struct fd_type fd_types[] = { #endif /* defined(atari) */ void fdcfinishattach(struct device *); -int fdprobe(struct device *, struct cfdata *, void *); +int fdprobe(device_t, cfdata_t, void *); void fdattach(struct device *, struct device *, void *); extern struct cfdriver fd_cd; @@ -392,13 +388,10 @@ fdcfinishattach(self) } int -fdprobe(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +fdprobe(device_t parent, cfdata_t cfdata, void *aux) { + prop_dictionary_t locs = cfdata_locators(cfdata); struct fdc_softc *fdc = (void *)parent; - struct cfdata *cf = match; struct fdc_attach_args *fa = aux; int drive = fa->fa_drive; bus_space_tag_t iot = fdc->sc_iot; @@ -406,16 +399,16 @@ fdprobe(parent, match, aux) int n; int s; - if (cf->cf_loc[FDCCF_DRIVE] != FDCCF_DRIVE_DEFAULT && - cf->cf_loc[FDCCF_DRIVE] != drive) - return 0; + if (! locator_match_uint64(locs, "drive", drive)) + return (0); + /* * XXX * This is to work around some odd interactions between this driver * and SMC Ethernet cards. */ - if (cf->cf_loc[FDCCF_DRIVE] == FDCCF_DRIVE_DEFAULT && drive >= 2) - return 0; + if (prop_dictionary_get(locs, "drive") == NULL && drive >= 2) + return (0); /* Use PNP information if available */ if (fdc->sc_known) Index: sys/dev/isa/fdc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/fdc_isa.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 fdc_isa.c --- sys/dev/isa/fdc_isa.c 16 Nov 2006 01:33:00 -0000 1.14 +++ sys/dev/isa/fdc_isa.c 9 Jul 2007 22:40:50 -0000 @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdc_isa.c,v #include #include -int fdc_isa_probe(struct device *, struct cfdata *, void *); +int fdc_isa_probe(struct device *, cfdata_t, void *); void fdc_isa_attach(struct device *, struct device *, void *); struct fdc_isa_softc { @@ -112,7 +112,7 @@ void fdc_isa_forceintr(void *); int fdc_isa_probe(struct device *parent, - struct cfdata *match, + cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/gus.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/gus.c,v retrieving revision 1.97 diff -d -p -u -u -r1.97 gus.c --- sys/dev/isa/gus.c 4 Mar 2007 06:02:11 -0000 1.97 +++ sys/dev/isa/gus.c 9 Jul 2007 22:40:51 -0000 @@ -441,7 +441,7 @@ void stereo_dmaintr(void *); * ISA bus driver routines */ -int gusprobe(struct device *, struct cfdata *, void *); +int gusprobe(struct device *, cfdata_t, void *); void gusattach(struct device *, struct device *, void *); CFATTACH_DECL(gus, sizeof(struct gus_softc), @@ -660,7 +660,7 @@ struct audio_device gus_device = { int -gusprobe(struct device *parent, struct cfdata *match, +gusprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia; Index: sys/dev/isa/i82365_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/i82365_isa.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 i82365_isa.c --- sys/dev/isa/i82365_isa.c 16 Nov 2006 01:33:00 -0000 1.27 +++ sys/dev/isa/i82365_isa.c 9 Jul 2007 22:40:51 -0000 @@ -61,7 +61,7 @@ int pcicisa_debug = 0; #define DPRINTF(arg) #endif -int pcic_isa_probe(struct device *, struct cfdata *, void *); +int pcic_isa_probe(struct device *, cfdata_t, void *); void pcic_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcic_isa, sizeof(struct pcic_isa_softc), @@ -88,7 +88,7 @@ static struct pcmcia_chip_functions pcic }; int -pcic_isa_probe(struct device *parent, struct cfdata *match, +pcic_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/i82365_isasubr.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/i82365_isasubr.c,v retrieving revision 1.38 diff -d -p -u -u -r1.38 i82365_isasubr.c --- sys/dev/isa/i82365_isasubr.c 29 Mar 2006 04:16:49 -0000 1.38 +++ sys/dev/isa/i82365_isasubr.c 9 Jul 2007 22:40:51 -0000 @@ -327,7 +327,7 @@ pcic_isa_config_interrupts(self) * use two different interrupts, but interrupts are relatively * scarce, shareable, and for PCIC controllers, very infrequent. */ - if ((device_cfdata(self)->cf_flags & 1) == 0) { + if ((cfdata_flags(device_cfdata(self)) & 1) == 0) { if (sc->irq != ISA_UNKNOWN_IRQ) { if ((chipmask & (1 << sc->irq)) == 0) printf("%s: warning: configured irq %d not " Index: sys/dev/isa/if_ai.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ai.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 if_ai.c --- sys/dev/isa/if_ai.c 16 Nov 2006 01:33:00 -0000 1.25 +++ sys/dev/isa/if_ai.c 9 Jul 2007 22:40:51 -0000 @@ -105,7 +105,7 @@ static int check_ie_present(struct ie_s static int ai_find_mem_size(struct ai_softc*, bus_space_tag_t, bus_size_t); -int ai_match(struct device *, struct cfdata *, void *); +int ai_match(struct device *, cfdata_t, void *); void ai_attach(struct device *, struct device *, void *); /* @@ -230,7 +230,7 @@ ai_write_24 (sc, offset, addr) } int -ai_match(struct device *parent, struct cfdata *cf, void *aux) +ai_match(struct device *parent, cfdata_t cf, void *aux) { int rv = 0; u_int8_t val, type; Index: sys/dev/isa/if_ate.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ate.c,v retrieving revision 1.47 diff -d -p -u -u -r1.47 if_ate.c --- sys/dev/isa/if_ate.c 16 Nov 2006 01:33:00 -0000 1.47 +++ sys/dev/isa/if_ate.c 9 Jul 2007 22:40:52 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ate.c,v 1 #include -int ate_match(struct device *, struct cfdata *, void *); +int ate_match(struct device *, cfdata_t, void *); void ate_attach(struct device *, struct device *, void *); struct ate_softc { @@ -97,7 +97,7 @@ static int const ate_iomap[8] = { * Determine if the device is present. */ int -ate_match(struct device *parent, struct cfdata *match, +ate_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_cs_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_cs_isa.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 if_cs_isa.c --- sys/dev/isa/if_cs_isa.c 16 Nov 2006 01:33:00 -0000 1.18 +++ sys/dev/isa/if_cs_isa.c 9 Jul 2007 22:40:52 -0000 @@ -61,14 +61,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_isa.c, #include #include -int cs_isa_probe(struct device *, struct cfdata *, void *); +int cs_isa_probe(struct device *, cfdata_t, void *); void cs_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(cs_isa, sizeof(struct cs_softc), cs_isa_probe, cs_isa_attach, NULL, NULL); int -cs_isa_probe(struct device *parent, struct cfdata *cf, +cs_isa_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_ec.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ec.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 if_ec.c --- sys/dev/isa/if_ec.c 4 Mar 2007 06:02:12 -0000 1.30 +++ sys/dev/isa/if_ec.c 9 Jul 2007 22:40:52 -0000 @@ -93,7 +93,7 @@ struct ec_softc { void *sc_ih; /* interrupt handle */ }; -int ec_probe(struct device *, struct cfdata *, void *); +int ec_probe(struct device *, cfdata_t, void *); void ec_attach(struct device *, struct device *, void *); CFATTACH_DECL(ec, sizeof(struct ec_softc), @@ -127,7 +127,7 @@ static const int ec_membase[] = { #define NEC_MEMBASE (sizeof(ec_membase) / sizeof(ec_membase[0])) int -ec_probe(struct device *parent, struct cfdata *match, +ec_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; @@ -425,7 +425,7 @@ ec_attach(struct device *parent, struct * we optimize for linear transfers of same-size packets.) */ if (esc->sc_16bitp) { - if (device_cfdata(&sc->sc_dev)->cf_flags & + if (cfdata_flags(device_cfdata(&sc->sc_dev)) & DP8390_NO_MULTI_BUFFERING) sc->txb_cnt = 1; else Index: sys/dev/isa/if_ef.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ef.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 if_ef.c --- sys/dev/isa/if_ef.c 16 Nov 2006 01:33:00 -0000 1.23 +++ sys/dev/isa/if_ef.c 9 Jul 2007 22:40:52 -0000 @@ -112,7 +112,7 @@ static void ef_mediastatus(struct ie_sof /* Local routines */ static int ef_port_check(bus_space_tag_t, bus_space_handle_t); -int ef_match(struct device *, struct cfdata *, void *); +int ef_match(struct device *, cfdata_t, void *); void ef_attach(struct device *, struct device *, void *); /* @@ -349,7 +349,7 @@ ef_mediastatus(sc, ifmr) } int -ef_match(struct device *parent, struct cfdata *cf, void *aux) +ef_match(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args * const ia = aux; Index: sys/dev/isa/if_eg.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_eg.c,v retrieving revision 1.72 diff -d -p -u -u -r1.72 if_eg.c --- sys/dev/isa/if_eg.c 4 Mar 2007 06:02:12 -0000 1.72 +++ sys/dev/isa/if_eg.c 9 Jul 2007 22:40:52 -0000 @@ -121,7 +121,7 @@ struct eg_softc { #endif }; -int egprobe(struct device *, struct cfdata *, void *); +int egprobe(struct device *, cfdata_t, void *); void egattach(struct device *, struct device *, void *); CFATTACH_DECL(eg, sizeof(struct eg_softc), @@ -313,7 +313,7 @@ egreadPCB(iot, ioh, pcb) */ int -egprobe(struct device *parent, struct cfdata *match, +egprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_el.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_el.c,v retrieving revision 1.77 diff -d -p -u -u -r1.77 if_el.c --- sys/dev/isa/if_el.c 4 Mar 2007 06:02:12 -0000 1.77 +++ sys/dev/isa/if_el.c 9 Jul 2007 22:40:53 -0000 @@ -102,7 +102,7 @@ void elread(struct el_softc *, int); struct mbuf *elget(struct el_softc *sc, int); static inline void el_hardreset(struct el_softc *); -int elprobe(struct device *, struct cfdata *, void *); +int elprobe(struct device *, cfdata_t, void *); void elattach(struct device *, struct device *, void *); CFATTACH_DECL(el, sizeof(struct el_softc), @@ -115,7 +115,7 @@ CFATTACH_DECL(el, sizeof(struct el_softc * (XXX - cgd -- needs help) */ int -elprobe(struct device *parent, struct cfdata *match, +elprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_ep_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ep_isa.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 if_ep_isa.c --- sys/dev/isa/if_ep_isa.c 16 Nov 2006 01:33:00 -0000 1.40 +++ sys/dev/isa/if_ep_isa.c 9 Jul 2007 22:40:53 -0000 @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_isa.c, #include #include -int ep_isa_probe(struct device *, struct cfdata *, void *); +int ep_isa_probe(struct device *, cfdata_t, void *); void ep_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(ep_isa, sizeof(struct ep_softc), @@ -156,7 +156,7 @@ epaddcard(bus, iobase, irq, model) * calls we look for matching cards. */ int -ep_isa_probe(struct device *parent, struct cfdata *match, +ep_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_fmv_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_fmv_isa.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 if_fmv_isa.c --- sys/dev/isa/if_fmv_isa.c 16 Nov 2006 01:33:00 -0000 1.9 +++ sys/dev/isa/if_fmv_isa.c 9 Jul 2007 22:40:53 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_fmv_isa.c #include -int fmv_isa_match(struct device *, struct cfdata *, void *); +int fmv_isa_match(struct device *, cfdata_t, void *); void fmv_isa_attach(struct device *, struct device *, void *); struct fmv_isa_softc { @@ -95,7 +95,7 @@ static int const fmv_iomap[8] = { * Determine if the device is present. */ int -fmv_isa_match(struct device *parent, struct cfdata *match, +fmv_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_ix.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ix.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 if_ix.c --- sys/dev/isa/if_ix.c 16 Nov 2006 01:33:00 -0000 1.26 +++ sys/dev/isa/if_ix.c 9 Jul 2007 22:40:54 -0000 @@ -109,7 +109,7 @@ static void ix_eeprom_outbits(bus_space_ static int ix_eeprom_inbits (bus_space_tag_t, bus_space_handle_t); static void ix_eeprom_clock (bus_space_tag_t, bus_space_handle_t, int); -int ix_match(struct device *, struct cfdata *, void *); +int ix_match(struct device *, cfdata_t, void *); void ix_attach(struct device *, struct device *, void *); /* @@ -511,7 +511,7 @@ ix_mediastatus(sc, ifmr) } int -ix_match(struct device *parent, struct cfdata *cf, void *aux) +ix_match(struct device *parent, cfdata_t cf, void *aux) { int i; int rv = 0; Index: sys/dev/isa/if_iy.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_iy.c,v retrieving revision 1.75 diff -d -p -u -u -r1.75 if_iy.c --- sys/dev/isa/if_iy.c 4 Mar 2007 06:02:12 -0000 1.75 +++ sys/dev/isa/if_iy.c 9 Jul 2007 22:40:54 -0000 @@ -177,7 +177,7 @@ int in_iftint = 0; int iy_mediachange(struct ifnet *); void iy_mediastatus(struct ifnet *, struct ifmediareq *); -int iyprobe(struct device *, struct cfdata *, void *); +int iyprobe(struct device *, cfdata_t, void *); void iyattach(struct device *, struct device *, void *); static u_int16_t eepromread(bus_space_tag_t, bus_space_handle_t, int); @@ -192,7 +192,7 @@ static u_int8_t eepro_irqmap[] = EEPP_IN static u_int8_t eepro_revirqmap[] = EEPP_RINTMAP; int -iyprobe(struct device *parent, struct cfdata *match, +iyprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_lc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_lc_isa.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 if_lc_isa.c --- sys/dev/isa/if_lc_isa.c 16 Nov 2006 01:33:00 -0000 1.27 +++ sys/dev/isa/if_lc_isa.c 9 Jul 2007 22:40:54 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_lc_isa.c, extern struct cfdriver lc_cd; static int lemac_isa_find(lemac_softc_t *, struct isa_attach_args *, int); -static int lemac_isa_probe(struct device *, struct cfdata *, void *); +static int lemac_isa_probe(struct device *, cfdata_t, void *); static void lemac_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(lc_isa, sizeof(lemac_softc_t), @@ -145,14 +145,14 @@ lemac_isa_find(sc, ia, attach) */ if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ && ia->ia_irq[0].ir_irq != irq) - printf("%s: overriding IRQ %d to %d\n", sc->sc_dv.dv_xname, - ia->ia_irq[0].ir_irq, irq); + printf("lemac_isa_find: overriding IRQ %d to %d\n", + ia->ia_irq[0].ir_irq, irq); if (attach) { sc->sc_ats = shutdownhook_establish(lemac_shutdown, sc); if (sc->sc_ats == NULL) - printf("\n%s: warning: can't establish shutdown hook\n", - sc->sc_dv.dv_xname); + printf("\nlemac_isa_find: warning: can't establish " + "shutdown hook\n"); lemac_ifattach(sc); @@ -184,13 +184,10 @@ outio: } static int -lemac_isa_probe(struct device *parent, struct cfdata *match, void *aux) +lemac_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; - struct cfdata *cf = match; lemac_softc_t sc; - snprintf(sc.sc_dv.dv_xname, sizeof(sc.sc_dv.dv_xname), "%s%d", - lc_cd.cd_name, cf->cf_unit); return lemac_isa_find(&sc, ia, 0); } Index: sys/dev/isa/if_le_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_le_isa.c,v retrieving revision 1.44 diff -d -p -u -u -r1.44 if_le_isa.c --- sys/dev/isa/if_le_isa.c 4 Mar 2007 06:02:12 -0000 1.44 +++ sys/dev/isa/if_le_isa.c 9 Jul 2007 22:40:54 -0000 @@ -102,10 +102,10 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_isa.c, #include -int ne2100_isa_probe(struct device *, struct cfdata *, void *); -int bicc_isa_probe(struct device *, struct cfdata *, void *); +int ne2100_isa_probe(struct device *, cfdata_t, void *); +int bicc_isa_probe(struct device *, cfdata_t, void *); void le_dummyattach(struct device *, struct device *, void *); -int le_dummyprobe(struct device *, struct cfdata *, void *); +int le_dummyprobe(struct device *, cfdata_t, void *); void le_ne2100_attach(struct device *, struct device *, void *); void le_bicc_attach(struct device *, struct device *, void *); @@ -187,16 +187,16 @@ le_isa_rdcsr(sc, port) } int -ne2100_isa_probe(struct device *parent, struct cfdata *match, +ne2100_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { - return (lance_isa_probe(aux, &ne2100_params, match->cf_flags)); + return (lance_isa_probe(aux, &ne2100_params, cfdata_flags(cfdata))); } int -bicc_isa_probe(struct device *parent, struct cfdata *match, void *aux) +bicc_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { - return (lance_isa_probe(aux, &bicc_params, match->cf_flags)); + return (lance_isa_probe(aux, &bicc_params, cfdata_flags(cfdata))); } /* @@ -281,7 +281,7 @@ le_dummyattach(struct device *parent, st } int -le_dummyprobe(struct device *parent, struct cfdata *match, +le_dummyprobe(struct device *parent, cfdata_t cfdata, void *aux) { return (1); Index: sys/dev/isa/if_ne_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ne_isa.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 if_ne_isa.c --- sys/dev/isa/if_ne_isa.c 16 Nov 2006 01:33:00 -0000 1.23 +++ sys/dev/isa/if_ne_isa.c 9 Jul 2007 22:40:54 -0000 @@ -69,7 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ne_isa.c, #include -int ne_isa_match(struct device *, struct cfdata *, void *); +int ne_isa_match(struct device *, cfdata_t, void *); void ne_isa_attach(struct device *, struct device *, void *); struct ne_isa_softc { @@ -83,7 +83,7 @@ CFATTACH_DECL(ne_isa, sizeof(struct ne_i ne_isa_match, ne_isa_attach, NULL, NULL); int -ne_isa_match(struct device *parent, struct cfdata *match, +ne_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_ntwoc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_ntwoc_isa.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_ntwoc_isa.c --- sys/dev/isa/if_ntwoc_isa.c 16 Nov 2006 01:33:00 -0000 1.15 +++ sys/dev/isa/if_ntwoc_isa.c 9 Jul 2007 22:40:54 -0000 @@ -84,7 +84,7 @@ struct ntwoc_isa_softc { struct sca_softc sc_sca; /* the SCA itself */ }; -static int ntwoc_isa_probe(struct device *, struct cfdata *, void *); +static int ntwoc_isa_probe(struct device *, cfdata_t, void *); static void ntwoc_isa_attach(struct device *, struct device *, void *); static void ntwoc_isa_clock_callback(void *, int, int); @@ -186,7 +186,7 @@ ntwoc_isa_set_off(struct sca_softc *sca) } static int -ntwoc_isa_probe(struct device *parent, struct cfdata *match, void *aux) +ntwoc_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia; bus_space_tag_t iot, memt; Index: sys/dev/isa/if_sm_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_sm_isa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 if_sm_isa.c --- sys/dev/isa/if_sm_isa.c 16 Nov 2006 01:33:00 -0000 1.17 +++ sys/dev/isa/if_sm_isa.c 9 Jul 2007 22:40:54 -0000 @@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_sm_isa.c, #include -int sm_isa_match(struct device *, struct cfdata *, void *); +int sm_isa_match(struct device *, cfdata_t, void *); void sm_isa_attach(struct device *, struct device *, void *); struct sm_isa_softc { @@ -80,7 +80,7 @@ CFATTACH_DECL(sm_isa, sizeof(struct sm_i sm_isa_match, sm_isa_attach, NULL, NULL); int -sm_isa_match(struct device *parent, struct cfdata *match, +sm_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_tr_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_tr_isa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 if_tr_isa.c --- sys/dev/isa/if_tr_isa.c 16 Nov 2006 01:33:00 -0000 1.16 +++ sys/dev/isa/if_tr_isa.c 9 Jul 2007 22:40:54 -0000 @@ -62,9 +62,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_tr_isa.c, #include -int tr_isa_probe(struct device *, struct cfdata *, void *); -int trtcm_isa_probe(struct device *, struct cfdata *, void *); -int tribm_isa_probe(struct device *, struct cfdata *, void *); +int tr_isa_probe(struct device *, cfdata_t, void *); +int trtcm_isa_probe(struct device *, cfdata_t, void *); +int tribm_isa_probe(struct device *, cfdata_t, void *); void tr_isa_attach(struct device *, struct device *, void *); int tr_isa_map_io(struct isa_attach_args *, bus_space_handle_t *, bus_space_handle_t *); @@ -79,7 +79,7 @@ void tr_isa_dumpaip(bus_space_tag_t, bus /* * List of manufacturer specific probe routines. Order is important. */ -int (*tr_isa_probe_list[])(struct device *, struct cfdata *, void *) = { +int (*tr_isa_probe_list[])(struct device *, cfdata_t, void *) = { trtcm_isa_probe, tribm_isa_probe, 0 @@ -139,9 +139,9 @@ static u_char tr_isa_id[] = { */ int -tr_isa_probe(parent, match, aux) +tr_isa_probe(parent, cfdata, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct isa_attach_args *ia = aux; @@ -162,7 +162,7 @@ tr_isa_probe(parent, match, aux) return (0); for (i = 0; tr_isa_probe_list[i] != 0; i++) { - probecode = tr_isa_probe_list[i](parent, match, aux); + probecode = tr_isa_probe_list[i](parent, cfdata, aux); if (probecode < 0) return 0; /* Fail instantly. */ if (probecode > 0) Index: sys/dev/isa/if_tribm_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_tribm_isa.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 if_tribm_isa.c --- sys/dev/isa/if_tribm_isa.c 16 Nov 2006 01:33:00 -0000 1.10 +++ sys/dev/isa/if_tribm_isa.c 9 Jul 2007 22:40:54 -0000 @@ -57,14 +57,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_tribm_isa #include #include -int tribm_isa_probe(struct device *, struct cfdata *, void *); +int tribm_isa_probe(struct device *, cfdata_t, void *); int tr_isa_map_io(struct isa_attach_args *, bus_space_handle_t *, bus_space_handle_t *); void tr_isa_unmap_io(struct isa_attach_args *, bus_space_handle_t, bus_space_handle_t); int -tribm_isa_probe(struct device *parent, struct cfdata *match, +tribm_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_trtcm_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_trtcm_isa.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 if_trtcm_isa.c --- sys/dev/isa/if_trtcm_isa.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/if_trtcm_isa.c 9 Jul 2007 22:40:54 -0000 @@ -68,7 +68,7 @@ u_int16_t tcmreadeeprom(bus_space_tag_t, void tcmdumpeeprom(bus_space_tag_t, bus_space_handle_t); #endif -int trtcm_isa_probe(struct device *, struct cfdata *, void *); +int trtcm_isa_probe(struct device *, cfdata_t, void *); int trtcm_isa_mediachange(struct tr_softc *); void trtcm_isa_mediastatus(struct tr_softc *, struct ifmediareq *); @@ -207,7 +207,7 @@ trtcm_isa_mediastatus(sc, ifmr) /* XXX hard coded constants in readeeprom elink_idseq */ int -trtcm_isa_probe(struct device *parent, struct cfdata *match, +trtcm_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/if_tscs_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_tscs_isa.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 if_tscs_isa.c --- sys/dev/isa/if_tscs_isa.c 11 Dec 2005 12:22:02 -0000 1.4 +++ sys/dev/isa/if_tscs_isa.c 9 Jul 2007 22:40:55 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tscs_isa. #include #include -int tscs_isa_probe(struct device *, struct cfdata *, void *); +int tscs_isa_probe(struct device *, cfdata_t, void *); void tscs_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(tscs_isa, sizeof(struct cs_softc), Index: sys/dev/isa/if_we_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/if_we_isa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 if_we_isa.c --- sys/dev/isa/if_we_isa.c 16 Nov 2006 01:33:00 -0000 1.17 +++ sys/dev/isa/if_we_isa.c 9 Jul 2007 22:40:55 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_we_isa.c, #define bus_space_write_region_stream_2 bus_space_write_region_2 #endif -int we_isa_probe(struct device *, struct cfdata *, void *); +int we_isa_probe(struct device *, cfdata_t, void *); void we_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(we_isa, sizeof(struct we_softc), @@ -143,7 +143,7 @@ do { \ } while (0) int -we_isa_probe(struct device *parent, struct cfdata *cf, void *aux) +we_isa_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t asict, memt; @@ -257,8 +257,8 @@ we_isa_probe(struct device *parent, stru if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ && ia->ia_irq[0].ir_irq != we_790_irq[i]) - printf("%s%d: overriding configured IRQ %d to %d\n", - we_cd.cd_name, cf->cf_unit, ia->ia_irq[0].ir_irq, + printf("%s: overriding configured IRQ %d to %d\n", + we_cd.cd_name, ia->ia_irq[0].ir_irq, we_790_irq[i]); ia->ia_irq[0].ir_irq = we_790_irq[i]; } else if (type & WE_SOFTCONFIG) { @@ -269,8 +269,8 @@ we_isa_probe(struct device *parent, stru if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ && ia->ia_irq[0].ir_irq != we_584_irq[i]) - printf("%s%d: overriding configured IRQ %d to %d\n", - we_cd.cd_name, cf->cf_unit, ia->ia_irq[0].ir_irq, + printf("%s: overriding configured IRQ %d to %d\n", + we_cd.cd_name, ia->ia_irq[0].ir_irq, we_584_irq[i]); ia->ia_irq[0].ir_irq = we_584_irq[i]; } Index: sys/dev/isa/ioat66.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/ioat66.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 ioat66.c --- sys/dev/isa/ioat66.c 16 Nov 2006 01:33:00 -0000 1.15 +++ sys/dev/isa/ioat66.c 9 Jul 2007 22:40:55 -0000 @@ -68,7 +68,7 @@ struct ioat66_softc { int ioatbases[NSLAVES]={0x220,0x228,0x240,0x248,0x260,0x268}; #define IOAT66SHARED 0x208 -int ioat66probe(struct device *, struct cfdata *, void *); +int ioat66probe(struct device *, cfdata_t, void *); void ioat66attach(struct device *, struct device *, void *); int ioat66intr(void *); @@ -76,7 +76,7 @@ CFATTACH_DECL(ioat, sizeof(struct ioat66 ioat66probe, ioat66attach, NULL, NULL); int -ioat66probe(struct device *parent, struct cfdata *self, +ioat66probe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/isa.c,v retrieving revision 1.128 diff -d -p -u -u -r1.128 isa.c --- sys/dev/isa/isa.c 2 Jan 2007 02:23:51 -0000 1.128 +++ sys/dev/isa/isa.c 9 Jul 2007 22:40:55 -0000 @@ -59,25 +59,20 @@ __KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.12 #include #endif -#include "locators.h" - -int isamatch(struct device *, struct cfdata *, void *); +int isamatch(struct device *, cfdata_t, void *); void isaattach(struct device *, struct device *, void *); -int isarescan(struct device *, const char *, const int *); +int isarescan(struct device *, const char *, prop_dictionary_t); void isachilddetached(struct device *, struct device *); int isaprint(void *, const char *); CFATTACH_DECL2(isa, sizeof(struct isa_softc), isamatch, isaattach, NULL, NULL, isarescan, isachilddetached); -void isa_attach_knowndevs(struct isa_softc *); -void isa_free_knowndevs(struct isa_softc *); - -int isasubmatch(struct device *, struct cfdata *, const int *, void *); -int isasearch(struct device *, struct cfdata *, const int *, void *); +int isasubmatch(struct device *, cfdata_t, prop_dictionary_t, void *); +int isasearch(struct device *, cfdata_t, prop_dictionary_t, void *); int -isamatch(struct device *parent, struct cfdata *cf, +isamatch(struct device *parent, cfdata_t cf, void *aux) { /* XXX check other indicators */ @@ -90,20 +85,10 @@ isaattach(struct device *parent, struct { struct isa_softc *sc = (struct isa_softc *)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 - }; - - TAILQ_INIT(&sc->sc_knowndevs); - sc->sc_dynamicdevs = 0; isa_attach_hook(parent, self, iba); printf("\n"); - /* XXX Add code to fetch known-devices. */ - sc->sc_iot = iba->iba_iot; sc->sc_memt = iba->iba_memt; sc->sc_dmat = iba->iba_dmat; @@ -123,38 +108,13 @@ isaattach(struct device *parent, struct isa_dmainit(sc->sc_ic, sc->sc_iot, sc->sc_dmat, self); #endif - /* Attach all direct-config children. */ - isa_attach_knowndevs(sc); - - /* - * If we don't support dynamic hello/goodbye of devices, - * then free the knowndevs info now. - */ - if (sc->sc_dynamicdevs == 0) - isa_free_knowndevs(sc); - /* Attach all indrect-config children. */ - isarescan(self, "isa", wildcard); + isarescan(self, "isa", NULL); } int -isarescan(struct device *self, const char *ifattr, const int *locators) +isarescan(struct device *self, const char *ifattr, prop_dictionary_t locs) { - int locs[ISACF_NLOCS]; - - memcpy(locs, locators, sizeof(locs)); - - /* - * XXX Bus independent code calling this function does not - * know the locator default values. It assumes "-1" for now. - * (should be made available by "config" one day) - * So fixup where the "-1" is not correct. - */ - if (locs[ISACF_SIZE] == -1) - locs[ISACF_SIZE] = ISACF_SIZE_DEFAULT; - if (locs[ISACF_IOSIZ] == -1) - locs[ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT; - config_search_loc(isasearch, self, ifattr, locs, NULL); return (0); } @@ -165,140 +125,6 @@ isachilddetached(struct device *self, st /* nothing to do */ } -void -isa_attach_knowndevs(struct isa_softc *sc) -{ - struct isa_attach_args ia; - struct isa_knowndev *ik; - - if (TAILQ_EMPTY(&sc->sc_knowndevs)) - return; - - TAILQ_FOREACH(ik, &sc->sc_knowndevs, ik_list) { - if (ik->ik_claimed != NULL) - continue; - - ia.ia_iot = sc->sc_iot; - ia.ia_memt = sc->sc_memt; - ia.ia_dmat = sc->sc_dmat; - ia.ia_ic = sc->sc_ic; - - ia.ia_pnpname = ik->ik_pnpname; - ia.ia_pnpcompatnames = ik->ik_pnpcompatnames; - - ia.ia_io = ik->ik_io; - ia.ia_nio = ik->ik_nio; - - ia.ia_iomem = ik->ik_iomem; - ia.ia_niomem = ik->ik_niomem; - - ia.ia_irq = ik->ik_irq; - ia.ia_nirq = ik->ik_nirq; - - ia.ia_drq = ik->ik_drq; - ia.ia_ndrq = ik->ik_ndrq; - - ia.ia_aux = NULL; - - /* XXX should setup locator array */ - - ik->ik_claimed = config_found_sm_loc(&sc->sc_dev, - "isa", 0, &ia, isaprint, isasubmatch); - } -} - -void -isa_free_knowndevs(struct isa_softc *sc) -{ - struct isa_knowndev *ik; - struct isa_pnpname *ipn; - -#define FREEIT(x) if (x != NULL) free(x, M_DEVBUF) - - while ((ik = TAILQ_FIRST(&sc->sc_knowndevs)) != NULL) { - TAILQ_REMOVE(&sc->sc_knowndevs, ik, ik_list); - FREEIT(ik->ik_pnpname); - while ((ipn = ik->ik_pnpcompatnames) != NULL) { - ik->ik_pnpcompatnames = ipn->ipn_next; - free(ipn->ipn_name, M_DEVBUF); - free(ipn, M_DEVBUF); - } - FREEIT(ik->ik_io); - FREEIT(ik->ik_iomem); - FREEIT(ik->ik_irq); - FREEIT(ik->ik_drq); - free(ik, M_DEVBUF); - } - -#undef FREEIT -} - -static int -checkattachargs(struct isa_attach_args *ia, const int *loc) -{ - int i; - - if (ia->ia_nio == 0) { - if (loc[ISACF_PORT] != ISACF_PORT_DEFAULT) - return (0); - } else { - if (loc[ISACF_PORT] != ISACF_PORT_DEFAULT && - loc[ISACF_PORT] != ia->ia_io[0].ir_addr) - return (0); - } - - if (ia->ia_niomem == 0) { - if (loc[ISACF_IOMEM] != ISACF_IOMEM_DEFAULT) - return (0); - } else { - if (loc[ISACF_IOMEM] != ISACF_IOMEM_DEFAULT && - loc[ISACF_IOMEM] != ia->ia_iomem[0].ir_addr) - return (0); - } - - if (ia->ia_nirq == 0) { - if (loc[ISACF_IRQ] != ISACF_IRQ_DEFAULT) - return (0); - } else { - if (loc[ISACF_IRQ] != ISACF_IRQ_DEFAULT && - loc[ISACF_IRQ] != ia->ia_irq[0].ir_irq) - return (0); - } - - if (ia->ia_ndrq == 0) { - if (loc[ISACF_DRQ] != ISACF_DRQ_DEFAULT) - return (0); - if (loc[ISACF_DRQ2] != ISACF_DRQ2_DEFAULT) - return (0); - } else { - for (i = 0; i < 2; i++) { - if (i == ia->ia_ndrq) - break; - if (loc[ISACF_DRQ + i] != ISACF_DRQ_DEFAULT && - loc[ISACF_DRQ + i] != ia->ia_drq[i].ir_drq) - return (0); - } - for (; i < 2; i++) { - if (loc[ISACF_DRQ + i] != ISACF_DRQ_DEFAULT) - return (0); - } - } - - return (1); -} - -int -isasubmatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) -{ - struct isa_attach_args *ia = aux; - - if (!checkattachargs(ia, cf->cf_loc)) - return (0); - - return (config_match(parent, cf, aux)); -} - int isaprint(void *aux, const char *isa) { @@ -344,8 +170,6 @@ isaprint(void *aux, const char *isa) sep = ""; aprint_normal(" iomem "); for (i = 0; i < ia->ia_niomem; i++) { - if (ia->ia_iomem[i].ir_size == 0) - continue; aprint_normal("%s0x%x", sep, ia->ia_iomem[i].ir_addr); if (ia->ia_iomem[i].ir_size > 1) aprint_normal("-0x%x", ia->ia_iomem[i].ir_addr + @@ -358,8 +182,6 @@ isaprint(void *aux, const char *isa) sep = ""; aprint_normal(" irq "); for (i = 0; i < ia->ia_nirq; i++) { - if (ia->ia_irq[i].ir_irq == ISACF_IRQ_DEFAULT) - continue; aprint_normal("%s%d", sep, ia->ia_irq[i].ir_irq); sep = ","; } @@ -369,8 +191,6 @@ isaprint(void *aux, const char *isa) sep = ""; aprint_normal(" drq "); for (i = 0; i < ia->ia_ndrq; i++) { - if (ia->ia_drq[i].ir_drq == ISACF_DRQ_DEFAULT) - continue; aprint_normal("%s%d", sep, ia->ia_drq[i].ir_drq); sep = ","; } @@ -379,72 +199,156 @@ isaprint(void *aux, const char *isa) return (UNCONF); } +static prop_dictionary_t +isa_make_locators(struct isa_attach_args *ia) +{ + prop_dictionary_t locs; + int i; + + locs = prop_dictionary_create(); + if (locs == NULL) + return (NULL); + + /* + * XXXfreza ISA code allows more io/mem ranges, but nobody uses them + * XXXfreza so we don't care either. + */ + if (ia->ia_nio > 0) { + struct isa_io *io = &ia->ia_io[0]; + + if (! prop_dictionary_set_uint32(locs, "port", io->ir_addr)) + goto fail; + + if (io->ir_size > 0 && + ! prop_dictionary_set_uint32(locs, "size", io->ir_size)) + goto fail; + } + + if (ia->ia_niomem > 0) { + struct isa_iomem *im = &ia->ia_iomem[0]; + + if (! prop_dictionary_set_uint32(locs, "iomem", im->ir_addr)) + goto fail; + + if (im->ir_size > 0 && + ! prop_dictionary_set_uint32(locs, "iosiz", im->ir_size)) + goto fail; + } + + for (i = 0; i < ia->ia_nirq; i++) { + char key[16] = "irq"; + + if (i > 0 && + snprintf(key, sizeof(key), "irq%d", i + 1) >= sizeof(key)) + goto fail; + + if (! prop_dictionary_set_uint16(locs, key, + ia->ia_irq[i].ir_irq)) + goto fail; + } + + for (i = 0; i < ia->ia_ndrq; i++) { + char key[16] = "drq"; + + if (i > 0 && + snprintf(key, sizeof(key), "drq%d", i + 1) >= sizeof(key)) + goto fail; + + if (! prop_dictionary_set_uint16(locs, key, + ia->ia_drq[i].ir_drq)) + goto fail; + } + + return (locs); + fail: + prop_object_release(locs); + return (NULL); +} + int -isasearch(struct device *parent, struct cfdata *cf, - const int *slocs, void *aux) +isasearch(struct device *parent, cfdata_t cf, prop_dictionary_t matchlocs, + void *aux) { + struct isa_attach_args ia; struct isa_io res_io[1]; struct isa_iomem res_mem[1]; struct isa_irq res_irq[1]; struct isa_drq res_drq[2]; struct isa_softc *sc = (struct isa_softc *)parent; - struct isa_attach_args ia; - int flocs[ISACF_NLOCS]; - int tryagain; + prop_dictionary_t cflocs = cfdata_locators(cf); + prop_dictionary_t locs; + uint32_t val; - do { - ia.ia_pnpname = NULL; - ia.ia_pnpcompatnames = NULL; + /* Caller supplied locators may restrict cfdata we care about. */ + if (! prop_dictionary_subset(matchlocs, cflocs)) + return (0); - res_io[0].ir_addr = cf->cf_loc[ISACF_PORT]; - res_io[0].ir_size = 0; + memset(&ia, 0, sizeof(struct isa_attach_args)); - res_mem[0].ir_addr = cf->cf_loc[ISACF_IOMEM]; - res_mem[0].ir_size = cf->cf_loc[ISACF_IOSIZ]; + ia.ia_pnpname = NULL; + ia.ia_pnpcompatnames = NULL; - res_irq[0].ir_irq = - cf->cf_loc[ISACF_IRQ] == 2 ? 9 : cf->cf_loc[ISACF_IRQ]; + ia.ia_iot = sc->sc_iot; + ia.ia_memt = sc->sc_memt; + ia.ia_dmat = sc->sc_dmat; + ia.ia_ic = sc->sc_ic; - res_drq[0].ir_drq = cf->cf_loc[ISACF_DRQ]; - res_drq[1].ir_drq = cf->cf_loc[ISACF_DRQ2]; + /* + * XXXfreza ISA search routines tend to be abusive and like to modify + * XXXfreza the attach args, so always leave the arrays accessible. + */ + ia.ia_io = res_io; + ia.ia_iomem = res_mem; + ia.ia_irq = res_irq; + ia.ia_drq = res_drq; - ia.ia_iot = sc->sc_iot; - ia.ia_memt = sc->sc_memt; - ia.ia_dmat = sc->sc_dmat; - ia.ia_ic = sc->sc_ic; + /* + * Now setup attach args according to configured locators. + */ + if (prop_dictionary_get_uint32(cflocs, "port", &val)) { + res_io[0].ir_addr = val; + res_io[0].ir_size = 0; - ia.ia_io = res_io; ia.ia_nio = 1; + } + + if (prop_dictionary_get_uint32(cflocs, "iomem", &val)) { + res_mem[0].ir_addr = val; + + if (prop_dictionary_get_uint32(cflocs, "iosiz", &val)) + res_mem[0].ir_size = val; + else + res_mem[0].ir_size = 0; - ia.ia_iomem = res_mem; ia.ia_niomem = 1; + } + + if (prop_dictionary_get_uint32(cflocs, "irq", &val)) { + if (val == 2) + val = 9; + res_irq[0].ir_irq = val; - ia.ia_irq = res_irq; ia.ia_nirq = 1; + } - ia.ia_drq = res_drq; - ia.ia_ndrq = 2; + if (prop_dictionary_get_uint32(cflocs, "drq", &val)) + res_drq[ia.ia_ndrq++].ir_drq = val; - if (!checkattachargs(&ia, slocs)) - return (0); + if (prop_dictionary_get_uint32(cflocs, "drq2", &val)) + res_drq[ia.ia_ndrq++].ir_drq = val; - tryagain = 0; - if (config_match(parent, cf, &ia) > 0) { - /* - * This is not necessary for detach, but might - * still be useful to collect device information. - */ - flocs[ISACF_PORT] = ia.ia_io[0].ir_addr; - flocs[ISACF_SIZE] = ia.ia_io[0].ir_size; - flocs[ISACF_IOMEM] = ia.ia_iomem[0].ir_addr; - flocs[ISACF_IOSIZ] = ia.ia_iomem[0].ir_size; - 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); - tryagain = (cf->cf_fstate == FSTATE_STAR); + if (config_match(parent, cf, &ia) > 0) { + locs = isa_make_locators(&ia); + if (locs == NULL) { + aprint_error("%s: isasearch: could not create " + "locators\n", device_xname(parent)); + /* XXXfreza we have no way to abort the search... */ + return (0); } - } while (tryagain); + + config_attach_loc(parent, cf, locs, &ia, isaprint); + prop_object_release(locs); + } return (0); } Index: sys/dev/isa/isavar.h =================================================================== RCS file: /cvsroot/src/sys/dev/isa/isavar.h,v retrieving revision 1.48 diff -d -p -u -u -r1.48 isavar.h --- sys/dev/isa/isavar.h 11 Dec 2005 12:22:02 -0000 1.48 +++ sys/dev/isa/isavar.h 9 Jul 2007 22:40:56 -0000 @@ -128,49 +128,6 @@ struct isa_pnpname { }; /* - * Machine-dependent code provides a list of these to describe - * devices on the ISA bus which should be attached via direct - * configuration. - * - * All of this information is dynamically allocated, so that - * the ISA bus driver may free all of this information if the - * bus does not support dynamic attach/detach of devices (e.g. - * on a docking station). - * - * Some info on the "ik_key" field: This is a unique number for - * each knowndev node. If, when we need to re-enumerate the - * knowndevs, we discover that a node with key N is in the old - * list but not in the new, the device has disappeared. Similarly, - * if a node with key M is in the new list but not in the old, - * the device is new. Note that the knowndevs list must be - * sorted in ascending "key" order. - */ -struct isa_knowndev { - TAILQ_ENTRY(isa_knowndev) ik_list; - uintptr_t ik_key; - struct device *ik_claimed; - - /* - * The rest of these fields correspond to isa_attach_args - * fields. - */ - char *ik_pnpname; - struct isa_pnpname *ik_pnpcompatnames; - - struct isa_io *ik_io; - int ik_nio; - - struct isa_iomem *ik_iomem; - int ik_niomem; - - struct isa_irq *ik_irq; - int ik_nirq; - - struct isa_drq *ik_drq; - int ik_ndrq; -}; - -/* * ISA driver attach arguments */ struct isa_attach_args { @@ -222,9 +179,6 @@ struct isa_softc { bus_dma_tag_t sc_dmat; /* isa DMA tag */ isa_chipset_tag_t sc_ic; - - TAILQ_HEAD(, isa_knowndev) sc_knowndevs; - int sc_dynamicdevs; }; /* Index: sys/dev/isa/isic_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/isic_isa.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 isic_isa.c --- sys/dev/isa/isic_isa.c 16 Nov 2006 01:33:00 -0000 1.27 +++ sys/dev/isa/isic_isa.c 9 Jul 2007 22:40:56 -0000 @@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: isic_isa.c,v extern const struct isdn_layer1_isdnif_driver isic_std_driver; /* local functions */ -static int isic_isa_probe(struct device *, struct cfdata *, void *); +static int isic_isa_probe(struct device *, cfdata_t, void *); static void isic_isa_attach(struct device *, struct device *, void *); static int setup_io_map(int flags, bus_space_tag_t iot, @@ -101,7 +101,7 @@ CFATTACH_DECL(isic_isa, sizeof(struct is * Probe card */ static int -isic_isa_probe(struct device *parent, struct cfdata *cf, void *aux) +isic_isa_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t memt = ia->ia_memt, iot = ia->ia_iot; Index: sys/dev/isa/isic_isa_tel_s0163.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/isic_isa_tel_s0163.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 isic_isa_tel_s0163.c --- sys/dev/isa/isic_isa_tel_s0163.c 4 Mar 2007 06:02:12 -0000 1.9 +++ sys/dev/isa/isic_isa_tel_s0163.c 9 Jul 2007 22:40:56 -0000 @@ -416,7 +416,7 @@ set_softc(struct isic_softc *sc, struct } int -isic_probe_s0163(struct device *dev, struct cfdata *cf, +isic_probe_s0163(struct device *dev, cfdata_t cf, struct isa_attach_args *ia) { u_char byte; Index: sys/dev/isa/it.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/it.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 it.c --- sys/dev/isa/it.c 7 May 2007 10:54:44 -0000 1.8 +++ sys/dev/isa/it.c 9 Jul 2007 22:40:56 -0000 @@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: it.c,v 1.8 2 #define RFACT(x, y) (RFACT_NONE * ((x) + (y)) / (y)) /* autoconf(9) functions */ -static int it_isa_match(struct device *, struct cfdata *, void *); +static int it_isa_match(struct device *, cfdata_t, void *); static void it_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(it_isa, sizeof(struct it_softc), @@ -113,7 +113,7 @@ static const int it_vrfact[] = { }; static int -it_isa_match(struct device *parent, struct cfdata *match, void *aux) +it_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; int rv = 0; Index: sys/dev/isa/joy_ess.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/joy_ess.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 joy_ess.c --- sys/dev/isa/joy_ess.c 11 Dec 2005 12:22:03 -0000 1.2 +++ sys/dev/isa/joy_ess.c 9 Jul 2007 22:40:56 -0000 @@ -12,14 +12,14 @@ #include #include -int joy_ess_match(struct device *, struct cfdata *, void *); +int joy_ess_match(struct device *, cfdata_t, void *); void joy_ess_attach(struct device *, struct device *, void *); CFATTACH_DECL(joy_ess, sizeof (struct joy_softc), joy_ess_match, joy_ess_attach, NULL, NULL); int -joy_ess_match(struct device *parent, struct cfdata *match, void *aux) +joy_ess_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = aux; Index: sys/dev/isa/joy_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/joy_isa.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 joy_isa.c --- sys/dev/isa/joy_isa.c 16 Nov 2006 01:33:00 -0000 1.10 +++ sys/dev/isa/joy_isa.c 9 Jul 2007 22:40:56 -0000 @@ -48,14 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: joy_isa.c,v #define JOY_NPORTS 1 -int joy_isa_probe(struct device *, struct cfdata *, void *); +int joy_isa_probe(struct device *, cfdata_t, void *); void joy_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(joy_isa, sizeof(struct joy_softc), joy_isa_probe, joy_isa_attach, NULL, NULL); int -joy_isa_probe(struct device *parent, struct cfdata *match, +joy_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/lm_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/lm_isa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 lm_isa.c --- sys/dev/isa/lm_isa.c 7 Mar 2007 17:32:47 -0000 1.16 +++ sys/dev/isa/lm_isa.c 9 Jul 2007 22:40:56 -0000 @@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: lm_isa.c,v 1 #endif -int lm_isa_match(struct device *, struct cfdata *, void *); +int lm_isa_match(struct device *, cfdata_t, void *); void lm_isa_attach(struct device *, struct device *, void *); uint8_t lm_isa_readreg(struct lm_softc *, int); void lm_isa_writereg(struct lm_softc *, int, int); @@ -71,7 +71,7 @@ CFATTACH_DECL(lm_isa, sizeof(struct lm_s int -lm_isa_match(struct device *parent, struct cfdata *match, void *aux) +lm_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { bus_space_handle_t ioh; struct isa_attach_args *ia = aux; Index: sys/dev/isa/lpt_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/lpt_isa.c,v retrieving revision 1.63 diff -d -p -u -u -r1.63 lpt_isa.c --- sys/dev/isa/lpt_isa.c 16 Nov 2006 01:33:00 -0000 1.63 +++ sys/dev/isa/lpt_isa.c 9 Jul 2007 22:40:56 -0000 @@ -90,7 +90,7 @@ struct lpt_isa_softc { }; -int lpt_isa_probe(struct device *, struct cfdata *, void *); +int lpt_isa_probe(struct device *, cfdata_t, void *); void lpt_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(lpt_isa, sizeof(struct lpt_isa_softc), @@ -143,7 +143,7 @@ lpt_port_test(bus_space_tag_t iot, bus_s * 3) Set the data and control ports to a value of 0 */ int -lpt_isa_probe(struct device *parent, struct cfdata *match, +lpt_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/mcd.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/mcd.c,v retrieving revision 1.97 diff -d -p -u -u -r1.97 mcd.c --- sys/dev/isa/mcd.c 4 Mar 2007 06:02:13 -0000 1.97 +++ sys/dev/isa/mcd.c 9 Jul 2007 22:40:57 -0000 @@ -188,7 +188,7 @@ int mcd_getqchan(struct mcd_softc *, uni int mcd_setlock(struct mcd_softc *, int); int mcd_find(bus_space_tag_t, bus_space_handle_t, struct mcd_softc *); -int mcdprobe(struct device *, struct cfdata *, void *); +int mcdprobe(struct device *, cfdata_t, void *); void mcdattach(struct device *, struct device *, void *); CFATTACH_DECL(mcd, sizeof(struct mcd_softc), @@ -893,7 +893,7 @@ mcd_find(iot, ioh, sc) } int -mcdprobe(struct device *parent, struct cfdata *match, +mcdprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/midi_pcppi.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/midi_pcppi.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 midi_pcppi.c --- sys/dev/isa/midi_pcppi.c 16 Nov 2006 01:33:00 -0000 1.15 +++ sys/dev/isa/midi_pcppi.c 9 Jul 2007 22:40:57 -0000 @@ -67,7 +67,7 @@ struct midi_pcppi_softc { midisyn sc_midisyn; }; -int midi_pcppi_match(struct device *, struct cfdata *, void *); +int midi_pcppi_match(struct device *, cfdata_t, void *); void midi_pcppi_attach(struct device *, struct device *, void *); void midi_pcppi_on (midisyn *, uint_fast16_t, midipitch_t, int16_t); @@ -88,7 +88,7 @@ struct midisyn_methods midi_pcppi_hw = { int midi_pcppi_attached = 0; /* Not very nice */ int -midi_pcppi_match(struct device *parent, struct cfdata *match, +midi_pcppi_match(struct device *parent, cfdata_t cfdata, void *aux) { return (!midi_pcppi_attached); Index: sys/dev/isa/moxa_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/moxa_isa.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 moxa_isa.c --- sys/dev/isa/moxa_isa.c 16 Nov 2006 01:33:00 -0000 1.14 +++ sys/dev/isa/moxa_isa.c 9 Jul 2007 22:40:57 -0000 @@ -64,7 +64,7 @@ struct moxa_isa_softc { bus_space_handle_t sc_slaveioh[NSLAVES]; }; -int moxa_isaprobe(struct device *, struct cfdata *, void *); +int moxa_isaprobe(struct device *, cfdata_t, void *); void moxa_isaattach(struct device *, struct device *, void *); int moxa_isaintr(void *); @@ -72,7 +72,7 @@ CFATTACH_DECL(moxa_isa, sizeof(struct mo moxa_isaprobe, moxa_isaattach, NULL, NULL); int -moxa_isaprobe(struct device *parent, struct cfdata *self, +moxa_isaprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/mpu_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/mpu_isa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 mpu_isa.c --- sys/dev/isa/mpu_isa.c 16 Nov 2006 01:33:00 -0000 1.16 +++ sys/dev/isa/mpu_isa.c 9 Jul 2007 22:40:57 -0000 @@ -60,14 +60,14 @@ struct mpu_isa_softc { void *sc_ih; /* ISA interrupt handler */ }; -int mpu_isa_match(struct device *, struct cfdata *, void *); +int mpu_isa_match(struct device *, cfdata_t, void *); void mpu_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(mpu_isa, sizeof(struct mpu_isa_softc), mpu_isa_match, mpu_isa_attach, NULL, NULL); int -mpu_isa_match(struct device *parent, struct cfdata *match, +mpu_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/mpu_sb.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/mpu_sb.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 mpu_sb.c --- sys/dev/isa/mpu_sb.c 16 Nov 2006 01:33:00 -0000 1.11 +++ sys/dev/isa/mpu_sb.c 9 Jul 2007 22:40:57 -0000 @@ -57,14 +57,14 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_sb.c,v 1 #include #include -int mpu_sb_match(struct device *, struct cfdata *, void *); +int mpu_sb_match(struct device *, cfdata_t, void *); void mpu_sb_attach(struct device *, struct device *, void *); CFATTACH_DECL(mpu_sb, sizeof(struct mpu_softc), mpu_sb_match, mpu_sb_attach, NULL, NULL); int -mpu_sb_match(struct device *parent, struct cfdata *match, +mpu_sb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; Index: sys/dev/isa/mpu_ym.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/mpu_ym.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 mpu_ym.c --- sys/dev/isa/mpu_ym.c 16 Nov 2006 01:33:00 -0000 1.12 +++ sys/dev/isa/mpu_ym.c 9 Jul 2007 22:40:57 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_ym.c,v 1 #include #include -int mpu_ym_match(struct device *, struct cfdata *, void *); +int mpu_ym_match(struct device *, cfdata_t, void *); void mpu_ym_attach(struct device *, struct device *, void *); #ifndef AUDIO_NO_POWER_CTL int mpu_ym_power_ctl(void *, int); @@ -72,7 +72,7 @@ CFATTACH_DECL(mpu_ym, sizeof(struct mpu_ mpu_ym_match, mpu_ym_attach, NULL, NULL); int -mpu_ym_match(struct device *parent, struct cfdata *match, void *aux) +mpu_ym_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct ym_softc *ssc = (struct ym_softc *)parent; Index: sys/dev/isa/nca_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/nca_isa.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 nca_isa.c --- sys/dev/isa/nca_isa.c 16 Nov 2006 01:33:00 -0000 1.18 +++ sys/dev/isa/nca_isa.c 9 Jul 2007 22:40:57 -0000 @@ -101,7 +101,7 @@ struct nca_isa_probe_data { int nca_isa_find(bus_space_tag_t, bus_space_handle_t, bus_size_t, struct nca_isa_probe_data *); -int nca_isa_match(struct device *, struct cfdata *, void *); +int nca_isa_match(struct device *, cfdata_t, void *); void nca_isa_attach(struct device *, struct device *, void *); int nca_isa_test(bus_space_tag_t, bus_space_handle_t, bus_size_t); @@ -252,7 +252,7 @@ nca_isa_find(iot, ioh, max_offset, epd) * If so, call the real probe to see what it is. */ int -nca_isa_match(struct device *parent, struct cfdata *match, +nca_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/nsclpcsio_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/nsclpcsio_isa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 nsclpcsio_isa.c --- sys/dev/isa/nsclpcsio_isa.c 18 Feb 2007 23:34:55 -0000 1.16 +++ sys/dev/isa/nsclpcsio_isa.c 9 Jul 2007 22:40:57 -0000 @@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: nsclpcsio_is #endif #include -static int nsclpcsio_isa_match(struct device *, struct cfdata *, void *); +static int nsclpcsio_isa_match(struct device *, cfdata_t, void *); static void nsclpcsio_isa_attach(struct device *, struct device *, void *); #define GPIO_NPINS 29 @@ -143,7 +143,7 @@ nscheck(iot, base) static int nsclpcsio_isa_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; int iobase; Index: sys/dev/isa/opl_ess.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/opl_ess.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 opl_ess.c --- sys/dev/isa/opl_ess.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/opl_ess.c 9 Jul 2007 22:40:57 -0000 @@ -63,14 +63,14 @@ __KERNEL_RCSID(0, "$NetBSD: opl_ess.c,v extern int ess_speaker_ctl(void *, int); -int opl_ess_match(struct device *, struct cfdata *, void *); +int opl_ess_match(struct device *, cfdata_t, void *); void opl_ess_attach(struct device *, struct device *, void *); CFATTACH_DECL(opl_ess, sizeof(struct opl_softc), opl_ess_match, opl_ess_attach, NULL, NULL); int -opl_ess_match(struct device *parent, struct cfdata *match, void *aux) +opl_ess_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct ess_softc *ssc = (struct ess_softc *)parent; Index: sys/dev/isa/opl_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/opl_isa.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 opl_isa.c --- sys/dev/isa/opl_isa.c 16 Nov 2006 01:33:00 -0000 1.16 +++ sys/dev/isa/opl_isa.c 9 Jul 2007 22:40:57 -0000 @@ -63,14 +63,14 @@ __KERNEL_RCSID(0, "$NetBSD: opl_isa.c,v #define OPL_SIZE 4 -int opl_isa_match(struct device *, struct cfdata *, void *); +int opl_isa_match(struct device *, cfdata_t, void *); void opl_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(opl_isa, sizeof(struct opl_softc), opl_isa_match, opl_isa_attach, NULL, NULL); int -opl_isa_match(struct device *parent, struct cfdata *match, +opl_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/opl_sb.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/opl_sb.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 opl_sb.c --- sys/dev/isa/opl_sb.c 16 Nov 2006 01:33:00 -0000 1.14 +++ sys/dev/isa/opl_sb.c 9 Jul 2007 22:40:57 -0000 @@ -61,14 +61,14 @@ __KERNEL_RCSID(0, "$NetBSD: opl_sb.c,v 1 #include #include -int opl_sb_match(struct device *, struct cfdata *, void *); +int opl_sb_match(struct device *, cfdata_t, void *); void opl_sb_attach(struct device *, struct device *, void *); CFATTACH_DECL(opl_sb, sizeof(struct opl_softc), opl_sb_match, opl_sb_attach, NULL, NULL); int -opl_sb_match(struct device *parent, struct cfdata *match, void *aux) +opl_sb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct sbdsp_softc *ssc = (struct sbdsp_softc *)parent; Index: sys/dev/isa/opl_wss.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/opl_wss.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 opl_wss.c --- sys/dev/isa/opl_wss.c 16 Nov 2006 01:33:00 -0000 1.10 +++ sys/dev/isa/opl_wss.c 9 Jul 2007 22:40:57 -0000 @@ -61,14 +61,14 @@ __KERNEL_RCSID(0, "$NetBSD: opl_wss.c,v #include #include -int opl_wss_match(struct device *, struct cfdata *, void *); +int opl_wss_match(struct device *, cfdata_t, void *); void opl_wss_attach(struct device *, struct device *, void *); CFATTACH_DECL(opl_wss, sizeof(struct opl_softc), opl_wss_match, opl_wss_attach, NULL, NULL); int -opl_wss_match(struct device *parent, struct cfdata *match, void *aux) +opl_wss_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct wss_softc *ssc = (struct wss_softc *)parent; Index: sys/dev/isa/opl_ym.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/opl_ym.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 opl_ym.c --- sys/dev/isa/opl_ym.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/opl_ym.c 9 Jul 2007 22:40:57 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_ym.c,v 1 #include #include -int opl_ym_match(struct device *, struct cfdata *, void *); +int opl_ym_match(struct device *, cfdata_t, void *); void opl_ym_attach(struct device *, struct device *, void *); #ifndef AUDIO_NO_POWER_CTL int opl_ym_power_ctl(void *, int); @@ -74,7 +74,7 @@ CFATTACH_DECL(opl_ym, sizeof(struct opl_ opl_ym_match, opl_ym_attach, NULL, NULL); int -opl_ym_match(struct device *parent, struct cfdata *match, void *aux) +opl_ym_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct ym_softc *ssc = (struct ym_softc *)parent; Index: sys/dev/isa/pas.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/pas.c,v retrieving revision 1.65 diff -d -p -u -u -r1.65 pas.c --- sys/dev/isa/pas.c 16 Nov 2006 01:33:00 -0000 1.65 +++ sys/dev/isa/pas.c 9 Jul 2007 22:40:57 -0000 @@ -253,7 +253,7 @@ pasconf(int model, int sbbase, int sbirq paswrite(P_M_MV508_INPUTMIX | 30, PARALLEL_MIXER); } -int pasprobe(struct device *, struct cfdata *, void *); +int pasprobe(struct device *, cfdata_t, void *); void pasattach(struct device *, struct device *, void *); static int pasfind(struct device *, struct pas_softc *, struct isa_attach_args *, int); @@ -269,7 +269,7 @@ CFATTACH_DECL(pas, sizeof(struct pas_sof */ int -pasprobe(struct device *parent, struct cfdata *match, void *aux) +pasprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia; struct pas_softc probesc, *sc; @@ -286,9 +286,11 @@ pasprobe(struct device *parent, struct c if (ISA_DIRECT_CONFIG(ia)) return 0; + /* + * XXXfreza: now this is *BROKEN*, pasfind() uses zeroed-out-softc's + * XXXfreza: members! + */ memset(sc, 0, sizeof *sc); - sc->sc_sbdsp.sc_dev.dv_cfdata = match; - strcpy(sc->sc_sbdsp.sc_dev.dv_xname, "pas"); return pasfind(parent, sc, aux, PASPROBE); } Index: sys/dev/isa/pcdisplay.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/pcdisplay.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 pcdisplay.c --- sys/dev/isa/pcdisplay.c 4 Mar 2007 06:02:13 -0000 1.33 +++ sys/dev/isa/pcdisplay.c 9 Jul 2007 22:40:58 -0000 @@ -71,7 +71,7 @@ struct pcdisplay_softc { static int pcdisplayconsole, pcdisplay_console_attached; static struct pcdisplay_config pcdisplay_console_dc; -int pcdisplay_match(struct device *, struct cfdata *, void *); +int pcdisplay_match(struct device *, cfdata_t, void *); void pcdisplay_attach(struct device *, struct device *, void *); static int pcdisplay_is_console(bus_space_tag_t); @@ -224,7 +224,7 @@ pcdisplay_init(dc, iot, memt, mono) } int -pcdisplay_match(struct device *parent, struct cfdata *match, +pcdisplay_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/pckbc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/pckbc_isa.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 pckbc_isa.c --- sys/dev/isa/pckbc_isa.c 16 Nov 2006 01:33:00 -0000 1.20 +++ sys/dev/isa/pckbc_isa.c 9 Jul 2007 22:40:58 -0000 @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_isa.c, #include #include -int pckbc_isa_match(struct device *, struct cfdata *, void *); +int pckbc_isa_match(struct device *, cfdata_t, void *); void pckbc_isa_attach(struct device *, struct device *, void *); struct pckbc_isa_softc { @@ -64,8 +64,7 @@ CFATTACH_DECL(pckbc_isa, sizeof(struct p void pckbc_isa_intr_establish(struct pckbc_softc *, pckbc_slot_t); int -pckbc_isa_match(struct device *parent, struct cfdata *match, - void *aux) +pckbc_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; @@ -76,22 +75,13 @@ pckbc_isa_match(struct device *parent, s return (0); /* If values are hardwired to something that they can't be, punt. */ - if (ia->ia_nio < 1 || - (ia->ia_io[0].ir_addr != ISA_UNKNOWN_PORT && - ia->ia_io[0].ir_addr != IO_KBD)) - return (0); - - if (ia->ia_niomem > 0 && - (ia->ia_iomem[0].ir_addr != ISA_UNKNOWN_IOMEM)) + if (ia->ia_nio == 1 && ia->ia_io[0].ir_addr != IO_KBD) return (0); - if (ia->ia_nirq < 1 || - (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ && - ia->ia_irq[0].ir_irq != 1 /*XXX*/)) + if (ia->ia_niomem > 0) return (0); - if (ia->ia_ndrq > 0 && - (ia->ia_drq[0].ir_drq != ISA_UNKNOWN_DRQ)) + if (ia->ia_ndrq > 0) return (0); if (pckbc_is_console(iot, IO_KBD) == 0) { Index: sys/dev/isa/pcppi.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/pcppi.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 pcppi.c --- sys/dev/isa/pcppi.c 10 Dec 2006 22:10:57 -0000 1.22 +++ sys/dev/isa/pcppi.c 9 Jul 2007 22:40:58 -0000 @@ -56,13 +56,13 @@ __KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1. void pcppi_pckbd_bell(void *, u_int, u_int, u_int, int); #endif -int pcppi_match(struct device *, struct cfdata *, void *); +int pcppi_match(struct device *, cfdata_t, void *); void pcppi_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcppi, sizeof(struct pcppi_softc), pcppi_match, pcppi_isa_attach, NULL, NULL); -static int pcppisearch(device_t, cfdata_t, const int *, void *); +static int pcppisearch(device_t, cfdata_t, prop_dictionary_t, void *); static void pcppi_bell_stop(void*); #if NATTIMER > 0 @@ -72,7 +72,7 @@ static void pcppi_attach_speaker(struct #define PCPPIPRI (PZERO - 1) int -pcppi_match(struct device *parent, struct cfdata *match, +pcppi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; @@ -189,11 +189,12 @@ pcppi_attach(struct pcppi_softc *sc) } static int -pcppisearch(device_t parent, cfdata_t cf, const int *locs, void *aux) +pcppisearch(device_t parent, cfdata_t cfdata, prop_dictionary_t locs, + void *aux) { - if (config_match(parent, cf, aux)) - config_attach_loc(parent, cf, locs, aux, NULL); + if (config_match(parent, cfdata, aux)) + config_attach_loc(parent, cfdata, locs, aux, NULL); return 0; } Index: sys/dev/isa/radiotrack.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/radiotrack.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 radiotrack.c --- sys/dev/isa/radiotrack.c 16 Nov 2006 01:33:00 -0000 1.14 +++ sys/dev/isa/radiotrack.c 9 Jul 2007 22:40:58 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: radiotrack.c #define RT_VOLUME_STEADY (3 << 6) #define RT_VOLUME_DELAY 100000 -int rt_probe(struct device *, struct cfdata *, void *); +int rt_probe(struct device *, cfdata_t, void *); void rt_attach(struct device *, struct device * self, void *); int rt_get_info(void *, struct radio_info *); int rt_set_info(void *, struct radio_info *); @@ -131,7 +131,7 @@ u_int8_t rt_conv_vol(u_int8_t); u_int8_t rt_unconv_vol(u_int8_t); int -rt_probe(struct device *parent, struct cfdata *cf, void *aux) +rt_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_tag_t iot = ia->ia_iot; Index: sys/dev/isa/radiotrack2.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/radiotrack2.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 radiotrack2.c --- sys/dev/isa/radiotrack2.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/radiotrack2.c 9 Jul 2007 22:40:58 -0000 @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: radiotrack2. #define RTII_READ_CLOCK_LOW (RTII_DATA_ON | RTII_CLCK_OFF | RTII_WREN_OFF) #define RTII_READ_CLOCK_HIGH (RTII_DATA_ON | RTII_CLCK_ON | RTII_WREN_OFF) -int rtii_probe(struct device *, struct cfdata *, void *); +int rtii_probe(struct device *, cfdata_t, void *); void rtii_attach(struct device *, struct device * self, void *); int rtii_get_info(void *, struct radio_info *); @@ -121,7 +121,7 @@ void rtii_rset(bus_space_tag_t, bus_spac void rtii_write_bit(bus_space_tag_t, bus_space_handle_t, bus_size_t, int); int -rtii_probe(struct device *parent, struct cfdata *cf, +rtii_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/rtfps.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/rtfps.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 rtfps.c --- sys/dev/isa/rtfps.c 16 Nov 2006 01:33:00 -0000 1.52 +++ sys/dev/isa/rtfps.c 9 Jul 2007 22:40:58 -0000 @@ -66,7 +66,7 @@ struct rtfps_softc { bus_space_handle_t sc_slaveioh[NSLAVES]; }; -int rtfpsprobe(struct device *, struct cfdata *, void *); +int rtfpsprobe(struct device *, cfdata_t, void *); void rtfpsattach(struct device *, struct device *, void *); int rtfpsintr(void *); @@ -74,7 +74,7 @@ CFATTACH_DECL(rtfps, sizeof(struct rtfps rtfpsprobe, rtfpsattach, NULL, NULL); int -rtfpsprobe(struct device *parent, struct cfdata *self, +rtfpsprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/satlink.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/satlink.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 satlink.c --- sys/dev/isa/satlink.c 4 Mar 2007 06:02:13 -0000 1.31 +++ sys/dev/isa/satlink.c 9 Jul 2007 22:40:59 -0000 @@ -100,7 +100,7 @@ struct satlink_softc { */ #define SATLINK_TIMEOUT (hz/10) -int satlinkprobe(struct device *, struct cfdata *, void *); +int satlinkprobe(struct device *, cfdata_t, void *); void satlinkattach(struct device *, struct device *, void *); void satlinktimeout(void *); @@ -122,7 +122,7 @@ const struct cdevsw satlink_cdevsw = { }; int -satlinkprobe(struct device *parent, struct cfdata *match, +satlinkprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/sb_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/sb_isa.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 sb_isa.c --- sys/dev/isa/sb_isa.c 16 Nov 2006 01:33:00 -0000 1.34 +++ sys/dev/isa/sb_isa.c 9 Jul 2007 22:40:59 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: sb_isa.c,v 1 static int sbfind(struct device *, struct sbdsp_softc *, int, struct isa_attach_args *); -int sb_isa_match(struct device *, struct cfdata *, void *); +int sb_isa_match(struct device *, cfdata_t, void *); void sb_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(sb_isa, sizeof(struct sbdsp_softc), @@ -77,9 +77,9 @@ CFATTACH_DECL(sb_isa, sizeof(struct sbds * Probe for the soundblaster hardware. */ int -sb_isa_match(parent, match, aux) +sb_isa_match(parent, cfdata, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct isa_attach_args *ia = aux; @@ -95,9 +95,9 @@ sb_isa_match(parent, match, aux) if (ISA_DIRECT_CONFIG(ia)) return (0); + /* XXXfreza: abuse! */ memset(sc, 0, sizeof *sc); strcpy(sc->sc_dev.dv_xname, "sb"); - sc->sc_dev.dv_cfdata = match; return sbfind(parent, sc, 1, aux); } Index: sys/dev/isa/sbdsp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/sbdsp.c,v retrieving revision 1.126 diff -d -p -u -u -r1.126 sbdsp.c --- sys/dev/isa/sbdsp.c 16 Nov 2006 01:33:00 -0000 1.126 +++ sys/dev/isa/sbdsp.c 9 Jul 2007 22:40:59 -0000 @@ -275,7 +275,7 @@ sbdsp_probe(struct sbdsp_softc *sc) return 0; } /* if flags set, go and probe the jazz16 stuff */ - if (device_cfdata(&sc->sc_dev)->cf_flags & 1) + if (cfdata_flags(device_cfdata(&sc->sc_dev)) & 1) sbdsp_jazz16_probe(sc); else sbversion(sc); Index: sys/dev/isa/seagate.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/seagate.c,v retrieving revision 1.62 diff -d -p -u -u -r1.62 seagate.c --- sys/dev/isa/seagate.c 4 Mar 2007 06:02:13 -0000 1.62 +++ sys/dev/isa/seagate.c 9 Jul 2007 22:41:00 -0000 @@ -294,7 +294,7 @@ int sea_abort(struct sea_softc *, struct void sea_grow_scb(struct sea_softc *); -int seaprobe(struct device *, struct cfdata *, void *); +int seaprobe(struct device *, cfdata_t, void *); void seaattach(struct device *, struct device *, void *); CFATTACH_DECL(sea, sizeof(struct sea_softc), @@ -327,7 +327,7 @@ sea_queue_length(sea) * Returns 1 if card recognized, 0 if errors. */ int -seaprobe(struct device *parent, struct cfdata *match, +seaprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/sf16fmr2.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/sf16fmr2.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 sf16fmr2.c --- sys/dev/isa/sf16fmr2.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/sf16fmr2.c 9 Jul 2007 22:41:00 -0000 @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: sf16fmr2.c,v #define SF16FMR2_READ_CLOCK_HIGH \ SF16FMR2_DATA_ON | SF16FMR2_CLCK_ON | SF16FMR2_WREN_OFF -int sf2r_probe(struct device *, struct cfdata *, void *); +int sf2r_probe(struct device *, cfdata_t, void *); void sf2r_attach(struct device *, struct device * self, void *); int sf2r_get_info(void *, struct radio_info *); @@ -121,7 +121,7 @@ void sf2r_rset(bus_space_tag_t, bus_spac void sf2r_write_bit(bus_space_tag_t, bus_space_handle_t, bus_size_t, int); int -sf2r_probe(struct device *parent, struct cfdata *cf, +sf2r_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/slhci_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/slhci_isa.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 slhci_isa.c --- sys/dev/isa/slhci_isa.c 16 Nov 2006 01:33:00 -0000 1.6 +++ sys/dev/isa/slhci_isa.c 9 Jul 2007 22:41:00 -0000 @@ -59,14 +59,14 @@ struct slhci_isa_softc { void *sc_ih; }; -static int slhci_isa_match(struct device *, struct cfdata *, void *); +static int slhci_isa_match(struct device *, cfdata_t, void *); static void slhci_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(slhci_isa, sizeof(struct slhci_isa_softc), slhci_isa_match, slhci_isa_attach, NULL, NULL); static int -slhci_isa_match(struct device *parent, struct cfdata *cf, +slhci_isa_match(struct device *parent, cfdata_t cf, void *aux) { struct slhci_softc sc; Index: sys/dev/isa/smsc.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/smsc.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 smsc.c --- sys/dev/isa/smsc.c 1 Jun 2007 14:11:59 -0000 1.1 +++ sys/dev/isa/smsc.c 9 Jul 2007 22:41:00 -0000 @@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: smsc.c,v 1.1 #define DPRINTF(x) #endif -int smsc_probe(struct device *, struct cfdata *, void *); +int smsc_probe(struct device *, cfdata_t, void *); void smsc_attach(struct device *, struct device *, void *); static uint8_t smsc_readreg(struct smsc_softc *, int); /*static void smsc_writereg(struct smsc_softc *, int, int);*/ @@ -98,7 +98,7 @@ struct smsc_sysmon { * Probe for the SMSC Super I/O chip */ int -smsc_probe(struct device *parent, struct cfdata *match, void *aux) +smsc_probe(struct device *parent, cfdata_t cfdata, void *aux) { bus_space_handle_t ioh; struct isa_attach_args *ia = aux; Index: sys/dev/isa/spkr.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/spkr.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 spkr.c --- sys/dev/isa/spkr.c 4 Mar 2007 06:02:13 -0000 1.24 +++ sys/dev/isa/spkr.c 9 Jul 2007 22:41:01 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.2 #include -int spkrprobe(struct device *, struct cfdata *, void *); +int spkrprobe(struct device *, cfdata_t, void *); void spkrattach(struct device *, struct device *, void *); struct spkr_softc { @@ -407,7 +407,7 @@ static void *spkr_inbuf; static int spkr_attached = 0; int -spkrprobe(struct device *parent, struct cfdata *match, +spkrprobe(struct device *parent, cfdata_t cfdata, void *aux) { return (!spkr_attached); Index: sys/dev/isa/tcic2_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/tcic2_isa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 tcic2_isa.c --- sys/dev/isa/tcic2_isa.c 16 Nov 2006 01:33:00 -0000 1.17 +++ sys/dev/isa/tcic2_isa.c 9 Jul 2007 22:41:01 -0000 @@ -110,7 +110,7 @@ int tcic_isa_debug = 1; #define DPRINTF(arg) #endif -int tcic_isa_probe(struct device *, struct cfdata *, void *); +int tcic_isa_probe(struct device *, cfdata_t, void *); void tcic_isa_attach(struct device *, struct device *, void *); void *tcic_isa_chip_intr_establish(pcmcia_chipset_handle_t, @@ -142,7 +142,7 @@ static struct pcmcia_chip_functions tcic }; int -tcic_isa_probe(struct device *parent, struct cfdata *match, +tcic_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/tcom.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/tcom.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 tcom.c --- sys/dev/isa/tcom.c 16 Nov 2006 01:33:00 -0000 1.13 +++ sys/dev/isa/tcom.c 9 Jul 2007 22:41:01 -0000 @@ -110,7 +110,7 @@ struct tcom_softc { bus_space_handle_t sc_statusioh; }; -int tcomprobe(struct device *, struct cfdata *, void *); +int tcomprobe(struct device *, cfdata_t, void *); void tcomattach(struct device *, struct device *, void *); int tcomintr(void *); @@ -118,7 +118,7 @@ CFATTACH_DECL(tcom, sizeof(struct tcom_s tcomprobe, tcomattach, NULL, NULL); int -tcomprobe(struct device *parent, struct cfdata *self, +tcomprobe(struct device *parent, cfdata_tself, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/toaster.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/toaster.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 toaster.c --- sys/dev/isa/toaster.c 29 Jan 2007 01:52:45 -0000 1.3 +++ sys/dev/isa/toaster.c 9 Jul 2007 22:41:01 -0000 @@ -70,7 +70,7 @@ struct toaster_softc { struct callout led_callout[4]; }; -static int toaster_match(struct device *, struct cfdata *, void *); +static int toaster_match(struct device *, cfdata_t, void *); static void toaster_attach(struct device *, struct device *, void *); extern struct cfdriver toaster_cd; @@ -83,7 +83,7 @@ static struct toaster_softc *toaster_sc static int toaster_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { /* No more than one toaster per system */ Index: sys/dev/isa/toasterlcd.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/toasterlcd.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 toasterlcd.c --- sys/dev/isa/toasterlcd.c 29 Jan 2007 01:52:45 -0000 1.3 +++ sys/dev/isa/toasterlcd.c 9 Jul 2007 22:41:01 -0000 @@ -69,7 +69,7 @@ struct toasterlcd_softc { bus_space_handle_t sc_gpioh; }; -static int toasterlcd_match(struct device *, struct cfdata *, void *); +static int toasterlcd_match(struct device *, cfdata_t, void *); static void toasterlcd_attach(struct device *, struct device *, void *); static void toasterlcd_writereg(struct hd44780_chip *, u_int32_t, u_int32_t, u_int8_t); @@ -101,7 +101,7 @@ static const struct wsscreen_list toaste static int toasterlcd_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { return 1; Index: sys/dev/isa/tsdio.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/tsdio.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 tsdio.c --- sys/dev/isa/tsdio.c 11 Dec 2005 12:22:03 -0000 1.3 +++ sys/dev/isa/tsdio.c 9 Jul 2007 22:41:01 -0000 @@ -51,9 +51,9 @@ __KERNEL_RCSID(0, "$NetBSD: tsdio.c,v 1. #include #include -int tsdio_probe(struct device *, struct cfdata *, void *); +int tsdio_probe(struct device *, cfdata_t, void *); void tsdio_attach(struct device *, struct device *, void *); -int tsdio_search(struct device *, struct cfdata *, const int *, void *); +int tsdio_search(struct device *, cfdata_t, const int *, void *); int tsdio_print(void *, const char *); CFATTACH_DECL(tsdio, sizeof(struct tsdio_softc), Index: sys/dev/isa/ug_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/ug_isa.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 ug_isa.c --- sys/dev/isa/ug_isa.c 8 May 2007 16:48:38 -0000 1.1 +++ sys/dev/isa/ug_isa.c 9 Jul 2007 22:41:01 -0000 @@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: ug_isa.c,v 1 #include /* autoconf(9) functions */ -static int ug_isa_match(struct device *, struct cfdata *, void *); +static int ug_isa_match(struct device *, cfdata_t, void *); static void ug_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(ug_isa, sizeof(struct ug_softc), @@ -66,7 +66,7 @@ CFATTACH_DECL(ug_isa, sizeof(struct ug_s extern uint8_t ug_ver; static int -ug_isa_match(struct device *parent, struct cfdata *match, void *aux) +ug_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; struct ug_softc wrap_sc; Index: sys/dev/isa/uha_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/uha_isa.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 uha_isa.c --- sys/dev/isa/uha_isa.c 16 Nov 2006 01:33:00 -0000 1.31 +++ sys/dev/isa/uha_isa.c 9 Jul 2007 22:41:01 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: uha_isa.c,v #define UHA_ISA_IOSIZE 16 -int uha_isa_probe(struct device *, struct cfdata *, void *); +int uha_isa_probe(struct device *, cfdata_t, void *); void uha_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(uha_isa, sizeof(struct uha_softc), @@ -85,7 +85,7 @@ void u14_init(struct uha_softc *); * the actual probe routine to check it out. */ int -uha_isa_probe(struct device *parent, struct cfdata *match, +uha_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/vga_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/vga_isa.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 vga_isa.c --- sys/dev/isa/vga_isa.c 16 Nov 2006 01:33:00 -0000 1.20 +++ sys/dev/isa/vga_isa.c 9 Jul 2007 22:41:01 -0000 @@ -47,14 +47,14 @@ __KERNEL_RCSID(0, "$NetBSD: vga_isa.c,v #include #include -int vga_isa_match(struct device *, struct cfdata *, void *); +int vga_isa_match(struct device *, cfdata_t, void *); void vga_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(vga_isa, sizeof(struct vga_softc), vga_isa_match, vga_isa_attach, NULL, NULL); int -vga_isa_match(struct device *parent, struct cfdata *match, +vga_isa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/wdc_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/wdc_isa.c,v retrieving revision 1.51 diff -d -p -u -u -r1.51 wdc_isa.c --- sys/dev/isa/wdc_isa.c 16 Nov 2006 01:33:00 -0000 1.51 +++ sys/dev/isa/wdc_isa.c 9 Jul 2007 22:41:01 -0000 @@ -74,7 +74,7 @@ struct wdc_isa_softc { int sc_drq; }; -static int wdc_isa_probe(struct device *, struct cfdata *, void *); +static int wdc_isa_probe(struct device *, cfdata_t, void *); static void wdc_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(wdc_isa, sizeof(struct wdc_isa_softc), @@ -88,7 +88,7 @@ static int wdc_isa_dma_finish(void*, int #endif static int -wdc_isa_probe(struct device *parent, struct cfdata *match, +wdc_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct ata_channel ch; @@ -158,7 +158,7 @@ wdc_isa_attach(struct device *parent, st struct wdc_isa_softc *sc = (void *)self; struct wdc_regs *wdr; struct isa_attach_args *ia = aux; - int wdc_cf_flags = device_cfdata(self)->cf_flags; + int wdc_cf_flags = cfdata_flags(device_cfdata(self)); int i; sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; Index: sys/dev/isa/wds.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/wds.c,v retrieving revision 1.66 diff -d -p -u -u -r1.66 wds.c --- sys/dev/isa/wds.c 4 Mar 2007 06:02:13 -0000 1.66 +++ sys/dev/isa/wds.c 9 Jul 2007 22:41:01 -0000 @@ -206,7 +206,7 @@ int wds_ipoll(struct wds_softc *, struct void wds_timeout(void *); int wds_create_scbs(struct wds_softc *, void *, size_t); -int wdsprobe(struct device *, struct cfdata *, void *); +int wdsprobe(struct device *, cfdata_t, void *); void wdsattach(struct device *, struct device *, void *); CFATTACH_DECL(wds, sizeof(struct wds_softc), @@ -259,7 +259,7 @@ wds_cmd(iot, ioh, ibuf, icnt) * Check for the presence of a WD7000 SCSI controller. */ int -wdsprobe(struct device *parent, struct cfdata *match, +wdsprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isa/wss.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/wss.c,v retrieving revision 1.67 diff -d -p -u -u -r1.67 wss.c --- sys/dev/isa/wss.c 16 Nov 2006 01:33:00 -0000 1.67 +++ sys/dev/isa/wss.c 9 Jul 2007 22:41:02 -0000 @@ -449,7 +449,8 @@ madattach(struct wss_softc *sc) return; /* Do we want the joystick disabled? */ - joy = device_cfdata(&ac->sc_dev)->cf_flags & 2 ? MC1_JOYDISABLE : 0; + joy = cfdata_flags(device_cfdata(&ac->sc_dev)) & 2 ? + MC1_JOYDISABLE : 0; /* enable WSS emulation at the I/O port */ mad_write(sc, MC1_PORT, M_WSS_PORT_SELECT(sc->mad_ioindex) | joy); Index: sys/dev/isa/wss_isa.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/wss_isa.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 wss_isa.c --- sys/dev/isa/wss_isa.c 16 Nov 2006 01:33:00 -0000 1.23 +++ sys/dev/isa/wss_isa.c 9 Jul 2007 22:41:02 -0000 @@ -72,13 +72,13 @@ extern int wssdebug; #endif static int wssfind(struct device *, struct wss_softc *, int, - struct isa_attach_args *); + struct isa_attach_args *, uint64_t); static void madprobe(struct wss_softc *, int); static void madunmap(struct wss_softc *); static int detect_mad16(struct wss_softc *, int); -int wss_isa_probe(struct device *, struct cfdata *, void *); +int wss_isa_probe(struct device *, cfdata_t, void *); void wss_isa_attach(struct device *, struct device *, void *); CFATTACH_DECL(wss_isa, sizeof(struct wss_softc), @@ -88,7 +88,7 @@ CFATTACH_DECL(wss_isa, sizeof(struct wss * Probe for the Microsoft Sound System hardware. */ int -wss_isa_probe(struct device *parent, struct cfdata *match, void *aux) +wss_isa_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia; struct wss_softc probesc, *sc; @@ -108,8 +108,7 @@ wss_isa_probe(struct device *parent, str return 0; memset(sc, 0, sizeof *sc); - ac->sc_dev.dv_cfdata = match; - if (wssfind(parent, sc, 1, aux)) { + if (wssfind(parent, sc, 1, aux, cfdata_flags(cfdata))) { bus_space_unmap(sc->sc_iot, sc->sc_ioh, WSS_CODEC); ad1848_isa_unmap(&sc->sc_ad1848); madunmap(sc); @@ -121,7 +120,7 @@ wss_isa_probe(struct device *parent, str static int wssfind(struct device *parent, struct wss_softc *sc, int probing, - struct isa_attach_args *ia) + struct isa_attach_args *ia, uint64_t cflags) { static u_char interrupt_bits[12] = { -1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20 @@ -132,7 +131,7 @@ wssfind(struct device *parent, struct ws ac = &sc->sc_ad1848.sc_ad1848; sc->sc_iot = ia->ia_iot; - if (device_cfdata(&ac->sc_dev)->cf_flags & 1) + if (cflags & 1) madprobe(sc, ia->ia_io[0].ir_addr); else sc->mad_chip_type = MAD_NONE; @@ -241,7 +240,7 @@ wss_isa_attach(struct device *parent, st sc = (struct wss_softc *)self; ac = (struct ad1848_softc *)&sc->sc_ad1848; ia = (struct isa_attach_args *)aux; - if (!wssfind(parent, sc, 0, ia)) { + if (!wssfind(parent, sc, 0, ia, cfdata_flags(device_cfdata(self)))) { printf("%s: wssfind failed\n", ac->sc_dev.dv_xname); return; } Index: sys/dev/isa/wt.c =================================================================== RCS file: /cvsroot/src/sys/dev/isa/wt.c,v retrieving revision 1.75 diff -d -p -u -u -r1.75 wt.c --- sys/dev/isa/wt.c 4 Mar 2007 06:02:13 -0000 1.75 +++ sys/dev/isa/wt.c 9 Jul 2007 22:41:02 -0000 @@ -181,7 +181,7 @@ static int wtwritefm(struct wt_softc *sc static u_char wtsoft(struct wt_softc *sc, int mask, int bits); static int wtintr(void *sc); -int wtprobe(struct device *, struct cfdata *, void *); +int wtprobe(struct device *, cfdata_t, void *); void wtattach(struct device *, struct device *, void *); CFATTACH_DECL(wt, sizeof(struct wt_softc), @@ -193,7 +193,7 @@ extern struct cfdriver wt_cd; * Probe for the presence of the device. */ int -wtprobe(struct device *parent, struct cfdata *match, +wtprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct isa_attach_args *ia = aux; Index: sys/dev/isapnp/aha_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/aha_isapnp.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 aha_isapnp.c --- sys/dev/isapnp/aha_isapnp.c 16 Nov 2006 01:33:05 -0000 1.12 +++ sys/dev/isapnp/aha_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -60,15 +60,14 @@ __KERNEL_RCSID(0, "$NetBSD: aha_isapnp.c #include #include -int aha_isapnp_probe(struct device *, struct cfdata *, void *); +int aha_isapnp_probe(struct device *, cfdata_t, void *); void aha_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(aha_isapnp, sizeof(struct aha_softc), aha_isapnp_probe, aha_isapnp_attach, NULL, NULL); int -aha_isapnp_probe(struct device *parent, struct cfdata *match, - void *aux) +aha_isapnp_probe(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/aic_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/aic_isapnp.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 aic_isapnp.c --- sys/dev/isapnp/aic_isapnp.c 16 Nov 2006 01:33:05 -0000 1.14 +++ sys/dev/isapnp/aic_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -64,15 +64,14 @@ struct aic_isapnp_softc { void *sc_ih; /* interrupt handler */ }; -int aic_isapnp_match(struct device *, struct cfdata *, void *); +int aic_isapnp_match(struct device *, cfdata_t, void *); void aic_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(aic_isapnp, sizeof(struct aic_isapnp_softc), aic_isapnp_match, aic_isapnp_attach, NULL, NULL); int -aic_isapnp_match(struct device *parent, struct cfdata *match, - void *aux) +aic_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/atppc_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/atppc_isapnp.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 atppc_isapnp.c --- sys/dev/isapnp/atppc_isapnp.c 4 Mar 2007 06:02:13 -0000 1.6 +++ sys/dev/isapnp/atppc_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: atppc_isapnp #include #include -static int atppc_isapnp_match(struct device *, struct cfdata *, void *); +static int atppc_isapnp_match(struct device *, cfdata_t, void *); static void atppc_isapnp_attach(struct device *, struct device *, void *); struct atppc_isapnp_softc { @@ -87,7 +87,7 @@ static void atppc_isapnp_dma_free(struct * atppc_isapnp_match: autoconf(9) match routine */ static int -atppc_isapnp_match(struct device *parent, struct cfdata *match, void *aux) +atppc_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/com_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/com_isapnp.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 com_isapnp.c --- sys/dev/isapnp/com_isapnp.c 16 Nov 2006 01:33:05 -0000 1.26 +++ sys/dev/isapnp/com_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -67,14 +67,14 @@ struct com_isapnp_softc { void *sc_ih; /* interrupt handler */ }; -int com_isapnp_match(struct device *, struct cfdata *, void *); +int com_isapnp_match(struct device *, cfdata_t, void *); void com_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_isapnp, sizeof(struct com_isapnp_softc), com_isapnp_match, com_isapnp_attach, NULL, NULL); int -com_isapnp_match(struct device *parent, struct cfdata *match, +com_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/ess_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/ess_isapnp.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 ess_isapnp.c --- sys/dev/isapnp/ess_isapnp.c 16 Nov 2006 01:33:05 -0000 1.17 +++ sys/dev/isapnp/ess_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: ess_isapnp.c #include #include -int ess_isapnp_match(struct device *, struct cfdata *, void *); +int ess_isapnp_match(struct device *, cfdata_t, void *); void ess_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(ess_isapnp, sizeof(struct ess_softc), @@ -75,7 +75,7 @@ CFATTACH_DECL(ess_isapnp, sizeof(struct * Probe for the ess hardware. */ int -ess_isapnp_match(struct device *parent, struct cfdata *match, +ess_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/gus_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/gus_isapnp.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 gus_isapnp.c --- sys/dev/isapnp/gus_isapnp.c 16 Nov 2006 01:33:05 -0000 1.30 +++ sys/dev/isapnp/gus_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c #include -int gus_isapnp_match(struct device *, struct cfdata *, void *); +int gus_isapnp_match(struct device *, cfdata_t, void *); void gus_isapnp_attach(struct device *, struct device *, void *); static int gus_isapnp_open(void *, int); @@ -126,7 +126,7 @@ extern struct cfdriver guspnp_cd; static int gus_0 = 1; /* XXX what's this */ int -gus_isapnp_match(struct device *parent, struct cfdata *match, +gus_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/i82365_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/i82365_isapnp.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 i82365_isapnp.c --- sys/dev/isapnp/i82365_isapnp.c 16 Nov 2006 01:33:05 -0000 1.23 +++ sys/dev/isapnp/i82365_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -65,7 +65,7 @@ int pcicisapnp_debug = 0 /* XXX */ ; #define DPRINTF(arg) #endif -int pcic_isapnp_match(struct device *, struct cfdata *, void *); +int pcic_isapnp_match(struct device *, cfdata_t, void *); void pcic_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcic_isapnp, sizeof(struct pcic_isa_softc), @@ -92,7 +92,7 @@ static struct pcmcia_chip_functions pcic }; int -pcic_isapnp_match(struct device *parent, struct cfdata *match, +pcic_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_an_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_an_isapnp.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_an_isapnp.c --- sys/dev/isapnp/if_an_isapnp.c 16 Nov 2006 01:33:05 -0000 1.15 +++ sys/dev/isapnp/if_an_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_an_isapnp #include #include -int an_isapnp_match(struct device *, struct cfdata *, void *); +int an_isapnp_match(struct device *, cfdata_t, void *); void an_isapnp_attach(struct device *, struct device *, void *); struct an_isapnp_softc { @@ -90,7 +90,7 @@ CFATTACH_DECL(an_isapnp, sizeof(struct a an_isapnp_match, an_isapnp_attach, NULL, NULL); int -an_isapnp_match(struct device *parent, struct cfdata *match, +an_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_cs_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_cs_isapnp.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 if_cs_isapnp.c --- sys/dev/isapnp/if_cs_isapnp.c 29 Mar 2006 06:51:47 -0000 1.9 +++ sys/dev/isapnp/if_cs_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_isapnp #define DEVNAME(sc) (sc)->sc_dev.dv_xname -int cs_isapnp_match(struct device *, struct cfdata *, void *); +int cs_isapnp_match(struct device *, cfdata_t, void *); void cs_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(cs_isapnp, sizeof(struct cs_softc), @@ -66,7 +66,7 @@ CFATTACH_DECL(cs_isapnp, sizeof(struct c int cs_isapnp_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { int pri, variant; Index: sys/dev/isapnp/if_ep_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_ep_isapnp.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 if_ep_isapnp.c --- sys/dev/isapnp/if_ep_isapnp.c 16 Nov 2006 01:33:05 -0000 1.31 +++ sys/dev/isapnp/if_ep_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -63,14 +63,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_isapnp #include #include -int ep_isapnp_match(struct device *, struct cfdata *, void *); +int ep_isapnp_match(struct device *, cfdata_t, void *); void ep_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(ep_isapnp, sizeof(struct ep_softc), ep_isapnp_match, ep_isapnp_attach, NULL, NULL); int -ep_isapnp_match(struct device *parent, struct cfdata *match, +ep_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_fmv_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_fmv_isapnp.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 if_fmv_isapnp.c --- sys/dev/isapnp/if_fmv_isapnp.c 16 Nov 2006 01:33:05 -0000 1.8 +++ sys/dev/isapnp/if_fmv_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_fmv_isapn #include #include -int fmv_isapnp_match(struct device *, struct cfdata *, void *); +int fmv_isapnp_match(struct device *, cfdata_t, void *); void fmv_isapnp_attach(struct device *, struct device *, void *); struct fmv_isapnp_softc { @@ -76,7 +76,7 @@ CFATTACH_DECL(fmv_isapnp, sizeof(struct fmv_isapnp_match, fmv_isapnp_attach, NULL, NULL); int -fmv_isapnp_match(struct device *parent, struct cfdata *match, +fmv_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_le_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_le_isapnp.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 if_le_isapnp.c --- sys/dev/isapnp/if_le_isapnp.c 4 Mar 2007 06:02:13 -0000 1.31 +++ sys/dev/isapnp/if_le_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -127,7 +127,7 @@ struct le_isapnp_softc { int sc_rap, sc_rdp; /* offsets to LANCE registers */ }; -int le_isapnp_match(struct device *, struct cfdata *, void *); +int le_isapnp_match(struct device *, cfdata_t, void *); void le_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(le_isapnp, sizeof(struct le_isapnp_softc), @@ -166,7 +166,7 @@ le_isapnp_rdcsr(sc, port) } int -le_isapnp_match(struct device *parent, struct cfdata *match, +le_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_ne_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_ne_isapnp.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 if_ne_isapnp.c --- sys/dev/isapnp/if_ne_isapnp.c 16 Nov 2006 01:33:05 -0000 1.23 +++ sys/dev/isapnp/if_ne_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ne_isapnp #include #include -static int ne_isapnp_match(struct device *, struct cfdata *, void *); +static int ne_isapnp_match(struct device *, cfdata_t, void *); static void ne_isapnp_attach(struct device *, struct device *, void *); struct ne_isapnp_softc { @@ -87,7 +87,7 @@ CFATTACH_DECL(ne_isapnp, sizeof(struct n ne_isapnp_match, ne_isapnp_attach, NULL, NULL); static int -ne_isapnp_match(struct device *parent, struct cfdata *match, +ne_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/if_tr_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/if_tr_isapnp.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_tr_isapnp.c --- sys/dev/isapnp/if_tr_isapnp.c 16 Nov 2006 01:33:05 -0000 1.15 +++ sys/dev/isapnp/if_tr_isapnp.c 9 Jul 2007 22:41:03 -0000 @@ -68,14 +68,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_tr_isapnp #include #include -int tr_isapnp_match(struct device *, struct cfdata *, void *); +int tr_isapnp_match(struct device *, cfdata_t, void *); void tr_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(tr_isapnp, sizeof(struct tr_softc), tr_isapnp_match, tr_isapnp_attach, NULL, NULL); int -tr_isapnp_match(struct device *parent, struct cfdata *match, +tr_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/isapnp.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 isapnp.c --- sys/dev/isapnp/isapnp.c 16 Nov 2006 01:33:05 -0000 1.52 +++ sys/dev/isapnp/isapnp.c 9 Jul 2007 22:41:04 -0000 @@ -81,11 +81,11 @@ static void isapnp_configure(struct isap static void isapnp_print_pin(const char *, struct isapnp_pin *, size_t); static int isapnp_print(void *, const char *); #ifdef _KERNEL -static int isapnp_submatch(struct device *, struct cfdata *, - const int *, void *); +static int isapnp_submatch(struct device *, cfdata_t, prop_dictionary_t, + void *); #endif static int isapnp_find(struct isapnp_softc *, int); -static int isapnp_match(struct device *, struct cfdata *, void *); +static int isapnp_match(struct device *, cfdata_t, void *); static void isapnp_attach(struct device *, struct device *, void *); static void isapnp_callback(struct device *); @@ -601,11 +601,11 @@ isapnp_print(aux, str) * Probe the logical device... */ static int -isapnp_submatch(struct device *parent, struct cfdata *match, - const int *ldesc, void *aux) +isapnp_submatch(struct device *parent, cfdata_t cfdata, prop_dictionary_t locs, + void *aux) { - return (config_match(parent, match, aux)); + return (config_match(parent, cfdata, aux)); } @@ -883,7 +883,7 @@ isapnp_configure(sc, ipa) * Probe routine */ static int -isapnp_match(struct device *parent, struct cfdata *match, void *aux) +isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { struct isapnp_softc sc; struct isa_attach_args *ia = aux; @@ -917,13 +917,6 @@ isapnp_match(struct device *parent, stru * We always match. We must let all legacy ISA devices map * their address spaces before we look for a read port. */ - ia->ia_io[0].ir_addr = ISAPNP_ADDR; - ia->ia_io[0].ir_size = 1; - - ia->ia_niomem = 0; - ia->ia_nirq = 0; - ia->ia_ndrq = 0; - return (1); } Index: sys/dev/isapnp/isic_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/isic_isapnp.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 isic_isapnp.c --- sys/dev/isapnp/isic_isapnp.c 29 Jan 2007 01:52:45 -0000 1.25 +++ sys/dev/isapnp/isic_isapnp.c 9 Jul 2007 22:41:04 -0000 @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: isic_isapnp. extern const struct isdn_layer1_isdnif_driver isic_std_driver; -static int isic_isapnp_probe(struct device *, struct cfdata *, void *); +static int isic_isapnp_probe(struct device *, cfdata_t, void *); static void isic_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(isic_isapnp, sizeof(struct isic_softc), @@ -162,7 +162,7 @@ isic_isapnp_descriptions[] = */ static int isic_isapnp_probe(struct device *parent, - struct cfdata *cf, void *aux) + cfdata_t cf, void *aux) { struct isapnp_attach_args *ipa = aux; const struct isic_isapnp_card_desc *desc = isic_isapnp_descriptions; Index: sys/dev/isapnp/isic_isapnp_dynalink.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/isic_isapnp_dynalink.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 isic_isapnp_dynalink.c --- sys/dev/isapnp/isic_isapnp_dynalink.c 4 Mar 2007 06:02:13 -0000 1.8 +++ sys/dev/isapnp/isic_isapnp_dynalink.c 9 Jul 2007 22:41:04 -0000 @@ -351,7 +351,7 @@ set_softc(struct isic_softc *sc, struct } int -isapnp_match_dynalink(struct device *parent, struct cfdata *cf, +isapnp_match_dynalink(struct device *parent, cfdata_t cf, struct isa_attach_args *ia) { struct isic_softc dummysc, *sc = &dummysc; Index: sys/dev/isapnp/joy_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/joy_isapnp.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 joy_isapnp.c --- sys/dev/isapnp/joy_isapnp.c 16 Nov 2006 01:33:05 -0000 1.9 +++ sys/dev/isapnp/joy_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -53,14 +53,14 @@ __KERNEL_RCSID(0, "$NetBSD: joy_isapnp.c #include -int joy_isapnp_match(struct device *, struct cfdata *, void *); +int joy_isapnp_match(struct device *, cfdata_t, void *); void joy_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(joy_isapnp, sizeof(struct joy_softc), joy_isapnp_match, joy_isapnp_attach, NULL, NULL); int -joy_isapnp_match(struct device *parent, struct cfdata *match, +joy_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/mpu_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/mpu_isapnp.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 mpu_isapnp.c --- sys/dev/isapnp/mpu_isapnp.c 16 Nov 2006 01:33:05 -0000 1.15 +++ sys/dev/isapnp/mpu_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -29,7 +29,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_isapnp.c #include -int mpu_isapnp_match(struct device *, struct cfdata *, void *); +int mpu_isapnp_match(struct device *, cfdata_t, void *); void mpu_isapnp_attach(struct device *, struct device *, void *); struct mpu_isapnp_softc { @@ -43,7 +43,7 @@ CFATTACH_DECL(mpu_isapnp, sizeof(struct mpu_isapnp_match, mpu_isapnp_attach, NULL, NULL); int -mpu_isapnp_match(struct device *parent, struct cfdata *match, +mpu_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/sb_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/sb_isapnp.c,v retrieving revision 1.50 diff -d -p -u -u -r1.50 sb_isapnp.c --- sys/dev/isapnp/sb_isapnp.c 16 Nov 2006 01:33:05 -0000 1.50 +++ sys/dev/isapnp/sb_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c, #include #include -int sb_isapnp_match(struct device *, struct cfdata *, void *); +int sb_isapnp_match(struct device *, cfdata_t, void *); void sb_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(sb_isapnp, sizeof(struct sbdsp_softc), @@ -77,7 +77,7 @@ CFATTACH_DECL(sb_isapnp, sizeof(struct s * Probe for the soundblaster hardware. */ int -sb_isapnp_match(struct device *parent, struct cfdata *match, +sb_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/wdc_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/wdc_isapnp.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 wdc_isapnp.c --- sys/dev/isapnp/wdc_isapnp.c 16 Nov 2006 01:33:05 -0000 1.36 +++ sys/dev/isapnp/wdc_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -69,7 +69,7 @@ struct wdc_isapnp_softc { int sc_drq; }; -static int wdc_isapnp_probe(struct device *, struct cfdata *, void *); +static int wdc_isapnp_probe(struct device *, cfdata_t, void *); static void wdc_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(wdc_isapnp, sizeof(struct wdc_isapnp_softc), @@ -82,7 +82,7 @@ static void wdc_isapnp_dma_finish(void * #endif static int -wdc_isapnp_probe(struct device *parent, struct cfdata *match, +wdc_isapnp_probe(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/wss_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/wss_isapnp.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 wss_isapnp.c --- sys/dev/isapnp/wss_isapnp.c 16 Nov 2006 01:33:05 -0000 1.20 +++ sys/dev/isapnp/wss_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c #include #include -int wss_isapnp_match(struct device *, struct cfdata *, void *); +int wss_isapnp_match(struct device *, cfdata_t, void *); void wss_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(wss_isapnp, sizeof(struct wss_softc), @@ -76,7 +76,7 @@ CFATTACH_DECL(wss_isapnp, sizeof(struct * Probe for the WSS hardware. */ int -wss_isapnp_match(struct device *parent, struct cfdata *match, +wss_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/isapnp/ym_isapnp.c =================================================================== RCS file: /cvsroot/src/sys/dev/isapnp/ym_isapnp.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 ym_isapnp.c --- sys/dev/isapnp/ym_isapnp.c 16 Nov 2006 01:33:05 -0000 1.21 +++ sys/dev/isapnp/ym_isapnp.c 9 Jul 2007 22:41:05 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: ym_isapnp.c, #include #include -int ym_isapnp_match(struct device *, struct cfdata *, void *); +int ym_isapnp_match(struct device *, cfdata_t, void *); void ym_isapnp_attach(struct device *, struct device *, void *); CFATTACH_DECL(ym_isapnp, sizeof(struct ym_softc), @@ -85,7 +85,7 @@ CFATTACH_DECL(ym_isapnp, sizeof(struct y * Probe for the Yamaha hardware. */ int -ym_isapnp_match(struct device *parent, struct cfdata *match, +ym_isapnp_match(struct device *parent, cfdata_t cfdata, void *aux) { int pri, variant; Index: sys/dev/marvell/gt.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/gt.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 gt.c --- sys/dev/marvell/gt.c 29 Jan 2007 01:52:44 -0000 1.13 +++ sys/dev/marvell/gt.c 9 Jul 2007 22:41:05 -0000 @@ -115,7 +115,7 @@ gt_cfprint (void *aux, const char *pnp) static int -gt_cfsearch(struct device *parent, struct cfdata *cf, +gt_cfsearch(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct gt_softc *gt = (struct gt_softc *) parent; Index: sys/dev/marvell/gti2c.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/gti2c.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 gti2c.c --- sys/dev/marvell/gti2c.c 26 Jun 2006 18:21:39 -0000 1.5 +++ sys/dev/marvell/gti2c.c 9 Jul 2007 22:41:05 -0000 @@ -57,7 +57,7 @@ struct gti2c_softc { struct lock sc_lock; }; -static int gt_i2c_match(struct device *, struct cfdata *, void *); +static int gt_i2c_match(struct device *, cfdata_t, void *); static void gt_i2c_attach(struct device *, struct device *, void *); CFATTACH_DECL(gtiic, sizeof(struct gti2c_softc), @@ -235,7 +235,7 @@ gt_i2c_intr(void *aux) } int -gt_i2c_match(struct device *parent, struct cfdata *cfdata, void *aux) +gt_i2c_match(struct device *parent, cfdata_t cfdata, void *aux) { struct gt_softc * const gt = device_private(parent); struct gt_attach_args * const ga = aux; Index: sys/dev/marvell/gtidma.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/gtidma.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 gtidma.c --- sys/dev/marvell/gtidma.c 4 Mar 2007 06:02:14 -0000 1.10 +++ sys/dev/marvell/gtidma.c 9 Jul 2007 22:41:06 -0000 @@ -229,7 +229,7 @@ idma_list_sync_post(idma_chan_t * const STATIC void idma_attach (struct device *, struct device *, void *); -STATIC int idma_match (struct device *, struct cfdata *, void *); +STATIC int idma_match (struct device *, cfdata_t, void *); STATIC void idma_chan_init (idma_softc_t *, idma_chan_t *, unsigned int); STATIC void idma_arb_init(idma_softc_t *); @@ -266,7 +266,7 @@ idma_softc_t *idma_sc = 0; STATIC int idma_match( struct device * const parent, - struct cfdata * const self, + cfdata_t const self, void *const aux) { struct gt_attach_args * const ga = (struct gt_attach_args *)aux; Index: sys/dev/marvell/gtmpsc.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/gtmpsc.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 gtmpsc.c --- sys/dev/marvell/gtmpsc.c 4 Mar 2007 06:02:14 -0000 1.23 +++ sys/dev/marvell/gtmpsc.c 9 Jul 2007 22:41:07 -0000 @@ -117,7 +117,7 @@ unsigned int gtmpsc_debug = 0; #define GTMPSCDIALOUT(x) (minor(x) & GTMPSCDIALOUT_MASK) STATIC void gtmpscinit(struct gtmpsc_softc *); -STATIC int gtmpscmatch(struct device *, struct cfdata *, void *); +STATIC int gtmpscmatch(struct device *, cfdata_t, void *); STATIC void gtmpscattach(struct device *, struct device *, void *); STATIC int compute_cdv(unsigned int); STATIC void gtmpsc_loadchannelregs(struct gtmpsc_softc *); @@ -418,7 +418,7 @@ gtmpsc_loadchannelregs(struct gtmpsc_sof } STATIC int -gtmpscmatch(struct device *parent, struct cfdata *self, void *aux) +gtmpscmatch(struct device *parent, cfdata_tself, void *aux) { struct gt_softc *gt = device_private(parent); struct gt_attach_args *ga = aux; Index: sys/dev/marvell/gtpci.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/gtpci.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 gtpci.c --- sys/dev/marvell/gtpci.c 29 Jan 2007 01:52:44 -0000 1.15 +++ sys/dev/marvell/gtpci.c 9 Jul 2007 22:41:07 -0000 @@ -87,7 +87,7 @@ struct gtpci_softc { }; static int gtpci_cfprint(void *, const char *); -static int gtpci_match(struct device *, struct cfdata *, void *); +static int gtpci_match(struct device *, cfdata_t, void *); static void gtpci_attach(struct device *, struct device *, void *); CFATTACH_DECL(gtpci, sizeof(struct gtpci_softc), @@ -194,7 +194,7 @@ static const struct pci_init { }; int -gtpci_match(struct device *parent, struct cfdata *self, void *aux) +gtpci_match(struct device *parent, cfdata_tself, void *aux) { struct gt_softc * const gt = device_private(parent); struct gt_attach_args * const ga = aux; Index: sys/dev/marvell/if_gfe.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/if_gfe.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_gfe.c --- sys/dev/marvell/if_gfe.c 7 Mar 2007 09:15:21 -0000 1.22 +++ sys/dev/marvell/if_gfe.c 9 Jul 2007 22:41:08 -0000 @@ -144,7 +144,7 @@ enum gfe_hash_op { #define STATIC -STATIC int gfe_match (struct device *, struct cfdata *, void *); +STATIC int gfe_match (struct device *, cfdata_t, void *); STATIC void gfe_attach (struct device *, struct device *, void *); STATIC int gfe_dmamem_alloc(struct gfe_softc *, struct gfe_dmamem *, int, @@ -198,7 +198,7 @@ CFATTACH_DECL(gfe, sizeof(struct gfe_sof extern struct cfdriver gfe_cd; int -gfe_match(struct device *parent, struct cfdata *cf, void *aux) +gfe_match(struct device *parent, cfdata_t cf, void *aux) { struct gt_softc *gt = (struct gt_softc *) parent; struct gt_attach_args *ga = aux; Index: sys/dev/marvell/obio.c =================================================================== RCS file: /cvsroot/src/sys/dev/marvell/obio.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 obio.c --- sys/dev/marvell/obio.c 29 Jan 2007 01:52:44 -0000 1.9 +++ sys/dev/marvell/obio.c 9 Jul 2007 22:41:08 -0000 @@ -71,8 +71,8 @@ __KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.9 #include "locators.h" static int obio_cfprint(void *, const char *); -static int obio_cfmatch(struct device *, struct cfdata *, void *); -static int obio_cfsearch(struct device *, struct cfdata *, +static int obio_cfmatch(struct device *, cfdata_t, void *); +static int obio_cfsearch(struct device *, cfdata_t, const int *, void *); static void obio_cfattach(struct device *, struct device *, void *); @@ -118,7 +118,7 @@ obio_cfprint(void *aux, const char *pnp) int -obio_cfsearch(struct device *parent, struct cfdata *cf, +obio_cfsearch(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct obio_softc *sc = (struct obio_softc *) parent; @@ -137,7 +137,7 @@ obio_cfsearch(struct device *parent, str } int -obio_cfmatch(struct device *parent, struct cfdata *cf, void *aux) +obio_cfmatch(struct device *parent, cfdata_t cf, void *aux) { struct gt_softc * const gt = (struct gt_softc *)parent; struct gt_attach_args * const ga = aux; Index: sys/dev/mca/aha_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/aha_mca.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 aha_mca.c --- sys/dev/mca/aha_mca.c 16 Nov 2006 01:33:05 -0000 1.16 +++ sys/dev/mca/aha_mca.c 9 Jul 2007 22:41:08 -0000 @@ -77,15 +77,14 @@ __KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v #define AHA_ISA_IOSIZE 4 -int aha_mca_probe(struct device *, struct cfdata *, void *); +int aha_mca_probe(struct device *, cfdata_t, void *); void aha_mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(aha_mca, sizeof(struct aha_softc), aha_mca_probe, aha_mca_attach, NULL, NULL); int -aha_mca_probe(struct device *parent, struct cfdata *match, - void *aux) +aha_mca_probe(struct device *parent, cfdata_t cfdata, void *aux) { register struct mca_attach_args *ma = aux; Index: sys/dev/mca/com_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/com_mca.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 com_mca.c --- sys/dev/mca/com_mca.c 16 Nov 2006 01:33:05 -0000 1.17 +++ sys/dev/mca/com_mca.c 9 Jul 2007 22:41:09 -0000 @@ -103,7 +103,7 @@ struct com_mca_softc { void *sc_ih; /* interrupt handler */ }; -int com_mca_probe(struct device *, struct cfdata *, void *); +int com_mca_probe(struct device *, cfdata_t, void *); void com_mca_attach(struct device *, struct device *, void *); static int ibm_modem_getcfg(struct mca_attach_args *, int *, int *); @@ -143,7 +143,7 @@ com_mca_lookup(ma_id) } int -com_mca_probe(struct device *parent, struct cfdata *match, +com_mca_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/ed_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/ed_mca.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 ed_mca.c --- sys/dev/mca/ed_mca.c 4 Mar 2007 06:02:14 -0000 1.35 +++ sys/dev/mca/ed_mca.c 9 Jul 2007 22:41:09 -0000 @@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1 #define EDLABELDEV(dev) (MAKEDISKDEV(major(dev), DISKUNIT(dev), RAW_PART)) -static int ed_mca_probe (struct device *, struct cfdata *, void *); +static int ed_mca_probe (struct device *, cfdata_t, void *); static void ed_mca_attach (struct device *, struct device *, void *); CFATTACH_DECL(ed_mca, sizeof(struct ed_softc), @@ -119,8 +119,7 @@ static struct dkdriver eddkdriver = { ed * Just check if it's possible to identify the disk. */ static int -ed_mca_probe(struct device *parent, struct cfdata *cf, - void *aux) +ed_mca_probe(struct device *parent, cfdata_t cf, void *aux) { u_int16_t cmd_args[2]; struct edc_mca_softc *sc = (void *) parent; Index: sys/dev/mca/edc_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/edc_mca.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 edc_mca.c --- sys/dev/mca/edc_mca.c 16 Nov 2006 01:33:05 -0000 1.35 +++ sys/dev/mca/edc_mca.c 9 Jul 2007 22:41:09 -0000 @@ -84,8 +84,6 @@ __KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v #include #include -#include "locators.h" - #define EDC_ATTN_MAXTRIES 10000 /* How many times check for unbusy */ #define EDC_MAX_CMD_RES_LEN 8 @@ -120,7 +118,7 @@ struct edc_mca_softc { u_int16_t status_block[EDC_MAX_CMD_RES_LEN]; }; -int edc_mca_probe(struct device *, struct cfdata *, void *); +int edc_mca_probe(struct device *, cfdata_t, void *); void edc_mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(edc_mca, sizeof(struct edc_mca_softc), @@ -135,7 +133,7 @@ static void edcworker(void *); static void edc_spawn_worker(void *); int -edc_mca_probe(struct device *parent, struct cfdata *match, +edc_mca_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = aux; @@ -152,6 +150,7 @@ edc_mca_probe(struct device *parent, str void edc_mca_attach(struct device *parent, struct device *self, void *aux) { + prop_dictionary_t locs; struct edc_mca_softc *sc = device_private(self); struct mca_attach_args *ma = aux; struct ed_attach_args eda; @@ -159,7 +158,6 @@ edc_mca_attach(struct device *parent, st int irq, drq, iobase; const char *typestr; int devno, error; - int locs[EDCCF_NLOCS]; pos2 = mca_conf_read(ma->ma_mc, ma->ma_slot, 2); pos3 = mca_conf_read(ma->ma_mc, ma->ma_slot, 3); @@ -211,6 +209,13 @@ edc_mca_attach(struct device *parent, st printf(" slot %d irq %d drq %d: %s\n", ma->ma_slot+1, irq, drq, typestr); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return; + } + #ifdef DIAGNOSTIC /* * It's not strictly necessary to check this, machine configuration @@ -307,7 +312,13 @@ edc_mca_attach(struct device *parent, st /* check for attached disks */ for (devno = 0; devno < sc->sc_maxdevs; devno++) { eda.edc_drive = devno; - locs[EDCCF_DRIVE] = devno; + + if (! prop_dictionary_set_uint64(locs, "drive", devno)) { + aprint_error("%s: could not set locator", + device_xname(self)); + break; + } + sc->sc_ed[devno] = (void *) config_found_sm_loc(self, "edc", locs, &eda, NULL, config_stdsubmatch); @@ -317,6 +328,7 @@ edc_mca_attach(struct device *parent, st && (sc->sc_ed[devno]->sc_flags & EDF_INIT) == 0) sc->sc_ed[devno] = NULL; } + prop_object_release(locs); /* enable full error dumps again */ sc->sc_flags &= ~DASD_QUIET; Index: sys/dev/mca/esp_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/esp_mca.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 esp_mca.c --- sys/dev/mca/esp_mca.c 4 Mar 2007 06:02:14 -0000 1.15 +++ sys/dev/mca/esp_mca.c 9 Jul 2007 22:41:09 -0000 @@ -94,7 +94,7 @@ static int esp_mca_debug = 0; #define ESP_REG_OFFSET 0x10 static void esp_mca_attach(struct device *, struct device *, void *); -static int esp_mca_match(struct device *, struct cfdata *, void *); +static int esp_mca_match(struct device *, cfdata_t, void *); CFATTACH_DECL(esp_mca, sizeof(struct esp_softc), esp_mca_match, esp_mca_attach, NULL, NULL); @@ -129,7 +129,7 @@ static struct ncr53c9x_glue esp_glue = { static int esp_mca_match( struct device *parent, - struct cfdata *cf, + cfdata_t cf, void *aux ) { Index: sys/dev/mca/if_ate_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_ate_mca.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 if_ate_mca.c --- sys/dev/mca/if_ate_mca.c 16 Nov 2006 01:33:05 -0000 1.17 +++ sys/dev/mca/if_ate_mca.c 9 Jul 2007 22:41:09 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ate_mca.c #include #include -int ate_mca_match(struct device *, struct cfdata *, void *); +int ate_mca_match(struct device *, cfdata_t, void *); void ate_mca_attach(struct device *, struct device *, void *); static void ate_mca_detect(bus_space_tag_t, bus_space_handle_t, u_int8_t enaddr[ETHER_ADDR_LEN]); @@ -107,7 +107,7 @@ ate_mca_lookup(id) } int -ate_mca_match(struct device *parent, struct cfdata *match, +ate_mca_match(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = (struct mca_attach_args *) aux; Index: sys/dev/mca/if_elmc_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_elmc_mca.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_elmc_mca.c --- sys/dev/mca/if_elmc_mca.c 16 Nov 2006 01:33:05 -0000 1.22 +++ sys/dev/mca/if_elmc_mca.c 9 Jul 2007 22:41:09 -0000 @@ -79,7 +79,7 @@ struct elmc_mca_softc { void *sc_ih; /* interrupt handle */ }; -int elmc_mca_match(struct device *, struct cfdata *, void *); +int elmc_mca_match(struct device *, cfdata_t, void *); void elmc_mca_attach(struct device *, struct device *, void *); static void elmc_mca_copyin(struct ie_softc *, void *, int, size_t); @@ -92,7 +92,7 @@ static void elmc_mca_hwreset(struct ie_s static int elmc_mca_intrhook(struct ie_softc *, int); int -elmc_mca_match(struct device *parent, struct cfdata *cf, +elmc_mca_match(struct device *parent, cfdata_t cf, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/if_ep_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_ep_mca.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 if_ep_mca.c --- sys/dev/mca/if_ep_mca.c 16 Nov 2006 01:33:05 -0000 1.17 +++ sys/dev/mca/if_ep_mca.c 9 Jul 2007 22:41:09 -0000 @@ -106,7 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_mca.c, #define MCA_CBIO 0x200 /* Configuration Base IO Address */ #define MCA_IOSZ 0x10 /* I/O space size */ -int ep_mca_match(struct device *, struct cfdata *, void *); +int ep_mca_match(struct device *, cfdata_t, void *); void ep_mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(ep_mca, sizeof(struct ep_softc), @@ -142,7 +142,7 @@ ep_mca_lookup(ma) } int -ep_mca_match(struct device *parent, struct cfdata *match, +ep_mca_match(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = (struct mca_attach_args *) aux; Index: sys/dev/mca/if_le_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_le_mca.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_le_mca.c --- sys/dev/mca/if_le_mca.c 16 Nov 2006 01:33:05 -0000 1.15 +++ sys/dev/mca/if_le_mca.c 9 Jul 2007 22:41:09 -0000 @@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_mca.c, #include -int le_mca_match(struct device *, struct cfdata *, void *); +int le_mca_match(struct device *, cfdata_t, void *); void le_mca_attach(struct device *, struct device *, void *); struct le_mca_softc { @@ -121,7 +121,7 @@ static const u_int8_t sknet_mcp_media[] }; int -le_mca_match(struct device *parent, struct cfdata *cf, +le_mca_match(struct device *parent, cfdata_t cf, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/if_ne_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_ne_mca.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 if_ne_mca.c --- sys/dev/mca/if_ne_mca.c 16 Nov 2006 01:33:05 -0000 1.12 +++ sys/dev/mca/if_ne_mca.c 9 Jul 2007 22:41:10 -0000 @@ -83,7 +83,7 @@ struct ne_mca_softc { void *sc_ih; /* interrupt handle */ }; -int ne_mca_match(struct device *, struct cfdata *, void *); +int ne_mca_match(struct device *, cfdata_t, void *); void ne_mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(ne_mca, sizeof(struct ne_mca_softc), @@ -114,7 +114,7 @@ ne_mca_lookup(int id) } int -ne_mca_match(struct device *parent, struct cfdata *cf, +ne_mca_match(struct device *parent, cfdata_t cf, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/if_tr_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_tr_mca.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 if_tr_mca.c --- sys/dev/mca/if_tr_mca.c 16 Nov 2006 01:33:05 -0000 1.16 +++ sys/dev/mca/if_tr_mca.c 9 Jul 2007 22:41:10 -0000 @@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c, #define TR_MBPS_4 0 #define TR_MBPS_16 1 -int tr_mca_probe(struct device *, struct cfdata *, void *); +int tr_mca_probe(struct device *, cfdata_t, void *); void tr_mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(tr_mca, sizeof(struct tr_softc), @@ -98,7 +98,7 @@ tr_mca_lookup(id) } int -tr_mca_probe(struct device *parent, struct cfdata *match, +tr_mca_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/if_tra_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_tra_mca.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 if_tra_mca.c --- sys/dev/mca/if_tra_mca.c 16 Nov 2006 01:33:05 -0000 1.7 +++ sys/dev/mca/if_tra_mca.c 9 Jul 2007 22:41:10 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c #include #include -int tiara_mca_match __P((struct device *, struct cfdata *, void *)); +int tiara_mca_match __P((struct device *, cfdata_t, void *)); void tiara_mca_attach __P((struct device *, struct device *, void *)); #define TIARA_NPORTS 0x20 /* 32 */ @@ -105,7 +105,7 @@ tiara_mca_lookup(id) } int -tiara_mca_match(struct device *parent, struct cfdata *match, +tiara_mca_match(struct device *parent, cfdata_t cfdata, void *aux) { struct mca_attach_args *ma = (struct mca_attach_args *) aux; Index: sys/dev/mca/if_we_mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/if_we_mca.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 if_we_mca.c --- sys/dev/mca/if_we_mca.c 16 Nov 2006 01:33:05 -0000 1.18 +++ sys/dev/mca/if_we_mca.c 9 Jul 2007 22:41:10 -0000 @@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_we_mca.c, #define WD_8003 0x01 #define WD_ELITE 0x02 -int we_mca_probe(struct device *, struct cfdata *, void *); +int we_mca_probe(struct device *, cfdata_t, void *); void we_mca_attach(struct device *, struct device *, void *); void we_mca_init_hook(struct we_softc *); @@ -146,7 +146,7 @@ we_mca_lookup(id) } int -we_mca_probe(struct device *parent, struct cfdata *cf, +we_mca_probe(struct device *parent, cfdata_t cf, void *aux) { struct mca_attach_args *ma = aux; Index: sys/dev/mca/mca.c =================================================================== RCS file: /cvsroot/src/sys/dev/mca/mca.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 mca.c --- sys/dev/mca/mca.c 11 Apr 2007 18:32:19 -0000 1.23 +++ sys/dev/mca/mca.c 9 Jul 2007 22:41:10 -0000 @@ -55,9 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.23 #include #include -#include "locators.h" - -int mca_match(struct device *, struct cfdata *, void *); +int mca_match(struct device *, cfdata_t, void *); void mca_attach(struct device *, struct device *, void *); CFATTACH_DECL(mca, sizeof(struct device), @@ -66,7 +64,7 @@ CFATTACH_DECL(mca, sizeof(struct device) int mca_print(void *, const char *); int -mca_match(struct device *parent, struct cfdata *cf, void *aux) +mca_match(struct device *parent, cfdata_t cf, void *aux) { struct mcabus_attach_args *mba = aux; @@ -118,6 +116,7 @@ mca_attach(parent, self, aux) struct device *parent, *self; void *aux; { + prop_dictionary_t locs; struct mcabus_attach_args *mba = aux; bus_space_tag_t iot, memt; bus_dma_tag_t dmat; @@ -127,6 +126,13 @@ mca_attach(parent, self, aux) mca_attach_hook(parent, self, mba); printf("\n"); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return; + } + iot = mba->mba_iot; memt = mba->mba_memt; mc = mba->mba_mc; @@ -144,7 +150,6 @@ mca_attach(parent, self, aux) for (slot = 0; slot < MCA_MAX_SLOTS; slot++) { struct mca_attach_args ma; int reg; - int locs[MCACF_NLOCS]; ma.ma_iot = iot; ma.ma_memt = memt; @@ -159,7 +164,11 @@ mca_attach(parent, self, aux) if (ma.ma_id == 0xffff) /* no adapter here */ continue; - locs[MCACF_SLOT] = slot; + if (! prop_dictionary_set_uint32(locs, "slot", slot)) { + aprint_error("%s: could not set locator\n", + device_xname(self)); + break; + } if (ma.ma_pos[2] & MCA_POS2_ENABLE || mca_match_disabled(ma.ma_id)) @@ -170,4 +179,6 @@ mca_attach(parent, self, aux) printf(" disabled\n"); } } + + prop_object_release(locs); } Index: sys/dev/mii/acphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/acphy.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 acphy.c --- sys/dev/mii/acphy.c 16 Nov 2006 21:24:06 -0000 1.19 +++ sys/dev/mii/acphy.c 9 Jul 2007 22:42:26 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1. #include -static int acphymatch(struct device *, struct cfdata *, void *); +static int acphymatch(struct device *, cfdata_t, void *); static void acphyattach(struct device *, struct device *, void *); CFATTACH_DECL(acphy, sizeof(struct mii_softc), @@ -90,8 +90,7 @@ static const struct mii_phydesc acphys[] }; static int -acphymatch(struct device *parent, struct cfdata *match, - void *aux) +acphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/amhphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/amhphy.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 amhphy.c --- sys/dev/mii/amhphy.c 16 Nov 2006 21:24:06 -0000 1.15 +++ sys/dev/mii/amhphy.c 9 Jul 2007 22:42:27 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1 #include -static int amhphymatch(struct device *, struct cfdata *, void *); +static int amhphymatch(struct device *, cfdata_t, void *); static void amhphyattach(struct device *, struct device *, void *); CFATTACH_DECL(amhphy, sizeof(struct mii_softc), @@ -80,8 +80,7 @@ static const struct mii_phydesc amhphys[ }; static int -amhphymatch(struct device *parent, struct cfdata *match, - void *aux) +amhphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/bmtphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/bmtphy.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 bmtphy.c --- sys/dev/mii/bmtphy.c 16 Nov 2006 21:24:07 -0000 1.22 +++ sys/dev/mii/bmtphy.c 9 Jul 2007 22:42:27 -0000 @@ -91,7 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1 #include -static int bmtphymatch(struct device *, struct cfdata *, void *); +static int bmtphymatch(struct device *, cfdata_t, void *); static void bmtphyattach(struct device *, struct device *, void *); CFATTACH_DECL(bmtphy, sizeof(struct mii_softc), @@ -125,7 +125,7 @@ static const struct mii_phydesc bmtphys[ }; static int -bmtphymatch(struct device *parent, struct cfdata *match, +bmtphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/brgphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/brgphy.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 brgphy.c --- sys/dev/mii/brgphy.c 13 Mar 2007 06:41:52 -0000 1.33 +++ sys/dev/mii/brgphy.c 9 Jul 2007 22:42:27 -0000 @@ -92,7 +92,7 @@ __KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1 #include -static int brgphymatch(struct device *, struct cfdata *, void *); +static int brgphymatch(struct device *, cfdata_t, void *); static void brgphyattach(struct device *, struct device *, void *); CFATTACH_DECL(brgphy, sizeof(struct mii_softc), @@ -187,7 +187,7 @@ static void bcm5704_load_dspcode(struct static void bcm5750_load_dspcode(struct mii_softc *); static int -brgphymatch(struct device *parent, struct cfdata *match, +brgphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/ciphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/ciphy.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 ciphy.c --- sys/dev/mii/ciphy.c 26 Nov 2006 15:40:14 -0000 1.11 +++ sys/dev/mii/ciphy.c 9 Jul 2007 22:42:27 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1. #include -static int ciphymatch(struct device *, struct cfdata *, void *); +static int ciphymatch(struct device *, cfdata_t, void *); static void ciphyattach(struct device *, struct device *, void *); CFATTACH_DECL(ciphy, sizeof(struct mii_softc), @@ -97,7 +97,7 @@ static const struct mii_phydesc ciphys[] }; static int -ciphymatch(struct device *parent, struct cfdata *match, +ciphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/dmphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/dmphy.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 dmphy.c --- sys/dev/mii/dmphy.c 16 Nov 2006 21:24:07 -0000 1.27 +++ sys/dev/mii/dmphy.c 9 Jul 2007 22:42:27 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1. #include -static int dmphymatch(struct device *, struct cfdata *, void *); +static int dmphymatch(struct device *, cfdata_t, void *); static void dmphyattach(struct device *, struct device *, void *); CFATTACH_DECL(dmphy, sizeof(struct mii_softc), @@ -118,7 +118,7 @@ static const struct mii_phydesc dmphys[] }; static int -dmphymatch(struct device *parent, struct cfdata *match, +dmphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/exphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/exphy.c,v retrieving revision 1.44 diff -d -p -u -u -r1.44 exphy.c --- sys/dev/mii/exphy.c 16 Nov 2006 21:24:07 -0000 1.44 +++ sys/dev/mii/exphy.c 9 Jul 2007 22:42:27 -0000 @@ -86,7 +86,7 @@ __KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1. #include #include -static int exphymatch(struct device *, struct cfdata *, void *); +static int exphymatch(struct device *, cfdata_t, void *); static void exphyattach(struct device *, struct device *, void *); CFATTACH_DECL(exphy, sizeof(struct mii_softc), @@ -100,7 +100,7 @@ static const struct mii_phy_funcs exphy_ }; static int -exphymatch(struct device *parent, struct cfdata *match, void *aux) +exphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/gentbi.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/gentbi.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 gentbi.c --- sys/dev/mii/gentbi.c 16 Nov 2006 21:24:07 -0000 1.18 +++ sys/dev/mii/gentbi.c 9 Jul 2007 22:42:27 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1 #include #include -static int gentbimatch(struct device *, struct cfdata *, void *); +static int gentbimatch(struct device *, cfdata_t, void *); static void gentbiattach(struct device *, struct device *, void *); CFATTACH_DECL(gentbi, sizeof(struct mii_softc), @@ -104,7 +104,7 @@ static const struct mii_phy_funcs gentbi }; static int -gentbimatch(struct device *parent, struct cfdata *match, void *aux) +gentbimatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; struct mii_data *mii = ma->mii_data; Index: sys/dev/mii/glxtphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/glxtphy.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 glxtphy.c --- sys/dev/mii/glxtphy.c 16 Nov 2006 21:24:07 -0000 1.17 +++ sys/dev/mii/glxtphy.c 9 Jul 2007 22:42:27 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v #include -static int glxtphymatch(struct device *, struct cfdata *, void *); +static int glxtphymatch(struct device *, cfdata_t, void *); static void glxtphyattach(struct device *, struct device *, void *); CFATTACH_DECL(glxtphy, sizeof(struct mii_softc), @@ -114,7 +114,7 @@ static const struct mii_phydesc glxtphys }; static int -glxtphymatch(struct device *parent, struct cfdata *match, +glxtphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/gphyter.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/gphyter.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 gphyter.c --- sys/dev/mii/gphyter.c 16 Nov 2006 21:24:07 -0000 1.19 +++ sys/dev/mii/gphyter.c 9 Jul 2007 22:42:27 -0000 @@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: gphyter.c,v #include -static int gphytermatch(struct device *, struct cfdata *, void *); +static int gphytermatch(struct device *, cfdata_t, void *); static void gphyterattach(struct device *, struct device *, void *); CFATTACH_DECL(gphyter, sizeof(struct mii_softc), @@ -118,7 +118,7 @@ static const struct mii_phydesc gphyters }; static int -gphytermatch(struct device *parent, struct cfdata *match, +gphytermatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/icsphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/icsphy.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 icsphy.c --- sys/dev/mii/icsphy.c 16 Nov 2006 21:24:07 -0000 1.41 +++ sys/dev/mii/icsphy.c 9 Jul 2007 22:42:27 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: icsphy.c,v 1 #include -static int icsphymatch(struct device *, struct cfdata *, void *); +static int icsphymatch(struct device *, cfdata_t, void *); static void icsphyattach(struct device *, struct device *, void *); CFATTACH_DECL(icsphy, sizeof(struct mii_softc), @@ -121,7 +121,7 @@ static const struct mii_phydesc icsphys[ }; static int -icsphymatch(struct device *parent, struct cfdata *match, +icsphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/igphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/igphy.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 igphy.c --- sys/dev/mii/igphy.c 23 Feb 2007 03:03:10 -0000 1.11 +++ sys/dev/mii/igphy.c 9 Jul 2007 22:42:27 -0000 @@ -106,7 +106,7 @@ static void igphy_reset(struct mii_softc static void igphy_load_dspcode(struct mii_softc *); static void igphy_smartspeed_workaround(struct mii_softc *sc); -static int igphymatch(struct device *, struct cfdata *, void *); +static int igphymatch(struct device *, cfdata_t, void *); static void igphyattach(struct device *, struct device *, void *); CFATTACH_DECL(igphy, sizeof(struct igphy_softc), @@ -128,7 +128,7 @@ static const struct mii_phydesc igphys[] }; static int -igphymatch(struct device *parent, struct cfdata *match, +igphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/ikphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/ikphy.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 ikphy.c --- sys/dev/mii/ikphy.c 16 Nov 2006 21:24:07 -0000 1.3 +++ sys/dev/mii/ikphy.c 9 Jul 2007 22:42:28 -0000 @@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: ikphy.c,v 1. #include -static int ikphymatch(struct device *, struct cfdata *, void *); +static int ikphymatch(struct device *, cfdata_t, void *); static void ikphyattach(struct device *, struct device *, void *); CFATTACH_DECL(ikphy, sizeof(struct mii_softc), @@ -105,7 +105,7 @@ static const struct mii_phydesc ikphys[] }; static int -ikphymatch(struct device *parent, struct cfdata *match, +ikphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/inphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/inphy.c,v retrieving revision 1.43 diff -d -p -u -u -r1.43 inphy.c --- sys/dev/mii/inphy.c 16 Nov 2006 21:24:07 -0000 1.43 +++ sys/dev/mii/inphy.c 9 Jul 2007 22:42:28 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1. #include -static int inphymatch(struct device *, struct cfdata *, void *); +static int inphymatch(struct device *, cfdata_t, void *); static void inphyattach(struct device *, struct device *, void *); CFATTACH_DECL(inphy, sizeof(struct mii_softc), @@ -124,7 +124,7 @@ static const struct mii_phydesc inphys[] }; static int -inphymatch(struct device *parent, struct cfdata *match, +inphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/iophy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/iophy.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 iophy.c --- sys/dev/mii/iophy.c 16 Nov 2006 21:24:07 -0000 1.28 +++ sys/dev/mii/iophy.c 9 Jul 2007 22:42:28 -0000 @@ -88,7 +88,7 @@ __KERNEL_RCSID(0, "$NetBSD: iophy.c,v 1. #include -static int iophymatch(struct device *, struct cfdata *, void *); +static int iophymatch(struct device *, cfdata_t, void *); static void iophyattach(struct device *, struct device *, void *); CFATTACH_DECL(iophy, sizeof(struct mii_softc), @@ -113,7 +113,7 @@ static const struct mii_phydesc iophys[] }; static int -iophymatch(struct device *parent, struct cfdata *match, +iophymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/lxtphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/lxtphy.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 lxtphy.c --- sys/dev/mii/lxtphy.c 16 Nov 2006 21:24:07 -0000 1.41 +++ sys/dev/mii/lxtphy.c 9 Jul 2007 22:42:28 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1 #include -static int lxtphymatch(struct device *, struct cfdata *, void *); +static int lxtphymatch(struct device *, cfdata_t, void *); static void lxtphyattach(struct device *, struct device *, void *); CFATTACH_DECL(lxtphy, sizeof(struct mii_softc), @@ -123,7 +123,7 @@ static const struct mii_phydesc lxtphys[ }; static int -lxtphymatch(struct device *parent, struct cfdata *match, +lxtphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/makphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/makphy.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 makphy.c --- sys/dev/mii/makphy.c 23 Feb 2007 03:03:10 -0000 1.23 +++ sys/dev/mii/makphy.c 9 Jul 2007 22:42:28 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1 #include -static int makphymatch(struct device *, struct cfdata *, void *); +static int makphymatch(struct device *, cfdata_t, void *); static void makphyattach(struct device *, struct device *, void *); CFATTACH_DECL(makphy, sizeof(struct mii_softc), @@ -121,7 +121,7 @@ static const struct mii_phydesc makphys[ }; static int -makphymatch(struct device *parent, struct cfdata *match, +makphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/mii.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/mii.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 mii.c --- sys/dev/mii/mii.c 11 Dec 2005 12:22:42 -0000 1.40 +++ sys/dev/mii/mii.c 9 Jul 2007 22:42:28 -0000 @@ -56,8 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.40 #include #include -#include "locators.h" - static int mii_print(void *, const char *); /* @@ -69,10 +67,17 @@ mii_attach(struct device *parent, struct int phyloc, int offloc, int flags) { struct mii_attach_args ma; + prop_dictionary_t locs; struct mii_softc *child; int bmsr, offset = 0; int phymin, phymax; - int locs[MIICF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: mii_attach: could not create locators\n", + device_xname(parent)); + return; + } if (phyloc != MII_PHY_ANY && offloc != MII_OFFSET_ANY) panic("mii_attach: phyloc and offloc specified"); @@ -141,7 +146,11 @@ mii_attach(struct device *parent, struct ma.mii_capmask = capmask; ma.mii_flags = flags | (mii->mii_flags & MIIF_INHERIT_MASK); - locs[MIICF_PHY] = ma.mii_phyno; + if (! prop_dictionary_set_uint32(locs, "phy", ma.mii_phyno)) { + aprint_error("%s: mii_attach: could not set locator\n", + device_xname(parent)); + break; + } child = (struct mii_softc *)config_found_sm_loc(parent, "mii", locs, &ma, mii_print, config_stdsubmatch); @@ -156,6 +165,8 @@ mii_attach(struct device *parent, struct } offset++; } + + prop_object_release(locs); } void Index: sys/dev/mii/mvphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/mvphy.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 mvphy.c --- sys/dev/mii/mvphy.c 17 Feb 2007 23:23:38 -0000 1.3 +++ sys/dev/mii/mvphy.c 9 Jul 2007 22:42:29 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: mvphy.c,v 1. #define SM(_v, _f) (((_v) << _f##_S) & _f) #define MS(_v, _f) (((_v) & _f) >> _f##_S) -static int mvphymatch(struct device *, struct cfdata *, void *); +static int mvphymatch(struct device *, cfdata_t, void *); static void mvphyattach(struct device *, struct device *, void *); CFATTACH_DECL(mvphy, sizeof(struct mii_softc), @@ -164,7 +164,7 @@ static void mvphy_switchconfig(struct mi static void mvphy_flushatu(struct mii_softc *); static int -mvphymatch(struct device *parent, struct cfdata *match, void *aux) +mvphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/nsphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/nsphy.c,v retrieving revision 1.49 diff -d -p -u -u -r1.49 nsphy.c --- sys/dev/mii/nsphy.c 16 Nov 2006 21:24:07 -0000 1.49 +++ sys/dev/mii/nsphy.c 9 Jul 2007 22:42:29 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: nsphy.c,v 1. #include -static int nsphymatch(struct device *, struct cfdata *, void *); +static int nsphymatch(struct device *, cfdata_t, void *); static void nsphyattach(struct device *, struct device *, void *); CFATTACH_DECL(nsphy, sizeof(struct mii_softc), @@ -113,7 +113,7 @@ static const struct mii_phydesc nsphys[] }; static int -nsphymatch(struct device *parent, struct cfdata *match, +nsphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/nsphyter.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/nsphyter.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 nsphyter.c --- sys/dev/mii/nsphyter.c 16 Nov 2006 21:24:07 -0000 1.26 +++ sys/dev/mii/nsphyter.c 9 Jul 2007 22:42:29 -0000 @@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v #include -static int nsphytermatch(struct device *, struct cfdata *, void *); +static int nsphytermatch(struct device *, cfdata_t, void *); static void nsphyterattach(struct device *, struct device *, void *); CFATTACH_DECL(nsphyter, sizeof(struct mii_softc), @@ -121,7 +121,7 @@ static const struct mii_phydesc nsphyter }; static int -nsphytermatch(struct device *parent, struct cfdata *match, +nsphytermatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/pnaphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/pnaphy.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 pnaphy.c --- sys/dev/mii/pnaphy.c 16 Nov 2006 21:24:07 -0000 1.16 +++ sys/dev/mii/pnaphy.c 9 Jul 2007 22:42:29 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: pnaphy.c,v 1 #include #include -static int pnaphymatch(struct device *, struct cfdata *, void *); +static int pnaphymatch(struct device *, cfdata_t, void *); static void pnaphyattach(struct device *, struct device *, void *); CFATTACH_DECL(pnaphy, sizeof(struct mii_softc), @@ -85,7 +85,7 @@ static const struct mii_phydesc pnaphys[ }; static int -pnaphymatch(struct device *parent, struct cfdata *match, +pnaphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/qsphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/qsphy.c,v retrieving revision 1.40 diff -d -p -u -u -r1.40 qsphy.c --- sys/dev/mii/qsphy.c 16 Nov 2006 21:24:07 -0000 1.40 +++ sys/dev/mii/qsphy.c 9 Jul 2007 22:42:29 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: qsphy.c,v 1. #include -static int qsphymatch(struct device *, struct cfdata *, void *); +static int qsphymatch(struct device *, cfdata_t, void *); static void qsphyattach(struct device *, struct device *, void *); CFATTACH_DECL(qsphy, sizeof(struct mii_softc), @@ -112,7 +112,7 @@ static const struct mii_phydesc qsphys[] }; static int -qsphymatch(struct device *parent, struct cfdata *match, +qsphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/rgephy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/rgephy.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 rgephy.c --- sys/dev/mii/rgephy.c 3 Dec 2006 03:16:48 -0000 1.16 +++ sys/dev/mii/rgephy.c 9 Jul 2007 22:42:29 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1 #include -static int rgephy_match(struct device *, struct cfdata *, void *); +static int rgephy_match(struct device *, cfdata_t, void *); static void rgephy_attach(struct device *, struct device *, void *); CFATTACH_DECL(rgephy, sizeof(struct mii_softc), @@ -88,7 +88,7 @@ static const struct mii_phydesc rgephys[ }; static int -rgephy_match(struct device *parent, struct cfdata *match, void *aux) +rgephy_match(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/rlphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/rlphy.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 rlphy.c --- sys/dev/mii/rlphy.c 9 May 2007 23:16:37 -0000 1.15 +++ sys/dev/mii/rlphy.c 9 Jul 2007 22:42:29 -0000 @@ -61,7 +61,7 @@ struct rlphy_softc { int sc_rtl8201l; }; -int rlphymatch(struct device *, struct cfdata *, void *); +int rlphymatch(struct device *, cfdata_t, void *); void rlphyattach(struct device *, struct device *, void *); CFATTACH_DECL(rlphy, sizeof(struct rlphy_softc), @@ -87,7 +87,7 @@ static const struct mii_phydesc rlphys[] }; int -rlphymatch(struct device *parent, struct cfdata *match, void *aux) +rlphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/sqphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/sqphy.c,v retrieving revision 1.42 diff -d -p -u -u -r1.42 sqphy.c --- sys/dev/mii/sqphy.c 16 Nov 2006 21:24:07 -0000 1.42 +++ sys/dev/mii/sqphy.c 9 Jul 2007 22:42:29 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: sqphy.c,v 1. #include -static int sqphymatch(struct device *, struct cfdata *, void *); +static int sqphymatch(struct device *, cfdata_t, void *); static void sqphyattach(struct device *, struct device *, void *); CFATTACH_DECL(sqphy, sizeof(struct mii_softc), @@ -123,7 +123,7 @@ static const struct mii_phydesc sqphys[] }; static int -sqphymatch(struct device *parent, struct cfdata *match, +sqphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/tlphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/tlphy.c,v retrieving revision 1.50 diff -d -p -u -u -r1.50 tlphy.c --- sys/dev/mii/tlphy.c 16 Nov 2006 21:24:07 -0000 1.50 +++ sys/dev/mii/tlphy.c 9 Jul 2007 22:42:29 -0000 @@ -103,7 +103,7 @@ struct tlphy_softc { int sc_need_acomp; }; -static int tlphymatch(struct device *, struct cfdata *, void *); +static int tlphymatch(struct device *, cfdata_t, void *); static void tlphyattach(struct device *, struct device *, void *); CFATTACH_DECL(tlphy, sizeof(struct tlphy_softc), @@ -127,7 +127,7 @@ static const struct mii_phydesc tlphys[] }; static int -tlphymatch(struct device *parent, struct cfdata *match, +tlphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/tqphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/tqphy.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 tqphy.c --- sys/dev/mii/tqphy.c 16 Nov 2006 21:24:07 -0000 1.31 +++ sys/dev/mii/tqphy.c 9 Jul 2007 22:42:30 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: tqphy.c,v 1. #include -static int tqphymatch(struct device *, struct cfdata *, void *); +static int tqphymatch(struct device *, cfdata_t, void *); static void tqphyattach(struct device *, struct device *, void *); CFATTACH_DECL(tqphy, sizeof(struct mii_softc), @@ -115,7 +115,7 @@ static const struct mii_phydesc tqphys[] }; static int -tqphymatch(struct device *parent, struct cfdata *match, +tqphymatch(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mii/ukphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/ukphy.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 ukphy.c --- sys/dev/mii/ukphy.c 16 Nov 2006 21:24:07 -0000 1.30 +++ sys/dev/mii/ukphy.c 9 Jul 2007 22:42:30 -0000 @@ -98,7 +98,7 @@ struct mii_knowndev { #include #endif -static int ukphymatch(struct device *, struct cfdata *, void *); +static int ukphymatch(struct device *, cfdata_t, void *); static void ukphyattach(struct device *, struct device *, void *); CFATTACH_DECL(ukphy, sizeof(struct mii_softc), @@ -111,7 +111,7 @@ static const struct mii_phy_funcs ukphy_ }; static int -ukphymatch(struct device *parent, struct cfdata *match, +ukphymatch(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/mii/urlphy.c =================================================================== RCS file: /cvsroot/src/sys/dev/mii/urlphy.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 urlphy.c --- sys/dev/mii/urlphy.c 16 Nov 2006 21:24:07 -0000 1.18 +++ sys/dev/mii/urlphy.c 9 Jul 2007 22:42:30 -0000 @@ -59,7 +59,7 @@ int urlphydebug = URLPHY_DEBUG; #define DPRINTFN(n,x) #endif -static int urlphy_match(struct device *, struct cfdata *, void *); +static int urlphy_match(struct device *, cfdata_t, void *); static void urlphy_attach(struct device *, struct device *, void *); CFATTACH_DECL(urlphy, sizeof(struct mii_softc), @@ -73,7 +73,7 @@ static const struct mii_phy_funcs urlphy }; static int -urlphy_match(struct device *parent, struct cfdata *match, void *aux) +urlphy_match(struct device *parent, cfdata_t cfdata, void *aux) { struct mii_attach_args *ma = aux; Index: sys/dev/mscp/mscp_disk.c =================================================================== RCS file: /cvsroot/src/sys/dev/mscp/mscp_disk.c,v retrieving revision 1.54 diff -d -p -u -u -r1.54 mscp_disk.c --- sys/dev/mscp/mscp_disk.c 4 Mar 2007 06:02:14 -0000 1.54 +++ sys/dev/mscp/mscp_disk.c 9 Jul 2007 22:42:30 -0000 @@ -132,7 +132,7 @@ void rrmakelabel(struct disklabel *, lon #if NRA -int ramatch(struct device *, struct cfdata *, void *); +int ramatch(struct device *, cfdata_t, void *); void raattach(struct device *, struct device *, void *); int ra_putonline(struct ra_softc *); @@ -619,7 +619,7 @@ rasize(dev) #if NRX -int rxmatch(struct device *, struct cfdata *, void *); +int rxmatch(struct device *, cfdata_t, void *); CFATTACH_DECL(rx, sizeof(struct rx_softc), rxmatch, rxattach, NULL, NULL); Index: sys/dev/mscp/mscp_subr.c =================================================================== RCS file: /cvsroot/src/sys/dev/mscp/mscp_subr.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 mscp_subr.c --- sys/dev/mscp/mscp_subr.c 29 Apr 2007 20:23:35 -0000 1.33 +++ sys/dev/mscp/mscp_subr.c 9 Jul 2007 22:42:31 -0000 @@ -96,7 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: mscp_subr.c, #define b_forw b_hash.le_next -int mscp_match(struct device *, struct cfdata *, void *); +int mscp_match(struct device *, cfdata_t, void *); void mscp_attach(struct device *, struct device *, void *); void mscp_start(struct mscp_softc *); int mscp_init(struct mscp_softc *); @@ -144,7 +144,7 @@ mscp_waitstep(mi, mask, result) int mscp_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct mscp_attach_args *ma = aux; Index: sys/dev/mscp/mscp_tape.c =================================================================== RCS file: /cvsroot/src/sys/dev/mscp/mscp_tape.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 mscp_tape.c --- sys/dev/mscp/mscp_tape.c 4 Mar 2007 06:02:14 -0000 1.30 +++ sys/dev/mscp/mscp_tape.c 9 Jul 2007 22:42:31 -0000 @@ -81,7 +81,7 @@ struct mt_softc { #define MT_OFFLINE 0 #define MT_ONLINE 1 -int mtmatch(struct device *, struct cfdata *, void *); +int mtmatch(struct device *, cfdata_t, void *); void mtattach(struct device *, struct device *, void *); void mtdgram(struct device *, struct mscp *, struct mscp_softc *); void mtiodone(struct device *, struct buf *); Index: sys/dev/mvme/clmpcc_pcctwo.c =================================================================== RCS file: /cvsroot/src/sys/dev/mvme/clmpcc_pcctwo.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 clmpcc_pcctwo.c --- sys/dev/mvme/clmpcc_pcctwo.c 7 Aug 2006 01:31:36 -0000 1.12 +++ sys/dev/mvme/clmpcc_pcctwo.c 9 Jul 2007 22:42:31 -0000 @@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: clmpcc_pcctw /* Definition of the driver for autoconfig. */ -int clmpcc_pcctwo_match(struct device *, struct cfdata *, void *); +int clmpcc_pcctwo_match(struct device *, cfdata_t, void *); void clmpcc_pcctwo_attach(struct device *, struct device *, void *); void clmpcc_pcctwo_iackhook(struct clmpcc_softc *, int); void clmpcc_pcctwo_consiackhook(struct clmpcc_softc *, int); Index: sys/dev/mvme/clock_pcctwo.c =================================================================== RCS file: /cvsroot/src/sys/dev/mvme/clock_pcctwo.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 clock_pcctwo.c --- sys/dev/mvme/clock_pcctwo.c 29 Mar 2006 07:07:41 -0000 1.10 +++ sys/dev/mvme/clock_pcctwo.c 9 Jul 2007 22:42:31 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock_pcctwo #include -int clock_pcctwo_match(struct device *, struct cfdata *, void *); +int clock_pcctwo_match(struct device *, cfdata_t, void *); void clock_pcctwo_attach(struct device *, struct device *, void *); struct clock_pcctwo_softc { Index: sys/dev/mvme/if_ie_mvme.c =================================================================== RCS file: /cvsroot/src/sys/dev/mvme/if_ie_mvme.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 if_ie_mvme.c --- sys/dev/mvme/if_ie_mvme.c 4 Mar 2007 06:02:15 -0000 1.10 +++ sys/dev/mvme/if_ie_mvme.c 9 Jul 2007 22:42:31 -0000 @@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c #include -int ie_pcctwo_match(struct device *, struct cfdata *, void *); +int ie_pcctwo_match(struct device *, cfdata_t, void *); void ie_pcctwo_attach(struct device *, struct device *, void *); struct ie_pcctwo_softc { Index: sys/dev/mvme/lpt_pcctwo.c =================================================================== RCS file: /cvsroot/src/sys/dev/mvme/lpt_pcctwo.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 lpt_pcctwo.c --- sys/dev/mvme/lpt_pcctwo.c 29 Mar 2006 07:07:41 -0000 1.8 +++ sys/dev/mvme/lpt_pcctwo.c 9 Jul 2007 22:42:31 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_pcctwo.c /* * Autoconfig stuff */ -int lpt_pcctwo_match(struct device *, struct cfdata *, void *); +int lpt_pcctwo_match(struct device *, cfdata_t, void *); void lpt_pcctwo_attach(struct device *, struct device *, void *); CFATTACH_DECL(lpt_pcctwo, sizeof(struct lpt_softc), Index: sys/dev/mvme/osiop_pcctwo.c =================================================================== RCS file: /cvsroot/src/sys/dev/mvme/osiop_pcctwo.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 osiop_pcctwo.c --- sys/dev/mvme/osiop_pcctwo.c 29 Mar 2006 07:07:41 -0000 1.10 +++ sys/dev/mvme/osiop_pcctwo.c 9 Jul 2007 22:42:32 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: osiop_pcctwo #include -int osiop_pcctwo_match(struct device *, struct cfdata *, void *); +int osiop_pcctwo_match(struct device *, cfdata_t, void *); void osiop_pcctwo_attach(struct device *, struct device *, void *); struct osiop_pcctwo_softc { Index: sys/dev/ofisa/atppc_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/atppc_ofisa.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 atppc_ofisa.c --- sys/dev/ofisa/atppc_ofisa.c 4 Mar 2007 06:02:15 -0000 1.5 +++ sys/dev/ofisa/atppc_ofisa.c 9 Jul 2007 22:42:32 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: atppc_ofisa. #include #include -static int atppc_ofisa_match(struct device *, struct cfdata *, void *); +static int atppc_ofisa_match(struct device *, cfdata_t, void *); static void atppc_ofisa_attach(struct device *, struct device *, void *); struct atppc_ofisa_softc { @@ -84,7 +84,7 @@ static void atppc_ofisa_dma_free(struct * atppc_ofisa_match: autoconf(9) match routine */ static int -atppc_ofisa_match(struct device *parent, struct cfdata *match, void *aux) +atppc_ofisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ofisa_attach_args *aa = aux; static const char *const compatible_strings[] = { "pnpPNP,401", NULL }; Index: sys/dev/ofisa/com_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/com_ofisa.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 com_ofisa.c --- sys/dev/ofisa/com_ofisa.c 13 Jul 2006 22:56:02 -0000 1.11 +++ sys/dev/ofisa/com_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -62,7 +62,7 @@ struct com_ofisa_softc { void *sc_ih; /* interrupt handler */ }; -int com_ofisa_probe(struct device *, struct cfdata *, void *); +int com_ofisa_probe(struct device *, cfdata_t, void *); void com_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(com_ofisa, sizeof(struct com_ofisa_softc), Index: sys/dev/ofisa/ess_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/ess_ofisa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 ess_ofisa.c --- sys/dev/ofisa/ess_ofisa.c 29 Mar 2006 07:09:33 -0000 1.17 +++ sys/dev/ofisa/ess_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c, #include #include -int ess_ofisa_match(struct device *, struct cfdata *, void *); +int ess_ofisa_match(struct device *, cfdata_t, void *); void ess_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(ess_ofisa, sizeof(struct ess_softc), Index: sys/dev/ofisa/if_cs_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/if_cs_ofisa.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_cs_ofisa.c --- sys/dev/ofisa/if_cs_ofisa.c 29 Mar 2006 07:09:33 -0000 1.15 +++ sys/dev/ofisa/if_cs_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -70,7 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa. #include #include -int cs_ofisa_match(struct device *, struct cfdata *, void *); +int cs_ofisa_match(struct device *, cfdata_t, void *); void cs_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(cs_ofisa, sizeof(struct cs_softc_isa), Index: sys/dev/ofisa/joy_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/joy_ofisa.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 joy_ofisa.c --- sys/dev/ofisa/joy_ofisa.c 14 May 2006 21:42:28 -0000 1.11 +++ sys/dev/ofisa/joy_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c, #define JOY_NPORTS 1 /* XXX should be in a header file */ -int joy_ofisa_match(struct device *, struct cfdata *, void *); +int joy_ofisa_match(struct device *, cfdata_t, void *); void joy_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(joy_ofisa, sizeof(struct joy_softc), @@ -63,7 +63,7 @@ CFATTACH_DECL(joy_ofisa, sizeof(struct j int joy_ofisa_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct ofisa_attach_args *aa = aux; Index: sys/dev/ofisa/lpt_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/lpt_ofisa.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 lpt_ofisa.c --- sys/dev/ofisa/lpt_ofisa.c 29 Mar 2006 07:09:33 -0000 1.11 +++ sys/dev/ofisa/lpt_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -62,7 +62,7 @@ struct lpt_ofisa_softc { void *sc_ih; /* interrupt handler */ }; -int lpt_ofisa_probe(struct device *, struct cfdata *, void *); +int lpt_ofisa_probe(struct device *, cfdata_t, void *); void lpt_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(lpt_ofisa, sizeof(struct lpt_ofisa_softc), Index: sys/dev/ofisa/ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/ofisa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 ofisa.c --- sys/dev/ofisa/ofisa.c 20 Feb 2007 01:56:59 -0000 1.17 +++ sys/dev/ofisa/ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1. #define OFW_MAX_STACK_BUF_SIZE 256 -static int ofisamatch(struct device *, struct cfdata *, void *); +static int ofisamatch(struct device *, cfdata_t, void *); static void ofisaattach(struct device *, struct device *, void *); CFATTACH_DECL(ofisa, sizeof(struct device), Index: sys/dev/ofisa/pckbc_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/pckbc_ofisa.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 pckbc_ofisa.c --- sys/dev/ofisa/pckbc_ofisa.c 29 Mar 2006 07:09:33 -0000 1.11 +++ sys/dev/ofisa/pckbc_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_ofisa. #include #include -static int pckbc_ofisa_match (struct device *, struct cfdata *, void *); +static int pckbc_ofisa_match (struct device *, cfdata_t, void *); static void pckbc_ofisa_attach (struct device *, struct device *, void *); struct pckbc_ofisa_softc { @@ -70,7 +70,7 @@ static const char *const kb_compatible_s static const char *const ms_compatible_strings[] = { "pnpPNP,f03", NULL }; static int -pckbc_ofisa_match(struct device *parent, struct cfdata *match, void *aux) +pckbc_ofisa_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ofisa_attach_args *aa = aux; static const char *const compatible_strings[] = { "INTC,80c42", NULL }; Index: sys/dev/ofisa/sb_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/sb_ofisa.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 sb_ofisa.c --- sys/dev/ofisa/sb_ofisa.c 29 Mar 2006 07:09:33 -0000 1.14 +++ sys/dev/ofisa/sb_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v #include #include -int sb_ofisa_match(struct device *, struct cfdata *, void *); +int sb_ofisa_match(struct device *, cfdata_t, void *); void sb_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(sb_ofisa, sizeof(struct sbdsp_softc), Index: sys/dev/ofisa/wdc_ofisa.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofisa/wdc_ofisa.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 wdc_ofisa.c --- sys/dev/ofisa/wdc_ofisa.c 29 Mar 2006 07:09:33 -0000 1.28 +++ sys/dev/ofisa/wdc_ofisa.c 9 Jul 2007 22:42:33 -0000 @@ -66,14 +66,14 @@ struct wdc_ofisa_softc { void *sc_ih; }; -static int wdc_ofisa_probe(struct device *, struct cfdata *, void *); +static int wdc_ofisa_probe(struct device *, cfdata_t, void *); static void wdc_ofisa_attach(struct device *, struct device *, void *); CFATTACH_DECL(wdc_ofisa, sizeof(struct wdc_ofisa_softc), wdc_ofisa_probe, wdc_ofisa_attach, NULL, NULL); static int -wdc_ofisa_probe(struct device *parent, struct cfdata *cf, void *aux) +wdc_ofisa_probe(struct device *parent, cfdata_t cf, void *aux) { struct ofisa_attach_args *aa = aux; static const char *const compatible_strings[] = { "pnpPNP,600", NULL }; Index: sys/dev/ofw/ofbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofw/ofbus.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 ofbus.c --- sys/dev/ofw/ofbus.c 11 Dec 2005 12:22:48 -0000 1.20 +++ sys/dev/ofw/ofbus.c 9 Jul 2007 22:42:33 -0000 @@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: ofbus.c,v 1. #include -int ofbus_match(struct device *, struct cfdata *, void *); +int ofbus_match(struct device *, cfdata_t, void *); void ofbus_attach(struct device *, struct device *, void *); static int ofbus_print(void *, const char *); Index: sys/dev/ofw/ofcons.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofw/ofcons.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 ofcons.c --- sys/dev/ofw/ofcons.c 4 Mar 2007 06:02:15 -0000 1.30 +++ sys/dev/ofw/ofcons.c 9 Jul 2007 22:42:33 -0000 @@ -62,7 +62,7 @@ cons_decl(ofcons_); static int stdin, stdout; -static int ofcons_match(struct device *, struct cfdata *, void *); +static int ofcons_match(struct device *, cfdata_t, void *); static void ofcons_attach(struct device *, struct device *, void *); CFATTACH_DECL(ofcons, sizeof(struct ofcons_softc), @@ -88,7 +88,7 @@ static int ofcons_probe(void); static int ofcons_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct ofbus_attach_args *oba = aux; Index: sys/dev/ofw/ofdisk.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofw/ofdisk.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 ofdisk.c --- sys/dev/ofw/ofdisk.c 4 Mar 2007 06:02:15 -0000 1.35 +++ sys/dev/ofw/ofdisk.c 9 Jul 2007 22:42:34 -0000 @@ -63,7 +63,7 @@ struct ofdisk_softc { #define OFDISK_FLOPPY_P(of) ((of)->sc_flags & OFDF_ISFLOPPY) -static int ofdisk_match (struct device *, struct cfdata *, void *); +static int ofdisk_match (struct device *, cfdata_t, void *); static void ofdisk_attach (struct device *, struct device *, void *); CFATTACH_DECL(ofdisk, sizeof(struct ofdisk_softc), @@ -98,7 +98,7 @@ void ofdisk_getdefaultlabel (struct ofdi void ofdisk_getdisklabel (dev_t); static int -ofdisk_match(struct device *parent, struct cfdata *match, void *aux) +ofdisk_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ofbus_attach_args *oba = aux; char type[8]; Index: sys/dev/ofw/ofnet.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofw/ofnet.c,v retrieving revision 1.39 diff -d -p -u -u -r1.39 ofnet.c --- sys/dev/ofw/ofnet.c 8 Mar 2007 20:52:21 -0000 1.39 +++ sys/dev/ofw/ofnet.c 9 Jul 2007 22:42:34 -0000 @@ -73,7 +73,7 @@ CFATTACH_DECL(ipkdb_ofn, 0, static struct ipkdb_if *kifp; static struct ofnet_softc *ipkdb_of; -static int ipkdbprobe (struct cfdata *, void *); +static int ipkdbprobe (cfdata_t, void *); #endif struct ofnet_softc { @@ -84,7 +84,7 @@ struct ofnet_softc { struct callout sc_callout; }; -static int ofnet_match (struct device *, struct cfdata *, void *); +static int ofnet_match (struct device *, cfdata_t, void *); static void ofnet_attach (struct device *, struct device *, void *); CFATTACH_DECL(ofnet, sizeof(struct ofnet_softc), @@ -100,7 +100,7 @@ static int ofnet_ioctl (struct ifnet *, static void ofnet_watchdog (struct ifnet *); static int -ofnet_match(struct device *parent, struct cfdata *match, void *aux) +ofnet_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ofbus_attach_args *oba = aux; char type[32]; @@ -454,7 +454,7 @@ ipkdbofsend(struct ipkdb_if *kip, u_char } static int -ipkdbprobe(struct cfdata *match, void *aux) +ipkdbprobe(cfdata_t cfdata, void *aux) { struct ipkdb_if *kip = aux; static char name[256]; Index: sys/dev/ofw/ofrtc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ofw/ofrtc.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 ofrtc.c --- sys/dev/ofw/ofrtc.c 13 Sep 2006 07:14:36 -0000 1.20 +++ sys/dev/ofw/ofrtc.c 9 Jul 2007 22:42:34 -0000 @@ -89,7 +89,7 @@ struct ofrtc_softc { struct todr_chip_handle sc_todr; }; -static int ofrtc_match(struct device *, struct cfdata *, void *); +static int ofrtc_match(struct device *, cfdata_t, void *); static void ofrtc_attach(struct device *, struct device *, void *); static int ofrtc_gettod(todr_chip_handle_t, struct clock_ymdhms *); static int ofrtc_settod(todr_chip_handle_t, struct clock_ymdhms *); @@ -98,7 +98,7 @@ CFATTACH_DECL(ofrtc, sizeof(struct ofrtc ofrtc_match, ofrtc_attach, NULL, NULL); static int -ofrtc_match(struct device *parent, struct cfdata *match, void *aux) +ofrtc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ofbus_attach_args *oba = aux; char type[8]; Index: sys/dev/onewire/onewire.c =================================================================== RCS file: /cvsroot/src/sys/dev/onewire/onewire.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 onewire.c --- sys/dev/onewire/onewire.c 16 Nov 2006 01:33:08 -0000 1.4 +++ sys/dev/onewire/onewire.c 9 Jul 2007 22:42:34 -0000 @@ -66,7 +66,7 @@ struct onewire_device { int d_present; }; -int onewire_match(struct device *, struct cfdata *, void *); +int onewire_match(struct device *, cfdata_t, void *); void onewire_attach(struct device *, struct device *, void *); int onewire_detach(struct device *, int); int onewire_activate(struct device *, enum devact); @@ -87,7 +87,7 @@ const struct cdevsw onewire_cdevsw = { extern struct cfdriver onewire_cd; int -onewire_match(struct device *parent, struct cfdata *cf, +onewire_match(struct device *parent, cfdata_t cf, void *aux) { return 1; Index: sys/dev/onewire/owtemp.c =================================================================== RCS file: /cvsroot/src/sys/dev/onewire/owtemp.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 owtemp.c --- sys/dev/onewire/owtemp.c 16 Nov 2006 01:33:08 -0000 1.6 +++ sys/dev/onewire/owtemp.c 9 Jul 2007 22:42:34 -0000 @@ -55,7 +55,7 @@ struct owtemp_softc { int sc_dying; }; -int owtemp_match(struct device *, struct cfdata *, void *); +int owtemp_match(struct device *, cfdata_t, void *); void owtemp_attach(struct device *, struct device *, void *); int owtemp_detach(struct device *, int); int owtemp_activate(struct device *, enum devact); @@ -87,7 +87,7 @@ static uint32_t owtemp_decode_ds18b20(co static uint32_t owtemp_decode_ds1920(const uint8_t *); int -owtemp_match(struct device *parent, struct cfdata *cf, +owtemp_match(struct device *parent, cfdata_t cf, void *aux) { return (onewire_matchbyfam(aux, owtemp_fams, Index: sys/dev/pci/aac_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/aac_pci.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 aac_pci.c --- sys/dev/pci/aac_pci.c 5 Jun 2007 04:04:14 -0000 1.21 +++ sys/dev/pci/aac_pci.c 9 Jul 2007 22:42:34 -0000 @@ -439,8 +439,7 @@ aac_pci_intr_set(struct aac_softc *sc, i } static int -aac_pci_match(struct device *parent, struct cfdata *match, - void *aux) +aac_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/acardide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/acardide.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 acardide.c --- sys/dev/pci/acardide.c 9 Feb 2007 21:55:27 -0000 1.21 +++ sys/dev/pci/acardide.c 9 Jul 2007 22:42:34 -0000 @@ -44,7 +44,7 @@ static void acard_setup_channel(struct a static int acard_pci_intr(void *); #endif -static int acardide_match(struct device *, struct cfdata *, void *); +static int acardide_match(struct device *, cfdata_t, void *); static void acardide_attach(struct device *, struct device *, void *); CFATTACH_DECL(acardide, sizeof(struct pciide_softc), @@ -84,8 +84,7 @@ static const struct pciide_product_desc }; static int -acardide_match(struct device *parent, struct cfdata *match, - void *aux) +acardide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/aceride.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/aceride.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 aceride.c --- sys/dev/pci/aceride.c 9 Feb 2007 21:55:27 -0000 1.23 +++ sys/dev/pci/aceride.c 9 Jul 2007 22:42:34 -0000 @@ -47,7 +47,7 @@ static void acer_chip_map(struct pciide_ static void acer_setup_channel(struct ata_channel*); static int acer_pci_intr(void *); -static int aceride_match(struct device *, struct cfdata *, void *); +static int aceride_match(struct device *, cfdata_t, void *); static void aceride_attach(struct device *, struct device *, void *); struct aceride_softc { @@ -72,8 +72,7 @@ static const struct pciide_product_desc }; static int -aceride_match(struct device *parent, struct cfdata *match, - void *aux) +aceride_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/adv_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/adv_pci.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 adv_pci.c --- sys/dev/pci/adv_pci.c 16 Nov 2006 01:33:08 -0000 1.20 +++ sys/dev/pci/adv_pci.c 9 Jul 2007 22:42:35 -0000 @@ -97,8 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: adv_pci.c,v * the actual probe routine to check it out. */ static int -adv_pci_match(struct device *parent, struct cfdata *match, - void *aux) +adv_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/adw_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/adw_pci.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 adw_pci.c --- sys/dev/pci/adw_pci.c 16 Nov 2006 01:33:08 -0000 1.19 +++ sys/dev/pci/adw_pci.c 9 Jul 2007 22:42:35 -0000 @@ -83,8 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: adw_pci.c,v * the actual probe routine to check it out. */ static int -adw_pci_match(struct device *parent, struct cfdata *match, - void *aux) +adw_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/agp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/agp.c,v retrieving revision 1.46 diff -d -p -u -u -r1.46 agp.c --- sys/dev/pci/agp.c 6 Mar 2007 01:09:42 -0000 1.46 +++ sys/dev/pci/agp.c 9 Jul 2007 22:42:35 -0000 @@ -216,8 +216,7 @@ agp_lookup(const struct pci_attach_args } static int -agpmatch(struct device *parent, struct cfdata *match, - void *aux) +agpmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct agpbus_attach_args *apa = aux; struct pci_attach_args *pa = &apa->apa_pci_args; Index: sys/dev/pci/ahc_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ahc_pci.c,v retrieving revision 1.58 diff -d -p -u -u -r1.58 ahc_pci.c --- sys/dev/pci/ahc_pci.c 16 Nov 2006 01:33:08 -0000 1.58 +++ sys/dev/pci/ahc_pci.c 9 Jul 2007 22:42:36 -0000 @@ -741,12 +741,11 @@ ahc_find_pci_device(pcireg_t id, pcireg_ } static int -ahc_pci_probe(struct device *parent, struct cfdata *match, - void *aux) +ahc_pci_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; - const struct ahc_pci_identity *entry; - pcireg_t subid; + const struct ahc_pci_identity *entry; + pcireg_t subid; subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); entry = ahc_find_pci_device(pa->pa_id, subid, pa->pa_function); Index: sys/dev/pci/ahcisata_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ahcisata_pci.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 ahcisata_pci.c --- sys/dev/pci/ahcisata_pci.c 12 May 2007 11:04:59 -0000 1.1 +++ sys/dev/pci/ahcisata_pci.c 9 Jul 2007 22:42:36 -0000 @@ -48,15 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: ahcisata_pci #include #include -static int ahci_pci_match(struct device *, struct cfdata *, void *); +static int ahci_pci_match(struct device *, cfdata_t, void *); static void ahci_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(ahcisata_pci, sizeof(struct ahci_softc), ahci_pci_match, ahci_pci_attach, NULL, NULL); static int -ahci_pci_match(struct device *parent, struct cfdata *match, - void *aux) +ahci_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; bus_space_tag_t regt; Index: sys/dev/pci/ahd_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ahd_pci.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 ahd_pci.c --- sys/dev/pci/ahd_pci.c 16 Nov 2006 01:33:08 -0000 1.25 +++ sys/dev/pci/ahd_pci.c 9 Jul 2007 22:42:36 -0000 @@ -286,12 +286,11 @@ ahd_find_pci_device(pcireg_t id, pcireg_ } static int -ahd_pci_probe(struct device *parent, struct cfdata *match, - void *aux) +ahd_pci_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; - const struct ahd_pci_identity *entry; - pcireg_t subid; + const struct ahd_pci_identity *entry; + pcireg_t subid; subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); entry = ahd_find_pci_device(pa->pa_id, subid); Index: sys/dev/pci/amdpm.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/amdpm.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 amdpm.c --- sys/dev/pci/amdpm.c 5 Feb 2007 23:38:15 -0000 1.25 +++ sys/dev/pci/amdpm.c 9 Jul 2007 22:42:36 -0000 @@ -70,8 +70,7 @@ static void amdpm_rnd_callout(void *); #endif static int -amdpm_match(struct device *parent, struct cfdata *match, - void *aux) +amdpm_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/amr.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/amr.c,v retrieving revision 1.44 diff -d -p -u -u -r1.44 amr.c --- sys/dev/pci/amr.c 4 Mar 2007 06:02:16 -0000 1.44 +++ sys/dev/pci/amr.c 9 Jul 2007 22:42:38 -0000 @@ -96,8 +96,6 @@ __KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.44 #include #include -#include "locators.h" - static void amr_attach(struct device *, struct device *, void *); static void amr_ccb_dump(struct amr_softc *, struct amr_ccb *); static void *amr_enquire(struct amr_softc *, u_int8_t, u_int8_t, u_int8_t, @@ -105,7 +103,7 @@ static void *amr_enquire(struct amr_soft static int amr_init(struct amr_softc *, const char *, struct pci_attach_args *pa); static int amr_intr(void *); -static int amr_match(struct device *, struct cfdata *, void *); +static int amr_match(struct device *, cfdata_t, void *); static int amr_print(void *, const char *); static void amr_shutdown(void *); static void amr_teardown(struct amr_softc *); @@ -229,8 +227,7 @@ amr_outl(struct amr_softc *amr, int off, * Match a supported device. */ static int -amr_match(struct device *parent, struct cfdata *match, - void *aux) +amr_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; pcireg_t s; @@ -266,6 +263,7 @@ amr_match(struct device *parent, struct static void amr_attach(struct device *parent, struct device *self, void *aux) { + prop_dictionary_t locs; struct pci_attach_args *pa; struct amr_attach_args amra; const struct amr_pci_type *apt; @@ -274,9 +272,9 @@ amr_attach(struct device *parent, struct pci_intr_handle_t ih; const char *intrstr; pcireg_t reg; - int rseg, i, j, size, rv, memreg, ioreg; + uint32_t j; + int rseg, i, size, rv, memreg, ioreg; struct amr_ccb *ac; - int locs[AMRCF_NLOCS]; aprint_naive(": RAID controller\n"); @@ -476,17 +474,32 @@ amr_attach(struct device *parent, struct if (amr_sdh == NULL) amr_sdh = shutdownhook_establish(amr_shutdown, NULL); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not allocate locators\n", + device_xname(self)); + amr_teardown(amr); + return; + } + /* Attach sub-devices. */ for (j = 0; j < amr->amr_numdrives; j++) { if (amr->amr_drive[j].al_size == 0) continue; amra.amra_unit = j; - locs[AMRCF_UNIT] = j; + if (! prop_dictionary_set_uint32(locs, "unit", j)) { + aprint_error("%s: could not set locators\n", + device_xname(self)); + amr_teardown(amr); + prop_object_release(locs); + return; + } amr->amr_drive[j].al_dv = config_found_sm_loc(&amr->amr_dv, "amr", locs, &amra, amr_print, config_stdsubmatch); } + prop_object_release(locs); SIMPLEQ_INIT(&amr->amr_ccb_queue); Index: sys/dev/pci/artsata.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/artsata.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 artsata.c --- sys/dev/pci/artsata.c 9 Feb 2007 21:55:27 -0000 1.15 +++ sys/dev/pci/artsata.c 9 Jul 2007 22:42:38 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: artsata.c,v static void artisea_chip_map(struct pciide_softc*, struct pci_attach_args *); -static int artsata_match(struct device *, struct cfdata *, void *); +static int artsata_match(struct device *, cfdata_t, void *); static void artsata_attach(struct device *, struct device *, void *); static const struct pciide_product_desc pciide_artsata_products[] = { @@ -100,8 +100,7 @@ CFATTACH_DECL(artsata, sizeof(struct pci artsata_match, artsata_attach, NULL, NULL); static int -artsata_match(struct device *parent, struct cfdata *match, - void *aux) +artsata_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; @@ -257,12 +256,14 @@ static void artisea_mapreg_dma(struct pciide_softc *sc, struct pci_attach_args *pa) { struct pciide_channel *pc; + device_t dev = &sc->sc_wdcdev.sc_atac.atac_dev; int chan; u_int32_t dma_ctl; u_int32_t cacheline_len; + uint64_t flags = cfdata_flags(device_cfdata(dev)); aprint_verbose("%s: bus-master DMA support present", - sc->sc_wdcdev.sc_atac.atac_dev.dv_xname); + device_xname(dev)); sc->sc_dma_ok = 1; @@ -293,10 +294,8 @@ artisea_mapreg_dma(struct pciide_softc * sc->sc_dma_iot = sc->sc_ba5_st; sc->sc_dmat = pa->pa_dmat; - if (device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)->cf_flags & - PCIIDE_OPTIONS_NODMA) { - aprint_verbose( - ", but unused (forced off by config file)\n"); + if ((flags & PCIIDE_OPTIONS_NODMA) != 0) { + aprint_verbose(", but unused (forced off by config file)\n"); sc->sc_dma_ok = 0; return; } Index: sys/dev/pci/atppc_puc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/atppc_puc.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 atppc_puc.c --- sys/dev/pci/atppc_puc.c 4 Mar 2007 06:02:16 -0000 1.5 +++ sys/dev/pci/atppc_puc.c 9 Jul 2007 22:42:38 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: atppc_puc.c, #include -static int atppc_puc_match(struct device *, struct cfdata *, void *); +static int atppc_puc_match(struct device *, cfdata_t, void *); static void atppc_puc_attach(struct device *, struct device *, void *); struct atppc_puc_softc { @@ -85,7 +85,7 @@ static void atppc_puc_dma_free(struct de * atppc_acpi_match: autoconf(9) match routine */ static int -atppc_puc_match(struct device *parent, struct cfdata *match, void *aux) +atppc_puc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct puc_attach_args *aa = aux; Index: sys/dev/pci/auacer.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/auacer.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 auacer.c --- sys/dev/pci/auacer.c 4 Mar 2007 06:02:16 -0000 1.16 +++ sys/dev/pci/auacer.c 9 Jul 2007 22:42:38 -0000 @@ -247,8 +247,7 @@ static int auacer_write_codec(void *, ui static int auacer_reset_codec(void *); static int -auacer_match(struct device *parent, struct cfdata *match, - void *aux) +auacer_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/auich.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/auich.c,v retrieving revision 1.117 diff -d -p -u -u -r1.117 auich.c --- sys/dev/pci/auich.c 4 Mar 2007 06:02:16 -0000 1.117 +++ sys/dev/pci/auich.c 9 Jul 2007 22:42:39 -0000 @@ -249,7 +249,7 @@ int auich_debug = 0xfffe; #define DPRINTF(x,y) /* nothing */ #endif -static int auich_match(struct device *, struct cfdata *, void *); +static int auich_match(struct device *, cfdata_t, void *); static void auich_attach(struct device *, struct device *, void *); static int auich_detach(struct device *, int); static int auich_activate(struct device *, enum devact); @@ -436,8 +436,7 @@ auich_lookup(struct pci_attach_args *pa, } static int -auich_match(struct device *parent, struct cfdata *match, - void *aux) +auich_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/auixp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/auixp.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 auixp.c --- sys/dev/pci/auixp.c 29 Apr 2007 20:23:36 -0000 1.23 +++ sys/dev/pci/auixp.c 9 Jul 2007 22:42:39 -0000 @@ -130,7 +130,7 @@ struct audio_device auixp_device = { /* autoconfig */ -static int auixp_match( struct device *, struct cfdata *, void *); +static int auixp_match( struct device *, cfdata_t, void *); static void auixp_attach(struct device *, struct device *, void *); static int auixp_detach(struct device *, int); @@ -1074,8 +1074,7 @@ auixp_mappage(void *hdl, void *mem, off_ /* Is it my hardware? */ static int -auixp_match(struct device *dev, struct cfdata *match, - void *aux) +auixp_match(struct device *dev, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/autri.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/autri.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 autri.c --- sys/dev/pci/autri.c 16 Nov 2006 01:33:08 -0000 1.34 +++ sys/dev/pci/autri.c 9 Jul 2007 22:42:39 -0000 @@ -473,8 +473,7 @@ autri_flags_codec(void *sc) */ static int -autri_match(struct device *parent, struct cfdata *match, - void *aux) +autri_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/auvia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/auvia.c,v retrieving revision 1.60 diff -d -p -u -u -r1.60 auvia.c --- sys/dev/pci/auvia.c 4 Mar 2007 06:02:16 -0000 1.60 +++ sys/dev/pci/auvia.c 9 Jul 2007 22:42:40 -0000 @@ -86,7 +86,7 @@ struct auvia_dma_op { #define AUVIA_DMAOP_COUNT(x) ((x)&0x00FFFFFF) }; -static int auvia_match(struct device *, struct cfdata *, void *); +static int auvia_match(struct device *, cfdata_t, void *); static void auvia_attach(struct device *, struct device *, void *); static int auvia_open(void *, int); static void auvia_close(void *); @@ -270,8 +270,7 @@ static const struct audio_format auvia_s static int -auvia_match(struct device *parent, struct cfdata *match, - void *aux) +auvia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/azalia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/azalia.c,v retrieving revision 1.50 diff -d -p -u -u -r1.50 azalia.c --- sys/dev/pci/azalia.c 13 May 2007 03:30:47 -0000 1.50 +++ sys/dev/pci/azalia.c 9 Jul 2007 22:42:41 -0000 @@ -152,7 +152,7 @@ typedef struct azalia_t { /* prototypes */ -static int azalia_pci_match(struct device *, struct cfdata *, void *); +static int azalia_pci_match(struct device *, cfdata_t, void *); static void azalia_pci_attach(struct device *, struct device *, void *); static int azalia_pci_activate(struct device *, enum devact); static int azalia_pci_detach(struct device *, int); @@ -276,8 +276,7 @@ static const char *pin_devices[16] = { #define PCIID_VT8237A PCI_ID_CODE0(VIATECH, VT8237A_HDA) static int -azalia_pci_match(struct device *parent, struct cfdata *match, - void *aux) +azalia_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/bha_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/bha_pci.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 bha_pci.c --- sys/dev/pci/bha_pci.c 16 Nov 2006 01:33:08 -0000 1.30 +++ sys/dev/pci/bha_pci.c 9 Jul 2007 22:42:41 -0000 @@ -63,8 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: bha_pci.c,v * the actual probe routine to check it out. */ static int -bha_pci_match(struct device *parent, struct cfdata *match, - void *aux) +bha_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; bus_space_tag_t iot; Index: sys/dev/pci/btvmei.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/btvmei.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 btvmei.c --- sys/dev/pci/btvmei.c 10 Jan 2007 20:36:28 -0000 1.16 +++ sys/dev/pci/btvmei.c 9 Jul 2007 22:42:42 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: btvmei.c,v 1 #include #include -static int b3_617_match(struct device *, struct cfdata *, void *); +static int b3_617_match(struct device *, cfdata_t, void *); static void b3_617_attach(struct device *, struct device *, void *); #ifdef notyet static int b3_617_detach(struct device *); @@ -75,7 +75,7 @@ CFATTACH_DECL(btvmei, sizeof(struct b3_6 static int b3_617_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct pci_attach_args *pa = aux; Index: sys/dev/pci/btvmeii.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/btvmeii.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 btvmeii.c --- sys/dev/pci/btvmeii.c 24 Nov 2006 22:04:25 -0000 1.12 +++ sys/dev/pci/btvmeii.c 9 Jul 2007 22:42:42 -0000 @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: btvmeii.c,v #include -static int b3_2706_match(struct device *, struct cfdata *, void *); +static int b3_2706_match(struct device *, cfdata_t, void *); static void b3_2706_attach(struct device *, struct device *, void *); /* exported via tag structs */ @@ -136,7 +136,7 @@ CFATTACH_DECL(btvmeii, sizeof(struct b3_ static int b3_2706_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct pci_attach_args *pa = aux; Index: sys/dev/pci/cac_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cac_pci.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 cac_pci.c --- sys/dev/pci/cac_pci.c 4 Mar 2007 06:02:17 -0000 1.25 +++ sys/dev/pci/cac_pci.c 9 Jul 2007 22:42:42 -0000 @@ -137,8 +137,7 @@ cac_pci_findtype(struct pci_attach_args } static int -cac_pci_match(struct device *parent, struct cfdata *match, - void *aux) +cac_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { return (cac_pci_findtype(aux) != NULL); Index: sys/dev/pci/chipsfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/chipsfb.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 chipsfb.c --- sys/dev/pci/chipsfb.c 4 Mar 2007 06:02:17 -0000 1.9 +++ sys/dev/pci/chipsfb.c 9 Jul 2007 22:42:43 -0000 @@ -111,7 +111,7 @@ static struct vcons_screen chipsfb_conso extern const u_char rasops_cmap[768]; -static int chipsfb_match(struct device *, struct cfdata *, void *); +static int chipsfb_match(struct device *, cfdata_t, void *); static void chipsfb_attach(struct device *, struct device *, void *); CFATTACH_DECL(chipsfb, sizeof(struct chipsfb_softc), chipsfb_match, @@ -251,7 +251,7 @@ chipsfb_wait_idle(struct chipsfb_softc * } static int -chipsfb_match(struct device *parent, struct cfdata *match, void *aux) +chipsfb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/ciss_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ciss_pci.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 ciss_pci.c --- sys/dev/pci/ciss_pci.c 16 Nov 2006 01:33:08 -0000 1.3 +++ sys/dev/pci/ciss_pci.c 9 Jul 2007 22:42:43 -0000 @@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v #define CISS_BAR 0x10 -int ciss_pci_match(struct device *, struct cfdata *, void *); +int ciss_pci_match(struct device *, cfdata_t, void *); void ciss_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(ciss_pci, sizeof(struct ciss_softc), @@ -225,7 +225,7 @@ const struct { }; int -ciss_pci_match(struct device *parent, struct cfdata *match, +ciss_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/cmdide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cmdide.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 cmdide.c --- sys/dev/pci/cmdide.c 9 Feb 2007 21:55:27 -0000 1.27 +++ sys/dev/pci/cmdide.c 9 Jul 2007 22:42:43 -0000 @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1 #include -static int cmdide_match(struct device *, struct cfdata *, void *); +static int cmdide_match(struct device *, cfdata_t, void *); static void cmdide_attach(struct device *, struct device *, void *); CFATTACH_DECL(cmdide, sizeof(struct pciide_softc), @@ -100,7 +100,7 @@ static const struct pciide_product_desc }; static int -cmdide_match(struct device *parent, struct cfdata *match, +cmdide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/cmpci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cmpci.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 cmpci.c --- sys/dev/pci/cmpci.c 4 Mar 2007 06:02:17 -0000 1.35 +++ sys/dev/pci/cmpci.c 9 Jul 2007 22:42:43 -0000 @@ -106,7 +106,7 @@ static int cmpci_set_in_ports(struct cmp /* * autoconf interface */ -static int cmpci_match(struct device *, struct cfdata *, void *); +static int cmpci_match(struct device *, cfdata_t, void *); static void cmpci_attach(struct device *, struct device *, void *); CFATTACH_DECL(cmpci, sizeof (struct cmpci_softc), @@ -359,7 +359,7 @@ cmpci_index_to_divider(int index) * interface to configure the device. */ static int -cmpci_match(struct device *parent, struct cfdata *match, +cmpci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/com_puc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/com_puc.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 com_puc.c --- sys/dev/pci/com_puc.c 16 Nov 2006 01:33:08 -0000 1.16 +++ sys/dev/pci/com_puc.c 9 Jul 2007 22:42:44 -0000 @@ -61,8 +61,7 @@ struct com_puc_softc { }; static int -com_puc_probe(struct device *parent, struct cfdata *match, - void *aux) +com_puc_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct puc_attach_args *aa = aux; Index: sys/dev/pci/cs4280.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cs4280.c,v retrieving revision 1.45 diff -d -p -u -u -r1.45 cs4280.c --- sys/dev/pci/cs4280.c 16 Nov 2006 01:33:08 -0000 1.45 +++ sys/dev/pci/cs4280.c 9 Jul 2007 22:42:44 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1 #define BA1WRITE4(sc, r, x) bus_space_write_4((sc)->ba1t, (sc)->ba1h, (r), (x)) /* IF functions for audio driver */ -static int cs4280_match(struct device *, struct cfdata *, void *); +static int cs4280_match(struct device *, cfdata_t, void *); static void cs4280_attach(struct device *, struct device *, void *); static int cs4280_intr(void *); static int cs4280_query_encoding(void *, struct audio_encoding *); @@ -218,7 +218,7 @@ static struct audio_device cs4280_device static int -cs4280_match(struct device *parent, struct cfdata *match, +cs4280_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/cs4281.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cs4281.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 cs4281.c --- sys/dev/pci/cs4281.c 16 Nov 2006 01:33:08 -0000 1.33 +++ sys/dev/pci/cs4281.c 9 Jul 2007 22:42:44 -0000 @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: cs4281.c,v 1 #endif /* IF functions for audio driver */ -static int cs4281_match(struct device *, struct cfdata *, void *); +static int cs4281_match(struct device *, cfdata_t, void *); static void cs4281_attach(struct device *, struct device *, void *); static int cs4281_intr(void *); static int cs4281_query_encoding(void *, struct audio_encoding *); @@ -167,7 +167,7 @@ static struct audio_device cs4281_device static int -cs4281_match(struct device *parent, struct cfdata *match, +cs4281_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/cy_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cy_pci.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 cy_pci.c --- sys/dev/pci/cy_pci.c 16 Nov 2006 01:33:08 -0000 1.21 +++ sys/dev/pci/cy_pci.c 9 Jul 2007 22:42:45 -0000 @@ -76,8 +76,7 @@ cy_pci_lookup(const struct pci_attach_ar } static int -cy_pci_match(struct device *parent, struct cfdata *match, - void *aux) +cy_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/cypide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cypide.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 cypide.c --- sys/dev/pci/cypide.c 9 Feb 2007 21:55:27 -0000 1.20 +++ sys/dev/pci/cypide.c 9 Jul 2007 22:42:45 -0000 @@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: cypide.c,v 1 static void cy693_chip_map(struct pciide_softc*, struct pci_attach_args*); static void cy693_setup_channel(struct ata_channel*); -static int cypide_match(struct device *, struct cfdata *, void *); +static int cypide_match(struct device *, cfdata_t, void *); static void cypide_attach(struct device *, struct device *, void *); CFATTACH_DECL(cypide, sizeof(struct pciide_softc), @@ -67,7 +67,7 @@ static const struct pciide_product_desc }; static int -cypide_match(struct device *parent, struct cfdata *match, +cypide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/cz.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/cz.c,v retrieving revision 1.44 diff -d -p -u -u -r1.44 cz.c --- sys/dev/pci/cz.c 8 May 2007 17:27:37 -0000 1.44 +++ sys/dev/pci/cz.c 9 Jul 2007 22:42:46 -0000 @@ -261,9 +261,7 @@ do { \ * Determine if the given PCI device is a Cyclades-Z board. */ static int -cz_match(struct device *parent, - struct cfdata *match, - void *aux) +cz_match(device_t parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/dpt_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/dpt_pci.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 dpt_pci.c --- sys/dev/pci/dpt_pci.c 16 Nov 2006 01:33:08 -0000 1.19 +++ sys/dev/pci/dpt_pci.c 9 Jul 2007 22:42:46 -0000 @@ -56,14 +56,14 @@ __KERNEL_RCSID(0, "$NetBSD: dpt_pci.c,v #define PCI_CBMA 0x14 /* Configuration base memory address */ #define PCI_CBIO 0x10 /* Configuration base I/O address */ -static int dpt_pci_match(struct device *, struct cfdata *, void *); +static int dpt_pci_match(struct device *, cfdata_t, void *); static void dpt_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(dpt_pci, sizeof(struct dpt_softc), dpt_pci_match, dpt_pci_attach, NULL, NULL); static int -dpt_pci_match(struct device *parent, struct cfdata *match, +dpt_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/eap.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/eap.c,v retrieving revision 1.89 diff -d -p -u -u -r1.89 eap.c --- sys/dev/pci/eap.c 4 Mar 2007 06:02:17 -0000 1.89 +++ sys/dev/pci/eap.c 9 Jul 2007 22:42:46 -0000 @@ -100,7 +100,7 @@ int eapdebug = 0; #define DPRINTFN(n,x) #endif -static int eap_match(struct device *, struct cfdata *, void *); +static int eap_match(struct device *, cfdata_t, void *); static void eap_attach(struct device *, struct device *, void *); static int eap_detach(struct device *, int); static int eap_intr(void *); @@ -329,7 +329,7 @@ static const struct audio_format eap_for }; static int -eap_match(struct device *parent, struct cfdata *match, +eap_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/ehci_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ehci_pci.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 ehci_pci.c --- sys/dev/pci/ehci_pci.c 9 Feb 2007 21:55:27 -0000 1.27 +++ sys/dev/pci/ehci_pci.c 9 Jul 2007 22:42:47 -0000 @@ -84,8 +84,7 @@ struct ehci_pci_softc { #define EHCI_MAX_BIOS_WAIT 1000 /* ms */ static int -ehci_pci_match(struct device *parent, struct cfdata *match, - void *aux) +ehci_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/emuxki.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/emuxki.c,v retrieving revision 1.50 diff -d -p -u -u -r1.50 emuxki.c --- sys/dev/pci/emuxki.c 4 Mar 2007 06:02:18 -0000 1.50 +++ sys/dev/pci/emuxki.c 9 Jul 2007 22:42:48 -0000 @@ -79,7 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1 #include /* autoconf goo */ -static int emuxki_match(struct device *, struct cfdata *, void *); +static int emuxki_match(struct device *, cfdata_t, void *); static void emuxki_attach(struct device *, struct device *, void *); static int emuxki_detach(struct device *, int); @@ -387,7 +387,7 @@ emuxki_ac97_init(struct emuxki_softc *sc } static int -emuxki_match(struct device *parent, struct cfdata *match, +emuxki_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/esa.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/esa.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 esa.c --- sys/dev/pci/esa.c 4 Mar 2007 06:02:18 -0000 1.41 +++ sys/dev/pci/esa.c 9 Jul 2007 22:42:48 -0000 @@ -99,7 +99,7 @@ static struct audio_device esa_device = "esa" }; -static int esa_match(struct device *, struct cfdata *, void *); +static int esa_match(struct device *, cfdata_t, void *); static void esa_attach(struct device *, struct device *, void *); static int esa_detach(struct device *, int); @@ -971,7 +971,7 @@ esa_freemem(struct esa_softc *sc, struct */ static int -esa_match(struct device *dev, struct cfdata *match, void *aux) +esa_match(struct device *dev, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/esiop_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/esiop_pci.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 esiop_pci.c --- sys/dev/pci/esiop_pci.c 16 Nov 2006 01:33:08 -0000 1.12 +++ sys/dev/pci/esiop_pci.c 9 Jul 2007 22:42:49 -0000 @@ -57,8 +57,7 @@ struct esiop_pci_softc { }; static int -esiop_pci_match(struct device *parent, struct cfdata *match, - void *aux) +esiop_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; const struct siop_product_desc *pp; Index: sys/dev/pci/esm.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/esm.c,v retrieving revision 1.42 diff -d -p -u -u -r1.42 esm.c --- sys/dev/pci/esm.c 4 Mar 2007 06:02:18 -0000 1.42 +++ sys/dev/pci/esm.c 9 Jul 2007 22:42:49 -0000 @@ -1534,7 +1534,7 @@ esm_allocmem(struct esm_softc *sc, size_ } int -esm_match(struct device *dev, struct cfdata *match, void *aux) +esm_match(struct device *dev, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/esmvar.h =================================================================== RCS file: /cvsroot/src/sys/dev/pci/esmvar.h,v retrieving revision 1.14 diff -d -p -u -u -r1.14 esmvar.h --- sys/dev/pci/esmvar.h 4 Mar 2007 06:02:18 -0000 1.14 +++ sys/dev/pci/esmvar.h 9 Jul 2007 22:42:49 -0000 @@ -228,7 +228,7 @@ size_t esm_round_buffersize(void *, int, paddr_t esm_mappage(void *, void *, off_t, int); int esm_get_props(void *); -int esm_match(struct device *, struct cfdata *, void *); +int esm_match(struct device *, cfdata_t, void *); void esm_attach(struct device *, struct device *, void *); int esm_intr(void *); Index: sys/dev/pci/eso.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/eso.c,v retrieving revision 1.50 diff -d -p -u -u -r1.50 eso.c --- sys/dev/pci/eso.c 4 Mar 2007 06:02:18 -0000 1.50 +++ sys/dev/pci/eso.c 9 Jul 2007 22:42:49 -0000 @@ -94,7 +94,7 @@ struct eso_dma { #define DMAADDR(dma) ((dma)->ed_map->dm_segs[0].ds_addr) /* Autoconfiguration interface */ -static int eso_match(struct device *, struct cfdata *, void *); +static int eso_match(struct device *, cfdata_t, void *); static void eso_attach(struct device *, struct device *, void *); static void eso_defer(struct device *); static int eso_print(void *, const char *); @@ -210,7 +210,7 @@ static struct eso_dma * eso_kva2dma(cons static int -eso_match(struct device *parent, struct cfdata *match, +eso_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/fms.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/fms.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 fms.c --- sys/dev/pci/fms.c 4 Mar 2007 06:02:18 -0000 1.29 +++ sys/dev/pci/fms.c 9 Jul 2007 22:42:51 -0000 @@ -80,7 +80,7 @@ struct fms_dma { -static int fms_match(struct device *, struct cfdata *, void *); +static int fms_match(struct device *, cfdata_t, void *); static void fms_attach(struct device *, struct device *, void *); static int fms_intr(void *); @@ -216,7 +216,7 @@ static int fms_reset_codec(void *); static int -fms_match(struct device *parent, struct cfdata *match, +fms_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/fwlynx_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/fwlynx_pci.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 fwlynx_pci.c --- sys/dev/pci/fwlynx_pci.c 11 Dec 2005 12:22:49 -0000 1.11 +++ sys/dev/pci/fwlynx_pci.c 9 Jul 2007 22:42:51 -0000 @@ -60,14 +60,14 @@ struct fwlynx_pci_softc { void *psc_ih; }; -static int fwlynx_pci_match(struct device *, struct cfdata *, void *); +static int fwlynx_pci_match(struct device *, cfdata_t, void *); static void fwlynx_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(fwlynx_pci, sizeof(struct fwlynx_pci_softc), fwlynx_pci_match, fwlynx_pci_attach, NULL, NULL); static int -fwlynx_pci_match(struct device *parent, struct cfdata *match, void *aux) +fwlynx_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/fwohci_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/fwohci_pci.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 fwohci_pci.c --- sys/dev/pci/fwohci_pci.c 16 Nov 2006 01:33:08 -0000 1.25 +++ sys/dev/pci/fwohci_pci.c 9 Jul 2007 22:42:51 -0000 @@ -63,14 +63,14 @@ struct fwohci_pci_softc { void *psc_ih; }; -static int fwohci_pci_match(struct device *, struct cfdata *, void *); +static int fwohci_pci_match(struct device *, cfdata_t, void *); static void fwohci_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(fwohci_pci, sizeof(struct fwohci_pci_softc), fwohci_pci_match, fwohci_pci_attach, NULL, NULL); static int -fwohci_pci_match(struct device *parent, struct cfdata *match, +fwohci_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/genfb_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/genfb_pci.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 genfb_pci.c --- sys/dev/pci/genfb_pci.c 10 Apr 2007 02:16:48 -0000 1.1 +++ sys/dev/pci/genfb_pci.c 9 Jul 2007 22:42:51 -0000 @@ -71,7 +71,7 @@ struct pci_genfb_softc { int sc_ranges_used; }; -static int pci_genfb_match(struct device *, struct cfdata *, void *); +static int pci_genfb_match(struct device *, cfdata_t, void *); static void pci_genfb_attach(struct device *, struct device *, void *); static int pci_genfb_ioctl(void *, void *, u_long, void *, int, struct lwp *); @@ -81,7 +81,7 @@ CFATTACH_DECL(genfb_pci, sizeof(struct p pci_genfb_match, pci_genfb_attach, NULL, NULL); static int -pci_genfb_match(struct device *parent, struct cfdata *match, void *aux) +pci_genfb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/geodeide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/geodeide.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 geodeide.c --- sys/dev/pci/geodeide.c 9 Feb 2007 21:55:27 -0000 1.14 +++ sys/dev/pci/geodeide.c 9 Jul 2007 22:42:51 -0000 @@ -56,7 +56,7 @@ static void geodeide_chip_map(struct pci static void geodeide_setup_channel(struct ata_channel *); static int geodeide_dma_init(void *, int, int, void *, size_t, int); -static int geodeide_match(struct device *, struct cfdata *, void *); +static int geodeide_match(struct device *, cfdata_t, void *); static void geodeide_attach(struct device *, struct device *, void *); CFATTACH_DECL(geodeide, sizeof(struct pciide_softc), @@ -81,7 +81,7 @@ static const struct pciide_product_desc }; static int -geodeide_match(struct device *parent, struct cfdata *match, +geodeide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/gtp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/gtp.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 gtp.c --- sys/dev/pci/gtp.c 16 Nov 2006 01:33:08 -0000 1.13 +++ sys/dev/pci/gtp.c 9 Jul 2007 22:42:51 -0000 @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: gtp.c,v 1.13 #define PCI_CBIO 0x10 -static int gtp_match(struct device *, struct cfdata *, void *); +static int gtp_match(struct device *, cfdata_t, void *); static void gtp_attach(struct device *, struct device *, void *); static int gtp_get_info(void *, struct radio_info *); @@ -119,7 +119,7 @@ static uint32_t gtp_hardware_read(bus_sp bus_size_t); static int -gtp_match(struct device *parent, struct cfdata *cf, void *aux) +gtp_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; /* FIXME: @@ -143,7 +143,7 @@ gtp_attach(struct device *parent, struct { struct gtp_softc *sc = (struct gtp_softc *) self; struct pci_attach_args *pa = aux; - struct cfdata *cf = device_cfdata(&sc->sc_dev); + cfdata_tcf = device_cfdata(&sc->sc_dev); pci_chipset_tag_t pc = pa->pa_pc; bus_size_t iosize; pcireg_t csr; Index: sys/dev/pci/hifn7751.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/hifn7751.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 hifn7751.c --- sys/dev/pci/hifn7751.c 4 Mar 2007 06:02:18 -0000 1.34 +++ sys/dev/pci/hifn7751.c 9 Jul 2007 22:42:51 -0000 @@ -105,7 +105,7 @@ int hifn_debug = 1; #ifdef __OpenBSD__ static int hifn_probe((struct device *, void *, void *); #else -static int hifn_probe(struct device *, struct cfdata *, void *); +static int hifn_probe(struct device *, cfdata_t, void *); #endif static void hifn_attach(struct device *, struct device *, void *); @@ -227,7 +227,7 @@ hifn_lookup(const struct pci_attach_args } static int -hifn_probe(struct device *parent, struct cfdata *match, +hifn_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/hptide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/hptide.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 hptide.c --- sys/dev/pci/hptide.c 9 Feb 2007 21:55:27 -0000 1.24 +++ sys/dev/pci/hptide.c 9 Jul 2007 22:42:52 -0000 @@ -45,7 +45,7 @@ static void hpt_chip_map(struct pciide_s static void hpt_setup_channel(struct ata_channel*); static int hpt_pci_intr(void *); -static int hptide_match(struct device *, struct cfdata *, void *); +static int hptide_match(struct device *, cfdata_t, void *); static void hptide_attach(struct device *, struct device *, void *); CFATTACH_DECL(hptide, sizeof(struct pciide_softc), @@ -85,7 +85,7 @@ static const struct pciide_product_desc }; static int -hptide_match(struct device *parent, struct cfdata *match, +hptide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/i82365_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/i82365_pci.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 i82365_pci.c --- sys/dev/pci/i82365_pci.c 16 Nov 2006 01:33:08 -0000 1.24 +++ sys/dev/pci/i82365_pci.c 9 Jul 2007 22:42:52 -0000 @@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: i82365_pci.c */ #define PCI_CBIO 0x10 /* Configuration Base IO Address */ -int pcic_pci_match(struct device *, struct cfdata *, void *); +int pcic_pci_match(struct device *, cfdata_t, void *); void pcic_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcic_pci, sizeof(struct pcic_pci_softc), @@ -88,8 +88,7 @@ static struct pcmcia_chip_functions pcic static void pcic_pci_callback(struct device *); int -pcic_pci_match(struct device *parent, struct cfdata *match, - void *aux) +pcic_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/iavc_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/iavc_pci.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 iavc_pci.c --- sys/dev/pci/iavc_pci.c 16 Nov 2006 01:33:08 -0000 1.6 +++ sys/dev/pci/iavc_pci.c 9 Jul 2007 22:42:52 -0000 @@ -75,7 +75,7 @@ struct iavc_pci_softc { static const struct iavc_pci_product *find_cardname(struct pci_attach_args *); -static int iavc_pci_probe(struct device *, struct cfdata *, void *); +static int iavc_pci_probe(struct device *, cfdata_t, void *); static void iavc_pci_attach(struct device *, struct device *, void *); int iavc_pci_intr(void *); @@ -109,7 +109,7 @@ find_cardname(struct pci_attach_args * p static int iavc_pci_probe(struct device * parent, - struct cfdata * match, void *aux) + cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/icp_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/icp_pci.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 icp_pci.c --- sys/dev/pci/icp_pci.c 16 Nov 2006 01:33:08 -0000 1.13 +++ sys/dev/pci/icp_pci.c 9 Jul 2007 22:42:53 -0000 @@ -164,7 +164,7 @@ __KERNEL_RCSID(0, "$NetBSD: icp_pci.c,v /* SRAM structure */ #define ICP_MPR_SZ 0x4000 -int icp_pci_match(struct device *, struct cfdata *, void *); +int icp_pci_match(struct device *, cfdata_t, void *); void icp_pci_attach(struct device *, struct device *, void *); void icp_pci_enable_intr(struct icp_softc *); int icp_pci_find_class(struct pci_attach_args *); @@ -229,7 +229,7 @@ icp_pci_find_class(struct pci_attach_arg } int -icp_pci_match(struct device *parent, struct cfdata *match, +icp_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/if_an_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_an_pci.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_an_pci.c --- sys/dev/pci/if_an_pci.c 6 Apr 2007 18:16:29 -0000 1.22 +++ sys/dev/pci/if_an_pci.c 9 Jul 2007 22:42:53 -0000 @@ -86,7 +86,7 @@ struct an_pci_softc { void *sc_ih; /* interrupt handle */ }; -static int an_pci_match(struct device *, struct cfdata *, void *); +static int an_pci_match(struct device *, cfdata_t, void *); static void an_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(an_pci, sizeof(struct an_pci_softc), @@ -104,7 +104,7 @@ static const struct an_pci_product { }; static int -an_pci_match(struct device *parent, struct cfdata *match, +an_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_ath_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ath_pci.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_ath_pci.c --- sys/dev/pci/if_ath_pci.c 17 Apr 2007 21:50:31 -0000 1.21 +++ sys/dev/pci/if_ath_pci.c 9 Jul 2007 22:42:53 -0000 @@ -97,7 +97,7 @@ struct ath_pci_softc { static void ath_pci_attach(struct device *, struct device *, void *); static int ath_pci_detach(struct device *, int); -static int ath_pci_match(struct device *, struct cfdata *, void *); +static int ath_pci_match(struct device *, cfdata_t, void *); static void ath_pci_shutdown(void *); static void ath_pci_powerhook(int, void *); static int ath_pci_detach(struct device *, int); @@ -112,7 +112,7 @@ CFATTACH_DECL(ath_pci, static int ath_pci_setup(struct pci_attach_args *); static int -ath_pci_match(struct device *parent, struct cfdata *match, void *aux) +ath_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { const char* devname; struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_atw_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_atw_pci.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 if_atw_pci.c --- sys/dev/pci/if_atw_pci.c 16 Nov 2006 01:33:08 -0000 1.14 +++ sys/dev/pci/if_atw_pci.c 9 Jul 2007 22:42:53 -0000 @@ -95,7 +95,7 @@ struct atw_pci_softc { pcitag_t psc_pcitag; /* our PCI tag */ }; -static int atw_pci_match(struct device *, struct cfdata *, void *); +static int atw_pci_match(struct device *, cfdata_t, void *); static void atw_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(atw_pci, sizeof(struct atw_pci_softc), @@ -128,7 +128,7 @@ atw_pci_lookup(const struct pci_attach_a } static int -atw_pci_match(struct device *parent, struct cfdata *match, +atw_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_bce.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_bce.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_bce.c --- sys/dev/pci/if_bce.c 21 Mar 2007 04:56:39 -0000 1.15 +++ sys/dev/pci/if_bce.c 9 Jul 2007 22:42:53 -0000 @@ -165,7 +165,7 @@ do { \ BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \ } while (/* CONSTCOND */ 0) -static int bce_probe(struct device *, struct cfdata *, void *); +static int bce_probe(struct device *, cfdata_t, void *); static void bce_attach(struct device *, struct device *, void *); static int bce_ioctl(struct ifnet *, u_long, void *); static void bce_start(struct ifnet *); @@ -263,7 +263,7 @@ bce_lookup(const struct pci_attach_args * against drivers product list, and return its name if a match is found. */ static int -bce_probe(struct device *parent, struct cfdata *match, +bce_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_bge.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_bge.c,v retrieving revision 1.130 diff -d -p -u -u -r1.130 if_bge.c --- sys/dev/pci/if_bge.c 21 May 2007 15:36:26 -0000 1.130 +++ sys/dev/pci/if_bge.c 9 Jul 2007 22:42:54 -0000 @@ -2327,7 +2327,7 @@ bge_setpowerstate(struct bge_softc *sc, * we'll always announce the right product name. */ static int -bge_probe(device_t parent, cfdata_t match, void *aux) +bge_probe(device_t parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/if_bnx.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_bnx.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 if_bnx.c --- sys/dev/pci/if_bnx.c 10 Apr 2007 12:18:26 -0000 1.6 +++ sys/dev/pci/if_bnx.c 9 Jul 2007 22:42:57 -0000 @@ -385,7 +385,7 @@ bnx_lookup(const struct pci_attach_args return NULL; } static int -bnx_probe(device_t parent, cfdata_t match, void *aux) +bnx_probe(device_t parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/if_de.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_de.c,v retrieving revision 1.123 diff -d -p -u -u -r1.123 if_de.c --- sys/dev/pci/if_de.c 4 Mar 2007 06:02:19 -0000 1.123 +++ sys/dev/pci/if_de.c 9 Jul 2007 22:43:00 -0000 @@ -5436,7 +5436,7 @@ tulip_pci_match( static int tulip_probe( struct device *parent, - struct cfdata *cf, + cfdata_t cf, void *aux) { struct isa_attach_args * const ia = (struct isa_attach_args *) aux; @@ -5558,7 +5558,7 @@ struct cfdriver decd = { static int tulip_pci_probe( struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_dge.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_dge.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_dge.c --- sys/dev/pci/if_dge.c 4 Mar 2007 06:02:20 -0000 1.15 +++ sys/dev/pci/if_dge.c 9 Jul 2007 22:43:01 -0000 @@ -631,7 +631,7 @@ static void dge_txintr(struct dge_softc static void dge_rxintr(struct dge_softc *); static void dge_linkintr(struct dge_softc *, uint32_t); -static int dge_match(struct device *, struct cfdata *, void *); +static int dge_match(struct device *, cfdata_t, void *); static void dge_attach(struct device *, struct device *, void *); static int dge_read_eeprom(struct dge_softc *sc); @@ -655,7 +655,7 @@ static char (*dge_txseg_evcnt_names)[DGE #endif /* DGE_EVENT_COUNTERS */ static int -dge_match(struct device *parent, struct cfdata *cf, void *aux) +dge_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_en_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_en_pci.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 if_en_pci.c --- sys/dev/pci/if_en_pci.c 16 Nov 2006 01:33:08 -0000 1.26 +++ sys/dev/pci/if_en_pci.c 9 Jul 2007 22:43:01 -0000 @@ -119,7 +119,7 @@ static void adp_get_macaddr(struct en_p * prototypes */ -static int en_pci_match(struct device *, struct cfdata *, void *); +static int en_pci_match(struct device *, cfdata_t, void *); static void en_pci_attach(struct device *, struct device *, void *); /* @@ -165,7 +165,7 @@ void *v; */ static int -en_pci_match(struct device *parent, struct cfdata *match, +en_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_ep_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ep_pci.c,v retrieving revision 1.45 diff -d -p -u -u -r1.45 if_ep_pci.c --- sys/dev/pci/if_ep_pci.c 16 Nov 2006 01:33:08 -0000 1.45 +++ sys/dev/pci/if_ep_pci.c 9 Jul 2007 22:43:02 -0000 @@ -104,7 +104,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_pci.c, */ #define PCI_CBIO 0x10 /* Configuration Base IO Address */ -static int ep_pci_match(struct device *, struct cfdata *, void *); +static int ep_pci_match(struct device *, cfdata_t, void *); static void ep_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(ep_pci, sizeof(struct ep_softc), @@ -169,7 +169,7 @@ ep_pci_lookup(const struct pci_attach_ar } static int -ep_pci_match(struct device *parent, struct cfdata *match, +ep_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_epic_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_epic_pci.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 if_epic_pci.c --- sys/dev/pci/if_epic_pci.c 16 Nov 2006 01:33:08 -0000 1.32 +++ sys/dev/pci/if_epic_pci.c 9 Jul 2007 22:43:02 -0000 @@ -85,7 +85,7 @@ struct epic_pci_softc { void *sc_ih; /* interrupt handle */ }; -static int epic_pci_match(struct device *, struct cfdata *, void *); +static int epic_pci_match(struct device *, cfdata_t, void *); static void epic_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(epic_pci, sizeof(struct epic_pci_softc), @@ -146,7 +146,7 @@ epic_pci_subsys_lookup(const struct pci_ } static int -epic_pci_match(struct device *parent, struct cfdata *match, +epic_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_esh_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_esh_pci.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_esh_pci.c --- sys/dev/pci/if_esh_pci.c 16 Nov 2006 01:33:08 -0000 1.21 +++ sys/dev/pci/if_esh_pci.c 9 Jul 2007 22:43:02 -0000 @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_esh_pci.c #define MEM_MAP_REG 0x10 -static int esh_pci_match(struct device *, struct cfdata *, void *); +static int esh_pci_match(struct device *, cfdata_t, void *); static void esh_pci_attach(struct device *, struct device *, void *); static u_int8_t esh_pci_bist_read(struct esh_softc *); static void esh_pci_bist_write(struct esh_softc *, u_int8_t); @@ -90,7 +90,7 @@ CFATTACH_DECL(esh_pci, sizeof(struct esh esh_pci_match, esh_pci_attach, NULL, NULL); static int -esh_pci_match(struct device *parent, struct cfdata *match, +esh_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_ex_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ex_pci.c,v retrieving revision 1.43 diff -d -p -u -u -r1.43 if_ex_pci.c --- sys/dev/pci/if_ex_pci.c 16 Nov 2006 01:33:08 -0000 1.43 +++ sys/dev/pci/if_ex_pci.c 9 Jul 2007 22:43:02 -0000 @@ -98,7 +98,7 @@ struct ex_pci_softc { #define PCI_INTR 4 #define PCI_INTRACK 0x00008000 -static int ex_pci_match(struct device *, struct cfdata *, void *); +static int ex_pci_match(struct device *, cfdata_t, void *); static void ex_pci_attach(struct device *, struct device *, void *); static void ex_pci_intr_ack(struct ex_softc *); @@ -199,7 +199,7 @@ ex_pci_lookup(const struct pci_attach_ar } static int -ex_pci_match(struct device *parent, struct cfdata *match, +ex_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_fpa.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_fpa.c,v retrieving revision 1.48 diff -d -p -u -u -r1.48 if_fpa.c --- sys/dev/pci/if_fpa.c 4 Mar 2007 06:02:20 -0000 1.48 +++ sys/dev/pci/if_fpa.c 9 Jul 2007 22:43:02 -0000 @@ -291,7 +291,7 @@ pdq_pci_match( int pdq_pci_probe( struct device *parent, - struct cfdata *cf, + cfdata_t cf, void *aux) { struct isa_attach_args *ia = (struct isa_attach_args *) aux; @@ -393,7 +393,7 @@ struct cfdriver fpacd = { static int pdq_pci_match( struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_fxp_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_fxp_pci.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 if_fxp_pci.c --- sys/dev/pci/if_fxp_pci.c 26 Nov 2006 01:15:39 -0000 1.52 +++ sys/dev/pci/if_fxp_pci.c 9 Jul 2007 22:43:02 -0000 @@ -93,7 +93,7 @@ struct fxp_pci_softc { struct pci_conf_state psc_pciconf; /* standard PCI configuration regs */ }; -static int fxp_pci_match(struct device *, struct cfdata *, void *); +static int fxp_pci_match(struct device *, cfdata_t, void *); static void fxp_pci_attach(struct device *, struct device *, void *); static int fxp_pci_enable(struct fxp_softc *); @@ -181,7 +181,7 @@ fxp_pci_lookup(const struct pci_attach_a } static int -fxp_pci_match(struct device *parent, struct cfdata *match, +fxp_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_gem_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_gem_pci.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_gem_pci.c --- sys/dev/pci/if_gem_pci.c 24 Nov 2006 13:01:07 -0000 1.22 +++ sys/dev/pci/if_gem_pci.c 9 Jul 2007 22:43:02 -0000 @@ -84,7 +84,7 @@ struct gem_pci_softc { void *gsc_ih; }; -int gem_match_pci(struct device *, struct cfdata *, void *); +int gem_match_pci(struct device *, cfdata_t, void *); void gem_attach_pci(struct device *, struct device *, void *); CFATTACH_DECL(gem_pci, sizeof(struct gem_pci_softc), Index: sys/dev/pci/if_hme_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_hme_pci.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_hme_pci.c --- sys/dev/pci/if_hme_pci.c 16 Nov 2006 01:33:08 -0000 1.22 +++ sys/dev/pci/if_hme_pci.c 9 Jul 2007 22:43:02 -0000 @@ -76,14 +76,14 @@ struct hme_pci_softc { void *hsc_ih; }; -int hmematch_pci(struct device *, struct cfdata *, void *); +int hmematch_pci(struct device *, cfdata_t, void *); void hmeattach_pci(struct device *, struct device *, void *); CFATTACH_DECL(hme_pci, sizeof(struct hme_pci_softc), hmematch_pci, hmeattach_pci, NULL, NULL); int -hmematch_pci(struct device *parent, struct cfdata *cf, +hmematch_pci(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_ipw.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ipw.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 if_ipw.c --- sys/dev/pci/if_ipw.c 4 Mar 2007 06:02:20 -0000 1.32 +++ sys/dev/pci/if_ipw.c 9 Jul 2007 22:43:03 -0000 @@ -90,7 +90,7 @@ int ipw_debug = 0; static int ipw_dma_alloc(struct ipw_softc *); static void ipw_release(struct ipw_softc *); -static int ipw_match(struct device *, struct cfdata *, void *); +static int ipw_match(struct device *, cfdata_t, void *); static void ipw_attach(struct device *, struct device *, void *); static int ipw_detach(struct device *, int); @@ -160,7 +160,7 @@ CFATTACH_DECL(ipw, sizeof (struct ipw_so ipw_detach, NULL); static int -ipw_match(struct device *parent, struct cfdata *match, +ipw_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_iwi.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_iwi.c,v retrieving revision 1.62 diff -d -p -u -u -r1.62 if_iwi.c --- sys/dev/pci/if_iwi.c 4 Mar 2007 19:14:25 -0000 1.62 +++ sys/dev/pci/if_iwi.c 9 Jul 2007 22:43:03 -0000 @@ -90,7 +90,7 @@ int iwi_debug = 4; #define DPRINTFN(n, x) #endif -static int iwi_match(struct device *, struct cfdata *, void *); +static int iwi_match(struct device *, cfdata_t, void *); static void iwi_attach(struct device *, struct device *, void *); static int iwi_detach(struct device *, int); @@ -190,7 +190,7 @@ CFATTACH_DECL(iwi, sizeof (struct iwi_so iwi_detach, NULL); static int -iwi_match(struct device *parent, struct cfdata *match, +iwi_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_kse.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_kse.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 if_kse.c --- sys/dev/pci/if_kse.c 4 Mar 2007 06:02:20 -0000 1.3 +++ sys/dev/pci/if_kse.c 9 Jul 2007 22:43:04 -0000 @@ -277,7 +277,7 @@ u_int kse_burstsize = 16; /* DMA burst l u_int kse_monitor_rxintr; /* fragmented UDP csum HW bug hook */ #endif -static int kse_match(struct device *, struct cfdata *, void *); +static int kse_match(struct device *, cfdata_t, void *); static void kse_attach(struct device *, struct device *, void *); CFATTACH_DECL(kse, sizeof(struct kse_softc), @@ -301,7 +301,7 @@ static void ifmedia_sts(struct ifnet *, static void phy_tick(void *); static int -kse_match(struct device *parent, struct cfdata *match, void *aux) +kse_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/if_le_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_le_pci.c,v retrieving revision 1.46 diff -d -p -u -u -r1.46 if_le_pci.c --- sys/dev/pci/if_le_pci.c 4 Mar 2007 06:02:20 -0000 1.46 +++ sys/dev/pci/if_le_pci.c 9 Jul 2007 22:43:04 -0000 @@ -102,7 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_pci.c, #include -static int le_pci_match(struct device *, struct cfdata *, void *); +static int le_pci_match(struct device *, cfdata_t, void *); static void le_pci_attach(struct device *, struct device *, void *); static int le_pci_mediachange(struct lance_softc *); @@ -213,7 +213,7 @@ le_pci_mediachange(struct lance_softc *s } static int -le_pci_match(struct device *parent, struct cfdata *match, +le_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_lmc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_lmc.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 if_lmc.c --- sys/dev/pci/if_lmc.c 4 Mar 2007 06:02:20 -0000 1.34 +++ sys/dev/pci/if_lmc.c 9 Jul 2007 22:43:06 -0000 @@ -7062,7 +7062,7 @@ MODULE_DEPEND(if_lmc, sppp, 1, 1, 1); /* Looking for a DEC 21140A chip on any Lan Media Corp card. */ /* context: kernel (boot) or process (syscall) */ static int -nbsd_match(struct device *parent, struct cfdata *match, +nbsd_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; @@ -7196,7 +7196,7 @@ nbsd_detach(struct device *self, int fla CFATTACH_DECL(lmc, sizeof(softc_t), /* lmc_ca */ nbsd_match, nbsd_attach, nbsd_detach, NULL); -# if defined(LKM) +# if defined(_LKM) static struct cfattach *cfattach[] = { &lmc_ca, NULL }; static const struct cfattachlkminit cfattachs[] = @@ -7205,11 +7205,10 @@ static const struct cfattachlkminit cfat static CFDRIVER_DECL(lmc, DV_IFNET, NULL); /* lmc_cd */ static struct cfdriver *cfdrivers[] = { &lmc_cd, NULL }; -static int pci_locators[] = { -1, 0 }; /* device, function */ static const struct cfparent pci_parent = { "pci", "pci", DVUNIT_ANY }; static struct cfdata cfdatas[] = { { DEVICE_NAME, DEVICE_NAME, 0, FSTATE_STAR, - pci_locators, 0, &pci_parent }, + "{ }", 0, &pci_parent }, { NULL, NULL, 0, 0, NULL, 0, NULL } }; MOD_DRV("if_"DEVICE_NAME, cfdrivers, cfattachs, cfdatas); @@ -7217,7 +7216,7 @@ MOD_DRV("if_"DEVICE_NAME, cfdrivers, cfa int if_lmc_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) { LKM_DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc); } -# endif /* LKM */ +# endif /* _LKM */ #endif /* __NetBSD__ */ @@ -7504,7 +7503,7 @@ bsdi_match(pci_devaddr_t *pa) } static int /* context: kernel (boot) */ -bsdi_probe(struct device *parent, struct cfdata *cf, void *aux) +bsdi_probe(struct device *parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; pci_devaddr_t *pa = NULL; Index: sys/dev/pci/if_lmc.h =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_lmc.h,v retrieving revision 1.9 diff -d -p -u -u -r1.9 if_lmc.h --- sys/dev/pci/if_lmc.h 4 Mar 2007 06:02:21 -0000 1.9 +++ sys/dev/pci/if_lmc.h 9 Jul 2007 22:43:07 -0000 @@ -1674,7 +1674,7 @@ static void fbsd_dmamap_load(void *, bus #endif /* __FreeBSD__ */ #if defined(__NetBSD__) -static int nbsd_match(struct device *, struct cfdata *, void *); +static int nbsd_match(struct device *, cfdata_t, void *); static void nbsd_attach(struct device *, struct device *, void *); static int nbsd_detach(struct device *, int); # if defined(LKM) @@ -1693,7 +1693,7 @@ int if_lmc_lkmentry(struct lkm_table *, #if defined(__bsdi__) static int bsdi_match(pci_devaddr_t *); -static int bsdi_probe(struct device *, struct cfdata *, void *); +static int bsdi_probe(struct device *, cfdata_t, void *); static void bsdi_attach(struct device *, struct device *, void *); #endif /* __bsdi__ */ Index: sys/dev/pci/if_msk.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_msk.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 if_msk.c --- sys/dev/pci/if_msk.c 4 Mar 2007 06:02:21 -0000 1.8 +++ sys/dev/pci/if_msk.c 9 Jul 2007 22:43:07 -0000 @@ -95,10 +95,10 @@ #include #include -int mskc_probe(struct device *, struct cfdata *, void *); +int mskc_probe(struct device *, cfdata_t, void *); void mskc_attach(struct device *, struct device *self, void *aux); void mskc_shutdown(void *); -int msk_probe(struct device *, struct cfdata *, void *); +int msk_probe(struct device *, cfdata_t, void *); void msk_attach(struct device *, struct device *self, void *aux); int mskcprint(void *, const char *); int msk_intr(void *); @@ -814,7 +814,7 @@ msk_lookup(const struct pci_attach_args * IDs against our list and return a device name if we find a match. */ int -mskc_probe(struct device *parent, struct cfdata *match, +mskc_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -960,7 +960,7 @@ void msk_reset(struct sk_softc *sc) } int -msk_probe(struct device *parent, struct cfdata *match, +msk_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct skc_attach_args *sa = aux; Index: sys/dev/pci/if_mtd_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_mtd_pci.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 if_mtd_pci.c --- sys/dev/pci/if_mtd_pci.c 16 Nov 2006 01:33:09 -0000 1.9 +++ sys/dev/pci/if_mtd_pci.c 9 Jul 2007 22:43:07 -0000 @@ -74,14 +74,14 @@ static struct mtd_pci_device_id mtd_ids[ { 0, 0 } }; -static int mtd_pci_match(struct device *, struct cfdata *, void *); +static int mtd_pci_match(struct device *, cfdata_t, void *); static void mtd_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(mtd_pci, sizeof(struct mtd_softc), mtd_pci_match, mtd_pci_attach, NULL, NULL); static int -mtd_pci_match(struct device *parent, struct cfdata *match, +mtd_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_ne_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ne_pci.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 if_ne_pci.c --- sys/dev/pci/if_ne_pci.c 16 Nov 2006 01:33:09 -0000 1.29 +++ sys/dev/pci/if_ne_pci.c 9 Jul 2007 22:43:08 -0000 @@ -80,7 +80,7 @@ struct ne_pci_softc { void *sc_ih; /* interrupt handle */ }; -static int ne_pci_match(struct device *, struct cfdata *, void *); +static int ne_pci_match(struct device *, cfdata_t, void *); static void ne_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(ne_pci, sizeof(struct ne_pci_softc), @@ -179,7 +179,7 @@ ne_pci_lookup(const struct pci_attach_ar #define PCI_CBIO 0x10 /* Configuration Base IO Address */ static int -ne_pci_match(struct device *parent, struct cfdata *match, +ne_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_nfe.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_nfe.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 if_nfe.c --- sys/dev/pci/if_nfe.c 4 Mar 2007 06:02:22 -0000 1.15 +++ sys/dev/pci/if_nfe.c 9 Jul 2007 22:43:08 -0000 @@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1 #include #include -int nfe_match(struct device *, struct cfdata *, void *); +int nfe_match(struct device *, cfdata_t, void *); void nfe_attach(struct device *, struct device *, void *); void nfe_power(int, void *); void nfe_miibus_statchg(struct device *); @@ -177,7 +177,7 @@ const struct nfe_product { }; int -nfe_match(struct device *dev, struct cfdata *match, void *aux) +nfe_match(struct device *dev, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; const struct nfe_product *np; Index: sys/dev/pci/if_ntwoc_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ntwoc_pci.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 if_ntwoc_pci.c --- sys/dev/pci/if_ntwoc_pci.c 16 Nov 2006 01:33:09 -0000 1.19 +++ sys/dev/pci/if_ntwoc_pci.c 9 Jul 2007 22:43:09 -0000 @@ -113,7 +113,7 @@ struct ntwoc_pci_softc { struct sca_softc sc_sca; /* the SCA itself */ }; -static int ntwoc_pci_match(struct device *, struct cfdata *, void *); +static int ntwoc_pci_match(struct device *, cfdata_t, void *); static void ntwoc_pci_attach(struct device *, struct device *, void *); static int ntwoc_pci_alloc_dma(struct sca_softc *); @@ -175,7 +175,7 @@ ntwoc_pci_sca_read_2(struct sca_softc *s static int -ntwoc_pci_match(struct device *parent, struct cfdata *match, +ntwoc_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -203,7 +203,7 @@ ntwoc_pci_attach(struct device *parent, u_int numports; printf(": N2 Serial Interface\n"); - flags = device_cfdata(&sc->sc_dev)->cf_flags; + flags = cfdata_flags(device_cfdata(&sc->sc_dev)); /* * Map in the ASIC configuration space Index: sys/dev/pci/if_pcn.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_pcn.c,v retrieving revision 1.38 diff -d -p -u -u -r1.38 if_pcn.c --- sys/dev/pci/if_pcn.c 4 Mar 2007 06:02:22 -0000 1.38 +++ sys/dev/pci/if_pcn.c 9 Jul 2007 22:43:09 -0000 @@ -465,7 +465,7 @@ static const struct pcn_variant { int pcn_copy_small = 0; -static int pcn_match(struct device *, struct cfdata *, void *); +static int pcn_match(struct device *, cfdata_t, void *); static void pcn_attach(struct device *, struct device *, void *); CFATTACH_DECL(pcn, sizeof(struct pcn_softc), @@ -546,7 +546,7 @@ pcn_lookup_variant(uint16_t chipid) } static int -pcn_match(struct device *parent, struct cfdata *cf, void *aux) +pcn_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_ral_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ral_pci.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 if_ral_pci.c --- sys/dev/pci/if_ral_pci.c 16 Nov 2006 01:33:09 -0000 1.6 +++ sys/dev/pci/if_ral_pci.c 9 Jul 2007 22:43:09 -0000 @@ -89,7 +89,7 @@ struct ral_pci_softc { /* Base Address Register */ #define RAL_PCI_BAR0 0x10 -int ral_pci_match(struct device *, struct cfdata *, void *); +int ral_pci_match(struct device *, cfdata_t, void *); void ral_pci_attach(struct device *, struct device *, void *); int ral_pci_detach(struct device *, int); @@ -97,7 +97,7 @@ CFATTACH_DECL(ral_pci, sizeof (struct ra ral_pci_match, ral_pci_attach, ral_pci_detach, NULL); int -ral_pci_match(struct device *parent, struct cfdata *cfdata, +ral_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_re_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_re_pci.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 if_re_pci.c --- sys/dev/pci/if_re_pci.c 21 Mar 2007 12:17:31 -0000 1.27 +++ sys/dev/pci/if_re_pci.c 9 Jul 2007 22:43:09 -0000 @@ -88,7 +88,7 @@ struct re_pci_softc { pcitag_t sc_pcitag; }; -static int re_pci_match(struct device *, struct cfdata *, void *); +static int re_pci_match(struct device *, cfdata_t, void *); static void re_pci_attach(struct device *, struct device *, void *); /* @@ -135,7 +135,7 @@ CFATTACH_DECL(re_pci, sizeof(struct re_p * IDs against our list and return a device name if we find a match. */ static int -re_pci_match(struct device *parent, struct cfdata *match, void *aux) +re_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { const struct rtk_type *t; struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_rtk_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_rtk_pci.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 if_rtk_pci.c --- sys/dev/pci/if_rtk_pci.c 21 Mar 2007 12:17:32 -0000 1.32 +++ sys/dev/pci/if_rtk_pci.c 9 Jul 2007 22:43:09 -0000 @@ -109,7 +109,7 @@ static const struct rtk_type rtk_pci_dev { 0, 0, 0, NULL } }; -static int rtk_pci_match(struct device *, struct cfdata *, void *); +static int rtk_pci_match(struct device *, cfdata_t, void *); static void rtk_pci_attach(struct device *, struct device *, void *); static void rtk_pci_powerhook(int, void *); @@ -131,7 +131,7 @@ rtk_pci_lookup(const struct pci_attach_a } static int -rtk_pci_match(struct device *parent, struct cfdata *match, +rtk_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_rtw_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_rtw_pci.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 if_rtw_pci.c --- sys/dev/pci/if_rtw_pci.c 1 Sep 2006 03:24:58 -0000 1.7 +++ sys/dev/pci/if_rtw_pci.c 9 Jul 2007 22:43:09 -0000 @@ -96,7 +96,7 @@ struct rtw_pci_softc { pcitag_t psc_pcitag; /* our PCI tag */ }; -static int rtw_pci_match(struct device *, struct cfdata *, void *); +static int rtw_pci_match(struct device *, cfdata_t, void *); static void rtw_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(rtw_pci, sizeof(struct rtw_pci_softc), @@ -131,7 +131,7 @@ rtw_pci_lookup(const struct pci_attach_a } static int -rtw_pci_match(struct device *parent, struct cfdata *match, void *aux) +rtw_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_sf_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_sf_pci.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 if_sf_pci.c --- sys/dev/pci/if_sf_pci.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/if_sf_pci.c 9 Jul 2007 22:43:10 -0000 @@ -78,7 +78,7 @@ struct sf_pci_softc { void *sc_ih; /* interrupt handle */ }; -static int sf_pci_match(struct device *, struct cfdata *, void *); +static int sf_pci_match(struct device *, cfdata_t, void *); static void sf_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(sf_pci, sizeof(struct sf_pci_softc), @@ -160,7 +160,7 @@ sf_pci_lookup(const struct pci_attach_ar } static int -sf_pci_match(struct device *parent, struct cfdata *match, +sf_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_sip.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_sip.c,v retrieving revision 1.112 diff -d -p -u -u -r1.112 if_sip.c --- sys/dev/pci/if_sip.c 4 Mar 2007 15:05:24 -0000 1.112 +++ sys/dev/pci/if_sip.c 9 Jul 2007 22:43:10 -0000 @@ -474,7 +474,7 @@ static void SIP_DECL(dp83815_mii_statchg static int SIP_DECL(mediachange)(struct ifnet *); static void SIP_DECL(mediastatus)(struct ifnet *, struct ifmediareq *); -static int SIP_DECL(match)(struct device *, struct cfdata *, void *); +static int SIP_DECL(match)(struct device *, cfdata_t, void *); static void SIP_DECL(attach)(struct device *, struct device *, void *); int SIP_DECL(copy_small) = 0; @@ -637,7 +637,7 @@ SIP_DECL(check_64bit)(const struct pci_a #endif /* DP83820 */ static int -SIP_DECL(match)(struct device *parent, struct cfdata *cf, +SIP_DECL(match)(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_sk.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_sk.c,v retrieving revision 1.38 diff -d -p -u -u -r1.38 if_sk.c --- sys/dev/pci/if_sk.c 13 Mar 2007 09:50:00 -0000 1.38 +++ sys/dev/pci/if_sk.c 9 Jul 2007 22:43:12 -0000 @@ -163,9 +163,9 @@ #include #include -int skc_probe(struct device *, struct cfdata *, void *); +int skc_probe(struct device *, cfdata_t, void *); void skc_attach(struct device *, struct device *self, void *aux); -int sk_probe(struct device *, struct cfdata *, void *); +int sk_probe(struct device *, cfdata_t, void *); void sk_attach(struct device *, struct device *self, void *aux); int skcprint(void *, const char *); int sk_intr(void *); @@ -1139,7 +1139,7 @@ sk_lookup(const struct pci_attach_args * */ int -skc_probe(struct device *parent, struct cfdata *match, +skc_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -1199,7 +1199,7 @@ void sk_reset(struct sk_softc *sc) } int -sk_probe(struct device *parent, struct cfdata *match, +sk_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct skc_attach_args *sa = aux; Index: sys/dev/pci/if_ste.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ste.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 if_ste.c --- sys/dev/pci/if_ste.c 4 Mar 2007 06:02:22 -0000 1.27 +++ sys/dev/pci/if_ste.c 9 Jul 2007 22:43:14 -0000 @@ -235,7 +235,7 @@ static void ste_mii_statchg(struct devic static int ste_mediachange(struct ifnet *); static void ste_mediastatus(struct ifnet *, struct ifmediareq *); -static int ste_match(struct device *, struct cfdata *, void *); +static int ste_match(struct device *, cfdata_t, void *); static void ste_attach(struct device *, struct device *, void *); int ste_copy_small = 0; @@ -290,7 +290,7 @@ ste_lookup(const struct pci_attach_args } static int -ste_match(struct device *parent, struct cfdata *cf, void *aux) +ste_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_stge.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_stge.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 if_stge.c --- sys/dev/pci/if_stge.c 4 Mar 2007 06:02:23 -0000 1.36 +++ sys/dev/pci/if_stge.c 9 Jul 2007 22:43:14 -0000 @@ -296,7 +296,7 @@ static void stge_mii_statchg(struct devi static int stge_mediachange(struct ifnet *); static void stge_mediastatus(struct ifnet *, struct ifmediareq *); -static int stge_match(struct device *, struct cfdata *, void *); +static int stge_match(struct device *, cfdata_t, void *); static void stge_attach(struct device *, struct device *, void *); int stge_copy_small = 0; @@ -373,7 +373,7 @@ stge_lookup(const struct pci_attach_args } static int -stge_match(struct device *parent, struct cfdata *cf, +stge_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_ti.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_ti.c,v retrieving revision 1.74 diff -d -p -u -u -r1.74 if_ti.c --- sys/dev/pci/if_ti.c 4 Mar 2007 06:02:23 -0000 1.74 +++ sys/dev/pci/if_ti.c 9 Jul 2007 22:43:15 -0000 @@ -149,7 +149,7 @@ static const struct ti_type ti_devs[] = }; static const struct ti_type *ti_type_match(struct pci_attach_args *); -static int ti_probe(struct device *, struct cfdata *, void *); +static int ti_probe(struct device *, cfdata_t, void *); static void ti_attach(struct device *, struct device *, void *); static void ti_shutdown(void *); static void ti_txeof_tigon1(struct ti_softc *); @@ -1630,7 +1630,7 @@ ti_type_match(pa) * against our list and return its name if we find a match. */ static int -ti_probe(struct device *parent, struct cfdata *match, +ti_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_tl.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_tl.c,v retrieving revision 1.82 diff -d -p -u -u -r1.82 if_tl.c --- sys/dev/pci/if_tl.c 4 Mar 2007 06:02:23 -0000 1.82 +++ sys/dev/pci/if_tl.c 9 Jul 2007 22:43:16 -0000 @@ -118,7 +118,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1. #define TL_NBUF 32 #endif -static int tl_pci_match(struct device *, struct cfdata *, void *); +static int tl_pci_match(struct device *, cfdata_t, void *); static void tl_pci_attach(struct device *, struct device *, void *); static int tl_intr(void *); @@ -281,7 +281,7 @@ tl_lookup_product(id) } static int -tl_pci_match(struct device *parent, struct cfdata *match, +tl_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/if_tlp_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_tlp_pci.c,v retrieving revision 1.101 diff -d -p -u -u -r1.101 if_tlp_pci.c --- sys/dev/pci/if_tlp_pci.c 18 Feb 2007 12:16:14 -0000 1.101 +++ sys/dev/pci/if_tlp_pci.c 9 Jul 2007 22:43:17 -0000 @@ -112,7 +112,7 @@ struct tulip_pci_softc { #define TULIP_PCI_SHAREDROM 0x04 /* ROM is shared */ #define TULIP_PCI_SLAVEROM 0x08 /* slave of shared ROM */ -static int tlp_pci_match(struct device *, struct cfdata *, void *); +static int tlp_pci_match(struct device *, cfdata_t, void *); static void tlp_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(tlp_pci, sizeof(struct tulip_pci_softc), @@ -336,7 +336,7 @@ tlp_pci_check_slaved(struct tulip_pci_so } static int -tlp_pci_match(struct device *parent, struct cfdata *match, void *aux) +tlp_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_txp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_txp.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 if_txp.c --- sys/dev/pci/if_txp.c 4 Mar 2007 06:02:23 -0000 1.19 +++ sys/dev/pci/if_txp.c 9 Jul 2007 22:43:17 -0000 @@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1 #undef TRY_TX_UDP_CSUM #undef TRY_TX_TCP_CSUM -int txp_probe(struct device *, struct cfdata *, void *); +int txp_probe(struct device *, cfdata_t, void *); void txp_attach(struct device *, struct device *, void *); int txp_intr(void *); void txp_tick(void *); @@ -176,7 +176,7 @@ txp_pcilookup(id) } int -txp_probe(struct device *parent, struct cfdata *match, +txp_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_vge.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_vge.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 if_vge.c --- sys/dev/pci/if_vge.c 4 Mar 2007 06:02:23 -0000 1.34 +++ sys/dev/pci/if_vge.c 9 Jul 2007 22:43:18 -0000 @@ -295,7 +295,7 @@ struct vge_softc { static inline void vge_set_txaddr(struct vge_txfrag *, bus_addr_t); static inline void vge_set_rxaddr(struct vge_rxdesc *, bus_addr_t); -static int vge_match(struct device *, struct cfdata *, void *); +static int vge_match(struct device *, cfdata_t, void *); static void vge_attach(struct device *, struct device *, void *); static int vge_encap(struct vge_softc *, struct mbuf *, int); @@ -811,7 +811,7 @@ vge_reset(struct vge_softc *sc) * IDs against our list and return a device name if we find a match. */ static int -vge_match(struct device *parent, struct cfdata *match, void *aux) +vge_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_vr.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_vr.c,v retrieving revision 1.85 diff -d -p -u -u -r1.85 if_vr.c --- sys/dev/pci/if_vr.c 4 Mar 2007 06:02:23 -0000 1.85 +++ sys/dev/pci/if_vr.c 9 Jul 2007 22:43:18 -0000 @@ -1438,7 +1438,7 @@ vr_stop(struct ifnet *ifp, int disable) ifp->if_timer = 0; } -static int vr_probe(struct device *, struct cfdata *, void *); +static int vr_probe(struct device *, cfdata_t, void *); static void vr_attach(struct device *, struct device *, void *); static void vr_shutdown(void *); @@ -1459,7 +1459,7 @@ vr_lookup(struct pci_attach_args *pa) } static int -vr_probe(struct device *parent, struct cfdata *match, +vr_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/if_wi_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_wi_pci.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 if_wi_pci.c --- sys/dev/pci/if_wi_pci.c 16 Nov 2006 01:33:09 -0000 1.41 +++ sys/dev/pci/if_wi_pci.c 9 Jul 2007 22:43:19 -0000 @@ -96,7 +96,7 @@ struct wi_pci_softc { void *sc_powerhook; /* power hook descriptor */ }; -static int wi_pci_match(struct device *, struct cfdata *, void *); +static int wi_pci_match(struct device *, cfdata_t, void *); static void wi_pci_attach(struct device *, struct device *, void *); static int wi_pci_enable(struct wi_softc *); static void wi_pci_disable(struct wi_softc *); @@ -212,7 +212,7 @@ wi_pci_lookup(struct pci_attach_args *pa } static int -wi_pci_match(struct device *parent, struct cfdata *match, +wi_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_wm.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v retrieving revision 1.141 diff -d -p -u -u -r1.141 if_wm.c --- sys/dev/pci/if_wm.c 29 May 2007 07:17:23 -0000 1.141 +++ sys/dev/pci/if_wm.c 9 Jul 2007 22:43:20 -0000 @@ -567,7 +567,7 @@ static void wm_gmii_mediastatus(struct i static int wm_kmrn_i80003_readreg(struct wm_softc *, int); static void wm_kmrn_i80003_writereg(struct wm_softc *, int, int); -static int wm_match(struct device *, struct cfdata *, void *); +static int wm_match(struct device *, cfdata_t, void *); static void wm_attach(struct device *, struct device *, void *); static int wm_is_onboard_nvm_eeprom(struct wm_softc *); static int wm_get_swsm_semaphore(struct wm_softc *); @@ -885,7 +885,7 @@ wm_lookup(const struct pci_attach_args * } static int -wm_match(struct device *parent, struct cfdata *cf, void *aux) +wm_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_wpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_wpi.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 if_wpi.c --- sys/dev/pci/if_wpi.c 4 Mar 2007 06:02:24 -0000 1.9 +++ sys/dev/pci/if_wpi.c 9 Jul 2007 22:43:21 -0000 @@ -96,7 +96,7 @@ static const uint8_t wpi_ridx_to_plcp[] 10, 20, 55, 110 /* CCK */ }; -static int wpi_match(struct device *, struct cfdata *, void *); +static int wpi_match(struct device *, cfdata_t, void *); static void wpi_attach(struct device *, struct device *, void *); static int wpi_detach(struct device*, int); static void wpi_power(int, void *); @@ -166,7 +166,7 @@ CFATTACH_DECL(wpi, sizeof (struct wpi_so wpi_detach, NULL); static int -wpi_match(struct device *parent, struct cfdata *match __unused, void *aux) +wpi_match(struct device *parent, cfdata_t cfdata __unused, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/if_xge.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/if_xge.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 if_xge.c --- sys/dev/pci/if_xge.c 4 Mar 2007 06:02:24 -0000 1.5 +++ sys/dev/pci/if_xge.c 9 Jul 2007 22:43:22 -0000 @@ -181,7 +181,7 @@ struct xge_softc { #endif }; -static int xge_match(struct device *parent, struct cfdata *cf, void *aux); +static int xge_match(struct device *parent, cfdata_t cf, void *aux); static void xge_attach(struct device *parent, struct device *self, void *aux); static int xge_alloc_txmem(struct xge_softc *); static int xge_alloc_rxmem(struct xge_softc *); @@ -270,7 +270,7 @@ CFATTACH_DECL(xge, sizeof(struct xge_sof #define XGE_IP_MAXPACKET 65535 /* same as IP_MAXPACKET */ static int -xge_match(struct device *parent, struct cfdata *cf, void *aux) +xge_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/ifpci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ifpci.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 ifpci.c --- sys/dev/pci/ifpci.c 4 Mar 2007 06:02:24 -0000 1.22 +++ sys/dev/pci/ifpci.c 9 Jul 2007 22:43:22 -0000 @@ -134,7 +134,7 @@ static void avma1pp_bchannel_stat(isdn_l static void avma1pp_map_int(struct ifpci_softc *sc, struct pci_attach_args *pa); static void avma1pp_bchannel_setup(isdn_layer1token, int h_chan, int bprot, int activate); static void avma1pp_init_linktab(struct isic_softc *); -static int ifpci_match(struct device *parent, struct cfdata *match, void *aux); +static int ifpci_match(struct device *parent, cfdata_t match, void *aux); static void ifpci_attach(struct device *parent, struct device *self, void *aux); static int ifpci_detach(struct device *self, int flags); static int ifpci_activate(struct device *self, enum devact act); @@ -263,7 +263,7 @@ CFATTACH_DECL(ifpci, sizeof(struct ifpci static int ifpci_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/ifpci2.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ifpci2.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 ifpci2.c --- sys/dev/pci/ifpci2.c 4 Mar 2007 06:02:24 -0000 1.10 +++ sys/dev/pci/ifpci2.c 9 Jul 2007 22:43:23 -0000 @@ -134,7 +134,7 @@ static void avma1pp2_bchannel_stat(isdn_ static void avma1pp2_map_int(struct ifpci_softc *sc, struct pci_attach_args *pa); static void avma1pp2_bchannel_setup(isdn_layer1token, int h_chan, int bprot, int activate); static void avma1pp2_init_linktab(struct isic_softc *); -static int ifpci2_match(struct device *parent, struct cfdata *match, void *aux); +static int ifpci2_match(struct device *parent, cfdata_t match, void *aux); static void ifpci2_attach(struct device *parent, struct device *self, void *aux); static int ifpci2_detach(struct device *self, int flags); static int ifpci2_activate(struct device *self, enum devact act); @@ -233,7 +233,7 @@ CFATTACH_DECL(ifritz, sizeof(struct ifpc static int ifpci2_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/igsfb_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/igsfb_pci.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 igsfb_pci.c --- sys/dev/pci/igsfb_pci.c 13 Jan 2007 19:03:49 -0000 1.16 +++ sys/dev/pci/igsfb_pci.c 9 Jul 2007 22:43:23 -0000 @@ -72,7 +72,7 @@ static pcitag_t igsfb_pci_constag; -static int igsfb_pci_match(struct device *, struct cfdata *, void *); +static int igsfb_pci_match(struct device *, cfdata_t, void *); static void igsfb_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(igsfb_pci, sizeof(struct igsfb_softc), @@ -142,7 +142,7 @@ igsfb_pci_is_console(pci_chipset_tag_t p static int -igsfb_pci_match(struct device *parent, struct cfdata *match, void *aux) +igsfb_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/iha_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/iha_pci.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 iha_pci.c --- sys/dev/pci/iha_pci.c 16 Nov 2006 01:33:09 -0000 1.13 +++ sys/dev/pci/iha_pci.c 9 Jul 2007 22:43:23 -0000 @@ -56,14 +56,14 @@ __KERNEL_RCSID(0, "$NetBSD: iha_pci.c,v #include -static int iha_pci_match(struct device *, struct cfdata *, void *); +static int iha_pci_match(struct device *, cfdata_t, void *); static void iha_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(iha_pci, sizeof(struct iha_softc), iha_pci_match, iha_pci_attach, NULL, NULL); static int -iha_pci_match(struct device *parent, struct cfdata *match, +iha_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/iop_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/iop_pci.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 iop_pci.c --- sys/dev/pci/iop_pci.c 16 Nov 2006 01:33:09 -0000 1.18 +++ sys/dev/pci/iop_pci.c 9 Jul 2007 22:43:23 -0000 @@ -67,13 +67,13 @@ __KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v #define PCI_INTERFACE_I2O_INTRDRIVEN 0x01 static void iop_pci_attach(struct device *, struct device *, void *); -static int iop_pci_match(struct device *, struct cfdata *, void *); +static int iop_pci_match(struct device *, cfdata_t, void *); CFATTACH_DECL(iop_pci, sizeof(struct iop_softc), iop_pci_match, iop_pci_attach, NULL, NULL); static int -iop_pci_match(struct device *parent, struct cfdata *match, +iop_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/isic_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/isic_pci.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 isic_pci.c --- sys/dev/pci/isic_pci.c 16 Nov 2006 01:33:09 -0000 1.27 +++ sys/dev/pci/isic_pci.c 9 Jul 2007 22:43:23 -0000 @@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: isic_pci.c,v extern const struct isdn_layer1_isdnif_driver isic_std_driver; -static int isic_pci_match(struct device *, struct cfdata *, void *); +static int isic_pci_match(struct device *, cfdata_t, void *); static void isic_pci_attach(struct device *, struct device *, void *); static const struct isic_pci_product * find_matching_card(struct pci_attach_args *pa); @@ -121,7 +121,7 @@ static const struct isic_pci_product * f */ static int isic_pci_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/isp_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/isp_pci.c,v retrieving revision 1.102 diff -d -p -u -u -r1.102 isp_pci.c --- sys/dev/pci/isp_pci.c 25 May 2007 01:59:24 -0000 1.102 +++ sys/dev/pci/isp_pci.c 9 Jul 2007 22:43:24 -0000 @@ -369,7 +369,7 @@ static struct ispmdvec mdvec_2400 = { #define PCI_DFLT_LTNCY 0x40 #define PCI_DFLT_LNSZ 0x10 -static int isp_pci_probe(struct device *, struct cfdata *, void *); +static int isp_pci_probe(struct device *, cfdata_t, void *); static void isp_pci_attach(struct device *, struct device *, void *); struct isp_pcisoftc { @@ -392,7 +392,7 @@ const char vstring[] = #endif static int -isp_pci_probe(struct device *parent, struct cfdata *match, void *aux) +isp_pci_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; switch (pa->pa_id) { @@ -771,7 +771,7 @@ isp_pci_attach(struct device *parent, st DEFAULT_PORTWWN(isp) = 0x400000007F000002ULL; } - isp->isp_confopts = self->dv_cfdata->cf_flags; + isp->isp_confopts = cfdata_flags(device_cfdata(self)); isp->isp_role = ISP_DEFAULT_ROLES; ISP_LOCK(isp); isp_reset(isp); Index: sys/dev/pci/iteide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/iteide.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 iteide.c --- sys/dev/pci/iteide.c 9 Feb 2007 21:55:27 -0000 1.8 +++ sys/dev/pci/iteide.c 9 Jul 2007 22:43:24 -0000 @@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: iteide.c,v 1 static void ite_chip_map(struct pciide_softc*, struct pci_attach_args*); static void ite_setup_channel(struct ata_channel*); -static int iteide_match(struct device *, struct cfdata *, void *); +static int iteide_match(struct device *, cfdata_t, void *); static void iteide_attach(struct device *, struct device *, void *); CFATTACH_DECL(iteide, sizeof(struct pciide_softc), @@ -70,7 +70,7 @@ static const struct pciide_product_desc }; static int -iteide_match(struct device *parent, struct cfdata *match, +iteide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/iwic_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/iwic_pci.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 iwic_pci.c --- sys/dev/pci/iwic_pci.c 16 Nov 2006 01:33:09 -0000 1.10 +++ sys/dev/pci/iwic_pci.c 9 Jul 2007 22:43:24 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: iwic_pci.c,v #define IWIC_PCI_IOBA (PCI_MAPREG_START+0x04) static int iwic_pci_intr(void *sc); -static int iwic_pci_probe(struct device * dev, struct cfdata * match, void *aux); +static int iwic_pci_probe(struct device * dev, cfdata_t match, void *aux); static void iwic_pci_attach(struct device * parent, struct device * dev, void *aux); static int iwic_pci_activate(struct device * dev, enum devact); @@ -212,7 +212,7 @@ iwic_find_card(const struct pci_attach_a *---------------------------------------------------------------------------*/ static int iwic_pci_probe(struct device * dev, - struct cfdata * match, void *aux) + cfdata_t match, void *aux) { if (iwic_find_card(aux)) return 1; Index: sys/dev/pci/ixpide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ixpide.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 ixpide.c --- sys/dev/pci/ixpide.c 9 Feb 2007 21:55:27 -0000 1.9 +++ sys/dev/pci/ixpide.c 9 Jul 2007 22:43:24 -0000 @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: ixpide.c,v 1 #include #include -static int ixpide_match(struct device *, struct cfdata *, void *); +static int ixpide_match(struct device *, cfdata_t, void *); static void ixpide_attach(struct device *, struct device *, void *); static void ixp_chip_map(struct pciide_softc *, struct pci_attach_args *); @@ -72,7 +72,7 @@ static const struct pciide_product_desc }; static int -ixpide_match(struct device *parent, struct cfdata *cfdata, +ixpide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/jmide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/jmide.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 jmide.c --- sys/dev/pci/jmide.c 31 May 2007 21:26:48 -0000 1.2 +++ sys/dev/pci/jmide.c 9 Jul 2007 22:43:24 -0000 @@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1. static const struct jmide_product *jmide_lookup(pcireg_t); -static int jmide_match(struct device *, struct cfdata *, void *); +static int jmide_match(struct device *, cfdata_t, void *); static void jmide_attach(struct device *, struct device *, void *); static int jmide_intr(void *); @@ -134,7 +134,7 @@ jmide_lookup(pcireg_t id) { } static int -jmide_match(struct device *parent, struct cfdata *match, +jmide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; @@ -433,14 +433,14 @@ jmahci_print(void *aux, const char *pnp) #ifdef NJMAHCI -static int jmahci_match(struct device *, struct cfdata *, void *); +static int jmahci_match(struct device *, cfdata_t, void *); static void jmahci_attach(struct device *, struct device *, void *); CFATTACH_DECL(jmahci, sizeof(struct ahci_softc), jmahci_match, jmahci_attach, NULL, NULL); static int -jmahci_match(struct device *parent, struct cfdata *match, void *aux) +jmahci_match(struct device *parent, cfdata_t cfdata, void *aux) { return 1; } Index: sys/dev/pci/joy_eap.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/joy_eap.c,v retrieving revision 1.6 diff -d -p -u -u -r1.6 joy_eap.c --- sys/dev/pci/joy_eap.c 16 Nov 2006 01:33:09 -0000 1.6 +++ sys/dev/pci/joy_eap.c 9 Jul 2007 22:43:24 -0000 @@ -82,7 +82,7 @@ eap_joy_detach(struct device *joydev, st } static int -joy_eap_match(struct device *parent, struct cfdata *match, +joy_eap_match(struct device *parent, cfdata_t match, void *aux) { struct joy_eap_aa *eaa = aux; Index: sys/dev/pci/joy_eso.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/joy_eso.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 joy_eso.c --- sys/dev/pci/joy_eso.c 16 Nov 2006 01:33:09 -0000 1.11 +++ sys/dev/pci/joy_eso.c 9 Jul 2007 22:43:24 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: joy_eso.c,v #include static int -joy_eso_match(struct device *parent, struct cfdata *match, +joy_eso_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; Index: sys/dev/pci/joy_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/joy_pci.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 joy_pci.c --- sys/dev/pci/joy_pci.c 16 Nov 2006 01:33:09 -0000 1.14 +++ sys/dev/pci/joy_pci.c 9 Jul 2007 22:43:24 -0000 @@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: joy_pci.c,v static int bar_is_io(pci_chipset_tag_t pc, pcitag_t tag, int reg); static int -joy_pci_match(struct device *parent, struct cfdata *match, +joy_pci_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/ld_amr.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ld_amr.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 ld_amr.c --- sys/dev/pci/ld_amr.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/ld_amr.c 9 Jul 2007 22:43:24 -0000 @@ -81,7 +81,7 @@ static void ld_amr_handler(struct amr_cc static int ld_amr_start(struct ld_softc *, struct buf *); static int -ld_amr_match(struct device *parent, struct cfdata *match, +ld_amr_match(struct device *parent, cfdata_t match, void *aux) { Index: sys/dev/pci/ld_twa.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ld_twa.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 ld_twa.c --- sys/dev/pci/ld_twa.c 8 Feb 2007 18:47:21 -0000 1.5 +++ sys/dev/pci/ld_twa.c 9 Jul 2007 22:43:25 -0000 @@ -89,7 +89,7 @@ static int ld_twa_dobio(struct ld_twa_so static int ld_twa_dump(struct ld_softc *, void *, int, int); static int ld_twa_flush(struct ld_softc *); static void ld_twa_handler(struct twa_request *); -static int ld_twa_match(struct device *, struct cfdata *, void *); +static int ld_twa_match(struct device *, cfdata_t, void *); static int ld_twa_start(struct ld_softc *, struct buf *); static void ld_twa_adjqparam(struct device *, int); @@ -105,7 +105,7 @@ static const struct twa_callbacks ld_twa }; static int -ld_twa_match(struct device *parent, struct cfdata *match, +ld_twa_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/pci/ld_twe.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ld_twe.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 ld_twe.c --- sys/dev/pci/ld_twe.c 16 Nov 2006 01:33:09 -0000 1.26 +++ sys/dev/pci/ld_twe.c 9 Jul 2007 22:43:25 -0000 @@ -79,7 +79,7 @@ static int ld_twe_dobio(struct ld_twe_so static int ld_twe_dump(struct ld_softc *, void *, int, int); static int ld_twe_flush(struct ld_softc *); static void ld_twe_handler(struct twe_ccb *, int); -static int ld_twe_match(struct device *, struct cfdata *, void *); +static int ld_twe_match(struct device *, cfdata_t, void *); static int ld_twe_start(struct ld_softc *, struct buf *); static void ld_twe_adjqparam(struct device *, int); @@ -92,7 +92,7 @@ static const struct twe_callbacks ld_twe }; static int -ld_twe_match(struct device *parent, struct cfdata *match, +ld_twe_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/pci/lpt_puc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/lpt_puc.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 lpt_puc.c --- sys/dev/pci/lpt_puc.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/lpt_puc.c 9 Jul 2007 22:43:25 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_puc.c,v #include static int -lpt_puc_probe(struct device *parent, struct cfdata *match, +lpt_puc_probe(struct device *parent, cfdata_t match, void *aux) { struct puc_attach_args *aa = aux; Index: sys/dev/pci/machfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/machfb.c,v retrieving revision 1.49 diff -d -p -u -u -r1.49 machfb.c --- sys/dev/pci/machfb.c 4 Mar 2007 06:02:24 -0000 1.49 +++ sys/dev/pci/machfb.c 9 Jul 2007 22:43:26 -0000 @@ -218,7 +218,7 @@ static struct videomode mach64_modes[] = extern const u_char rasops_cmap[768]; -static int mach64_match(struct device *, struct cfdata *, void *); +static int mach64_match(struct device *, cfdata_t, void *); static void mach64_attach(struct device *, struct device *, void *); CFATTACH_DECL(machfb, sizeof(struct mach64_softc), mach64_match, mach64_attach, @@ -467,7 +467,7 @@ wait_for_idle(struct mach64_softc *sc) } static int -mach64_match(struct device *parent, struct cfdata *match, +mach64_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/mfi_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mfi_pci.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 mfi_pci.c --- sys/dev/pci/mfi_pci.c 20 Dec 2006 21:44:06 -0000 1.2 +++ sys/dev/pci/mfi_pci.c 9 Jul 2007 22:43:26 -0000 @@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: mfi_pci.c,v #define MFI_PCI_MEMSIZE 0x2000 /* 8k */ int mfi_pci_find_device(void *); -int mfi_pci_match(struct device *, struct cfdata *, void *); +int mfi_pci_match(struct device *, cfdata_t, void *); void mfi_pci_attach(struct device *, struct device *, void *); CFATTACH_DECL(mfi_pci, sizeof(struct mfi_softc), @@ -87,7 +87,7 @@ mfi_pci_find_device(void *aux) { } int -mfi_pci_match(struct device *parent, struct cfdata *match, void *aux) +mfi_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { int i; Index: sys/dev/pci/mlx_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mlx_pci.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 mlx_pci.c --- sys/dev/pci/mlx_pci.c 16 Nov 2006 01:33:09 -0000 1.16 +++ sys/dev/pci/mlx_pci.c 9 Jul 2007 22:43:26 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v #include static void mlx_pci_attach(struct device *, struct device *, void *); -static int mlx_pci_match(struct device *, struct cfdata *, void *); +static int mlx_pci_match(struct device *, cfdata_t, void *); static const struct mlx_pci_ident *mlx_pci_findmpi(struct pci_attach_args *); static int mlx_v3_submit(struct mlx_softc *, struct mlx_ccb *); @@ -185,7 +185,7 @@ mlx_pci_findmpi(struct pci_attach_args * * Match a supported board. */ static int -mlx_pci_match(struct device *parent, struct cfdata *cfdata, +mlx_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/pci/mly.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mly.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 mly.c --- sys/dev/pci/mly.c 4 Mar 2007 06:02:24 -0000 1.34 +++ sys/dev/pci/mly.c 9 Jul 2007 22:43:26 -0000 @@ -111,7 +111,7 @@ __KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.34 #include static void mly_attach(struct device *, struct device *, void *); -static int mly_match(struct device *, struct cfdata *, void *); +static int mly_match(struct device *, cfdata_t, void *); static const struct mly_ident *mly_find_ident(struct pci_attach_args *); static int mly_fwhandshake(struct mly_softc *); static int mly_flush(struct mly_softc *); @@ -265,7 +265,7 @@ mly_find_ident(struct pci_attach_args *p * Match a supported board. */ static int -mly_match(struct device *parent, struct cfdata *cfdata, +mly_match(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/pci/mpt_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mpt_pci.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 mpt_pci.c --- sys/dev/pci/mpt_pci.c 16 Nov 2006 01:33:09 -0000 1.10 +++ sys/dev/pci/mpt_pci.c 9 Jul 2007 22:43:27 -0000 @@ -132,7 +132,7 @@ mpt_pci_lookup(const struct pci_attach_a } static int -mpt_pci_match(struct device *parent, struct cfdata *cf, +mpt_pci_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/mpu_cmpci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mpu_cmpci.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 mpu_cmpci.c --- sys/dev/pci/mpu_cmpci.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/mpu_cmpci.c 9 Jul 2007 22:43:28 -0000 @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_cmpci.c, #include static int -mpu_cmpci_match(struct device *parent, struct cfdata *match, void *aux) +mpu_cmpci_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct cmpci_softc *ysc = (struct cmpci_softc *)parent; Index: sys/dev/pci/mpu_eso.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mpu_eso.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 mpu_eso.c --- sys/dev/pci/mpu_eso.c 16 Nov 2006 01:33:09 -0000 1.13 +++ sys/dev/pci/mpu_eso.c 9 Jul 2007 22:43:28 -0000 @@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_eso.c,v #include static int -mpu_eso_match(struct device *parent, struct cfdata *match, void *aux) +mpu_eso_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct eso_softc *esc = (struct eso_softc *)parent; Index: sys/dev/pci/mpu_fms.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mpu_fms.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 mpu_fms.c --- sys/dev/pci/mpu_fms.c 16 Nov 2006 01:33:09 -0000 1.13 +++ sys/dev/pci/mpu_fms.c 9 Jul 2007 22:43:28 -0000 @@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_fms.c,v #include static int -mpu_fms_match(struct device *parent, struct cfdata *match, void *aux) +mpu_fms_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct fms_softc *ssc = (struct fms_softc *)parent; Index: sys/dev/pci/mpu_yds.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/mpu_yds.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 mpu_yds.c --- sys/dev/pci/mpu_yds.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/mpu_yds.c 9 Jul 2007 22:43:28 -0000 @@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: mpu_yds.c,v #include static int -mpu_yds_match(struct device *parent, struct cfdata *match, void *aux) +mpu_yds_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct yds_softc *ysc = (struct yds_softc *)parent; Index: sys/dev/pci/neo.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/neo.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 neo.c --- sys/dev/pci/neo.c 16 Nov 2006 01:33:09 -0000 1.35 +++ sys/dev/pci/neo.c 9 Jul 2007 22:43:30 -0000 @@ -176,7 +176,7 @@ static int nm_waitcd(struct neo_softc *) static int nm_loadcoeff(struct neo_softc *, int, int); static int nm_init(struct neo_softc *); -static int neo_match(struct device *, struct cfdata *, void *); +static int neo_match(struct device *, cfdata_t, void *); static void neo_attach(struct device *, struct device *, void *); static int neo_intr(void *); @@ -501,7 +501,7 @@ nm_init(struct neo_softc *sc) } static int -neo_match(struct device *parent, struct cfdata *match, +neo_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/njs_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/njs_pci.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 njs_pci.c --- sys/dev/pci/njs_pci.c 16 Nov 2006 01:33:09 -0000 1.5 +++ sys/dev/pci/njs_pci.c 9 Jul 2007 22:43:30 -0000 @@ -69,7 +69,7 @@ struct njsc32_pci_softc { bus_size_t sc_regmap_size; }; -static int njs_pci_match(struct device *, struct cfdata *, void *); +static int njs_pci_match(struct device *, cfdata_t, void *); static void njs_pci_attach(struct device *, struct device *, void *); static int njs_pci_detach(struct device *, int); @@ -111,7 +111,7 @@ njs_pci_lookup(const struct pci_attach_a } static int -njs_pci_match(struct device *parent, struct cfdata *match, +njs_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/oboe.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/oboe.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 oboe.c --- sys/dev/pci/oboe.c 4 Mar 2007 06:02:25 -0000 1.25 +++ sys/dev/pci/oboe.c 9 Jul 2007 22:43:30 -0000 @@ -70,7 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.2 #include -static int oboe_match(struct device *parent, struct cfdata *match, void *aux); +static int oboe_match(struct device *parent, cfdata_t match, void *aux); static void oboe_attach(struct device *parent, struct device *self, void *aux); static int oboe_activate(struct device *self, enum devact act); static int oboe_detach(struct device *self, int flags); @@ -167,7 +167,7 @@ static struct irframe_methods oboe_metho }; static int -oboe_match(struct device *parent, struct cfdata *match, +oboe_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/ohci_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ohci_pci.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 ohci_pci.c --- sys/dev/pci/ohci_pci.c 16 Nov 2006 01:33:09 -0000 1.31 +++ sys/dev/pci/ohci_pci.c 9 Jul 2007 22:43:30 -0000 @@ -72,7 +72,7 @@ struct ohci_pci_softc { }; static int -ohci_pci_match(struct device *parent, struct cfdata *match, +ohci_pci_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/opl_cmpci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/opl_cmpci.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 opl_cmpci.c --- sys/dev/pci/opl_cmpci.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/opl_cmpci.c 9 Jul 2007 22:43:30 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_cmpci.c, #include static int -opl_cmpci_match(struct device *parent, struct cfdata *match, void *aux) +opl_cmpci_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct cmpci_softc *ssc = (struct cmpci_softc *)parent; Index: sys/dev/pci/opl_eso.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/opl_eso.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 opl_eso.c --- sys/dev/pci/opl_eso.c 16 Nov 2006 01:33:09 -0000 1.13 +++ sys/dev/pci/opl_eso.c 9 Jul 2007 22:43:30 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_eso.c,v #include static int -opl_eso_match(struct device *parent, struct cfdata *match, +opl_eso_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; Index: sys/dev/pci/opl_fms.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/opl_fms.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 opl_fms.c --- sys/dev/pci/opl_fms.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/opl_fms.c 9 Jul 2007 22:43:30 -0000 @@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_fms.c,v #include static int -opl_fms_match(struct device *parent, struct cfdata *match, +opl_fms_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; Index: sys/dev/pci/opl_sv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/opl_sv.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 opl_sv.c --- sys/dev/pci/opl_sv.c 16 Nov 2006 01:33:09 -0000 1.11 +++ sys/dev/pci/opl_sv.c 9 Jul 2007 22:43:30 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_sv.c,v 1 #include static int -opl_sv_match(struct device *parent, struct cfdata *match, +opl_sv_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; Index: sys/dev/pci/opl_yds.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/opl_yds.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 opl_yds.c --- sys/dev/pci/opl_yds.c 16 Nov 2006 01:33:09 -0000 1.12 +++ sys/dev/pci/opl_yds.c 9 Jul 2007 22:43:31 -0000 @@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_yds.c,v #include static int -opl_yds_match(struct device *parent, struct cfdata *match, void *aux) +opl_yds_match(struct device *parent, cfdata_t match, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct yds_softc *ssc = (struct yds_softc *)parent; Index: sys/dev/pci/optiide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/optiide.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 optiide.c --- sys/dev/pci/optiide.c 9 Feb 2007 21:55:27 -0000 1.15 +++ sys/dev/pci/optiide.c 9 Jul 2007 22:43:31 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: optiide.c,v static void opti_chip_map(struct pciide_softc*, struct pci_attach_args*); static void opti_setup_channel(struct ata_channel*); -static int optiide_match(struct device *, struct cfdata *, void *); +static int optiide_match(struct device *, cfdata_t, void *); static void optiide_attach(struct device *, struct device *, void *); CFATTACH_DECL(optiide, sizeof(struct pciide_softc), @@ -81,7 +81,7 @@ static const struct pciide_product_desc }; static int -optiide_match(struct device *parent, struct cfdata *match, +optiide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/pccbb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pccbb.c,v retrieving revision 1.144 diff -d -p -u -u -r1.144 pccbb.c --- sys/dev/pci/pccbb.c 4 Feb 2007 21:04:37 -0000 1.144 +++ sys/dev/pci/pccbb.c 9 Jul 2007 22:43:32 -0000 @@ -77,8 +77,6 @@ __KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1. #include #include -#include "locators.h" - #if defined(__i386__) #include "ioapic.h" #include "acpi.h" @@ -111,7 +109,7 @@ delay_ms(int millis, void *param) tsleep(param, PWAIT, "pccbb", MAX(2, hz * millis / 1000)); } -int pcicbbmatch(struct device *, struct cfdata *, void *); +int pcicbbmatch(struct device *, cfdata_t, void *); void pccbbattach(struct device *, struct device *, void *); int pccbbintr(void *); static void pci113x_insert(void *); @@ -275,7 +273,7 @@ static struct cardbus_functions pccbb_fu #endif int -pcicbbmatch(struct device *parent, struct cfdata *match, void *aux) +pcicbbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pci.c,v retrieving revision 1.103 diff -d -p -u -u -r1.103 pci.c --- sys/dev/pci/pci.c 16 Nov 2006 01:33:09 -0000 1.103 +++ sys/dev/pci/pci.c 9 Jul 2007 22:43:32 -0000 @@ -50,8 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.10 #include -#include "locators.h" - #ifdef PCI_CONFIG_DUMP int pci_config_dump = 1; #else @@ -63,7 +61,7 @@ int pciprint(void *, const char *); #ifdef PCI_MACHDEP_ENUMERATE_BUS #define pci_enumerate_bus PCI_MACHDEP_ENUMERATE_BUS #else -int pci_enumerate_bus(struct pci_softc *, const int *, +int pci_enumerate_bus(struct pci_softc *, prop_dictionary_t, int (*)(struct pci_attach_args *), struct pci_attach_args *); #endif @@ -94,24 +92,22 @@ int pci_enumerate_bus(struct pci_softc * */ static int -pcirescan(struct device *sc, const char *ifattr, const int *locators) +pcirescan(struct device *sc, const char *ifattr, prop_dictionary_t locators) { KASSERT(ifattr && !strcmp(ifattr, "pci")); - KASSERT(locators); pci_enumerate_bus((struct pci_softc *)sc, locators, NULL, NULL); return (0); } static int -pcimatch(struct device *parent, struct cfdata *cf, void *aux) +pcimatch(struct device *parent, cfdata_t cf, void *aux) { struct pcibus_attach_args *pba = aux; /* Check the locators */ - if (cf->cf_loc[PCIBUSCF_BUS] != PCIBUSCF_BUS_DEFAULT && - cf->cf_loc[PCIBUSCF_BUS] != pba->pba_bus) + if (! locator_match_uint64(cfdata_locators(cf), "bus", pba->pba_bus)) return (0); /* sanity */ @@ -212,9 +208,6 @@ pciattach(struct device *parent, struct struct pci_softc *sc = (struct pci_softc *)self; int io_enabled, mem_enabled, mrl_enabled, mrm_enabled, mwi_enabled; const char *sep = ""; - static const int wildcard[PCICF_NLOCS] = { - PCICF_DEV_DEFAULT, PCICF_FUNCTION_DEFAULT - }; pci_attach_hook(parent, self, pba); @@ -278,7 +271,7 @@ do { \ aprint_error("%s: can't establish powerhook\n", sc->sc_dev.dv_xname); - pcirescan(&sc->sc_dev, "pci", wildcard); + pcirescan(&sc->sc_dev, "pci", NULL); } int @@ -337,7 +330,6 @@ pci_probe_device(struct pci_softc *sc, p struct pci_attach_args pa; pcireg_t id, csr, class, intr, bhlcr; int ret, pin, bus, device, function; - int locs[PCICF_NLOCS]; struct device *subdev; pci_decompose_tag(pc, tag, &bus, &device, &function); @@ -421,13 +413,28 @@ pci_probe_device(struct pci_softc *sc, p if (ret != 0 && pap != NULL) *pap = pa; } else { - locs[PCICF_DEV] = device; - locs[PCICF_FUNCTION] = function; + prop_dictionary_t locs; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("pci_probe_device: could not create " + "locators\n"); + return (0); + } + + if (! prop_dictionary_set_uint32(locs, "dev", device) || + ! prop_dictionary_set_uint32(locs, "function", function)) { + aprint_error("pci_probe_device: could not set " + "locators\n"); + prop_object_release(locs); + } subdev = config_found_sm_loc(&sc->sc_dev, "pci", locs, &pa, pciprint, config_stdsubmatch); sc->PCI_SC_DEVICESC(device, function) = subdev; ret = (subdev != NULL); + + prop_object_release(locs); } return (ret); @@ -439,8 +446,8 @@ pcidevdetached(struct device *sc, struct struct pci_softc *psc = (struct pci_softc *)sc; int d, f; - d = device_locator(dev, PCICF_DEV); - f = device_locator(dev, PCICF_FUNCTION); + d = device_locator(dev, "dev"); + f = device_locator(dev, "function"); KASSERT(psc->PCI_SC_DEVICESC(d, f) == dev); @@ -498,15 +505,11 @@ pci_find_device(struct pci_attach_args * extern struct cfdriver pci_cd; struct device *pcidev; int i; - static const int wildcard[2] = { - PCICF_DEV_DEFAULT, - PCICF_FUNCTION_DEFAULT - }; for (i = 0; i < pci_cd.cd_ndevs; i++) { pcidev = pci_cd.cd_devs[i]; if (pcidev != NULL && - pci_enumerate_bus((struct pci_softc *)pcidev, wildcard, + pci_enumerate_bus((struct pci_softc *)pcidev, NULL, match, pa) != 0) return (1); } @@ -519,7 +522,7 @@ pci_find_device(struct pci_attach_args * * code needs to provide something else. */ int -pci_enumerate_bus(struct pci_softc *sc, const int *locators, +pci_enumerate_bus(struct pci_softc *sc, prop_dictionary_t locators, int (*match)(struct pci_attach_args *), struct pci_attach_args *pap) { pci_chipset_tag_t pc = sc->sc_pc; @@ -539,8 +542,7 @@ pci_enumerate_bus(struct pci_softc *sc, for (device = 0; device < sc->sc_maxndevs; device++) #endif { - if ((locators[PCICF_DEV] != PCICF_DEV_DEFAULT) && - (locators[PCICF_DEV] != device)) + if (! locator_match_uint64(locators, "dev", device)) continue; tag = pci_make_tag(pc, sc->sc_bus, device, 0); @@ -570,8 +572,8 @@ pci_enumerate_bus(struct pci_softc *sc, nfunctions = PCI_HDRTYPE_MULTIFN(bhlcr) ? 8 : 1; for (function = 0; function < nfunctions; function++) { - if ((locators[PCICF_FUNCTION] != PCICF_FUNCTION_DEFAULT) - && (locators[PCICF_FUNCTION] != function)) + if (! locator_match_uint64(locators, "function", + function)) continue; if (qd != NULL && Index: sys/dev/pci/pciide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pciide.c,v retrieving revision 1.215 diff -d -p -u -u -r1.215 pciide.c --- sys/dev/pci/pciide.c 16 Nov 2006 01:33:09 -0000 1.215 +++ sys/dev/pci/pciide.c 9 Jul 2007 22:43:39 -0000 @@ -83,14 +83,14 @@ __KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1 #include #include -int pciide_match(struct device *, struct cfdata *, void *); +int pciide_match(struct device *, cfdata_t, void *); void pciide_attach(struct device *, struct device *, void *); CFATTACH_DECL(pciide, sizeof(struct pciide_softc), pciide_match, pciide_attach, NULL, NULL); int -pciide_match(struct device *parent, struct cfdata *match, +pciide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/pciide_common.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pciide_common.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 pciide_common.c --- sys/dev/pci/pciide_common.c 4 Mar 2007 06:02:25 -0000 1.37 +++ sys/dev/pci/pciide_common.c 9 Jul 2007 22:43:39 -0000 @@ -357,6 +357,9 @@ pciide_mapreg_dma(sc, pa) struct pciide_channel *pc; int reg, chan; bus_size_t size; + uint64_t flags; + + flags = cfdata_flags(device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)); /* * Map DMA registers @@ -410,8 +413,7 @@ pciide_mapreg_dma(sc, pa) sc->sc_wdcdev.dma_finish = pciide_dma_finish; } - if (device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)->cf_flags & - PCIIDE_OPTIONS_NODMA) { + if (flags & PCIIDE_OPTIONS_NODMA) { aprint_verbose( ", but unused (forced off by config file)"); sc->sc_dma_ok = 0; @@ -875,6 +877,9 @@ default_chip_map(sc, pa) bus_size_t cmdsize, ctlsize; const char *failreason; struct wdc_regs *wdr; + uint64_t flags; + + flags = cfdata_flags(device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)); if (pciide_chipen(sc, pa) == 0) return; @@ -884,8 +889,7 @@ default_chip_map(sc, pa) aprint_verbose("%s: bus-master DMA support present", sc->sc_wdcdev.sc_atac.atac_dev.dv_xname); if (sc->sc_pp == &default_product_desc && - (device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)->cf_flags & - PCIIDE_OPTIONS_DMA) == 0) { + (flags & PCIIDE_OPTIONS_DMA) == 0) { aprint_verbose(", but unused (no driver support)"); sc->sc_dma_ok = 0; } else { Index: sys/dev/pci/pcscp.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pcscp.c,v retrieving revision 1.39 diff -d -p -u -u -r1.39 pcscp.c --- sys/dev/pci/pcscp.c 4 Mar 2007 06:02:25 -0000 1.39 +++ sys/dev/pci/pcscp.c 9 Jul 2007 22:43:40 -0000 @@ -133,7 +133,7 @@ static struct ncr53c9x_glue pcscp_glue = }; static int -pcscp_match(struct device *parent, struct cfdata *match, +pcscp_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/pdcide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pdcide.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 pdcide.c --- sys/dev/pci/pdcide.c 9 Feb 2007 21:55:27 -0000 1.25 +++ sys/dev/pci/pdcide.c 9 Jul 2007 22:43:40 -0000 @@ -49,7 +49,7 @@ static int pdc20265_pci_intr(void *); static void pdc20262_dma_start(void *, int, int); static int pdc20262_dma_finish(void *, int, int, int); -static int pdcide_match(struct device *, struct cfdata *, void *); +static int pdcide_match(struct device *, cfdata_t, void *); static void pdcide_attach(struct device *, struct device *, void *); CFATTACH_DECL(pdcide, sizeof(struct pciide_softc), @@ -119,7 +119,7 @@ static const struct pciide_product_desc }; static int -pdcide_match(struct device *parent, struct cfdata *match, +pdcide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/pdcsata.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/pdcsata.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 pdcsata.c --- sys/dev/pci/pdcsata.c 9 Feb 2007 21:55:27 -0000 1.15 +++ sys/dev/pci/pdcsata.c 9 Jul 2007 22:43:40 -0000 @@ -71,7 +71,7 @@ static void pdc203xx_combo_probe(struct static int pdcsata_pci_intr(void *); static void pdcsata_do_reset(struct ata_channel *, int); -static int pdcsata_match(struct device *, struct cfdata *, void *); +static int pdcsata_match(struct device *, cfdata_t, void *); static void pdcsata_attach(struct device *, struct device *, void *); CFATTACH_DECL(pdcsata, sizeof(struct pciide_softc), @@ -201,7 +201,7 @@ static const struct pciide_product_desc }; static int -pdcsata_match(struct device *parent, struct cfdata *match, +pdcsata_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/piixide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/piixide.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 piixide.c --- sys/dev/pci/piixide.c 10 Mar 2007 06:01:43 -0000 1.37 +++ sys/dev/pci/piixide.c 9 Jul 2007 22:43:41 -0000 @@ -51,7 +51,7 @@ static void piixsata_chip_map(struct pci static int piix_dma_init(void *, int, int, void *, size_t, int); static void piixide_powerhook(int, void *); -static int piixide_match(struct device *, struct cfdata *, void *); +static int piixide_match(struct device *, cfdata_t, void *); static void piixide_attach(struct device *, struct device *, void *); static const struct pciide_product_desc pciide_intel_products[] = { @@ -231,7 +231,7 @@ CFATTACH_DECL(piixide, sizeof(struct pci piixide_match, piixide_attach, NULL, NULL); static int -piixide_match(struct device *parent, struct cfdata *match, +piixide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/piixpm.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/piixpm.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 piixpm.c --- sys/dev/pci/piixpm.c 4 Mar 2007 06:02:25 -0000 1.13 +++ sys/dev/pci/piixpm.c 9 Jul 2007 22:43:41 -0000 @@ -80,7 +80,7 @@ struct piixpm_softc { pcireg_t sc_devact[2]; }; -int piixpm_match(struct device *, struct cfdata *, void *); +int piixpm_match(struct device *, cfdata_t, void *); void piixpm_attach(struct device *, struct device *, void *); void piixpm_powerhook(int, void *); @@ -96,7 +96,7 @@ CFATTACH_DECL(piixpm, sizeof(struct piix piixpm_match, piixpm_attach, NULL, NULL); int -piixpm_match(struct device *parent, struct cfdata *match, +piixpm_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/ppb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ppb.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 ppb.c --- sys/dev/pci/ppb.c 16 Nov 2006 01:33:10 -0000 1.34 +++ sys/dev/pci/ppb.c 9 Jul 2007 22:43:41 -0000 @@ -49,7 +49,7 @@ struct ppb_softc { }; static int -ppbmatch(struct device *parent, struct cfdata *match, +ppbmatch(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/puc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/puc.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 puc.c --- sys/dev/pci/puc.c 16 Nov 2006 01:33:10 -0000 1.29 +++ sys/dev/pci/puc.c 9 Jul 2007 22:43:41 -0000 @@ -66,7 +66,6 @@ __KERNEL_RCSID(0, "$NetBSD: puc.c,v 1.29 #include #include -#include "locators.h" #include "opt_puccn.h" struct puc_softc { @@ -100,7 +99,7 @@ static int puc_print(void *, const char static const char *puc_port_type_name(int); static int -puc_match(struct device *parent, struct cfdata *match, +puc_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; @@ -145,6 +144,7 @@ puc_attach(struct device *parent, struct { struct puc_softc *sc = (struct puc_softc *)self; struct pci_attach_args *pa = aux; + prop_dictionary_t locs; struct puc_attach_args paa; pci_intr_handle_t intrhandle; pcireg_t subsys; @@ -154,7 +154,6 @@ puc_attach(struct device *parent, struct #ifdef PUCCN bus_space_handle_t ioh; #endif - int locs[PUCCF_NLOCS]; subsys = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); sc->sc_desc = puc_find_description(PCI_VENDOR(pa->pa_id), @@ -232,6 +231,14 @@ puc_attach(struct device *parent, struct printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname); return; } + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return; + } + /* * XXX the sub-devices establish the interrupts, for the * XXX following reasons: @@ -299,12 +306,18 @@ puc_attach(struct device *parent, struct (long)paa.t, (long)paa.h); #endif - locs[PUCCF_PORT] = i; + if (! prop_dictionary_set_uint32(locs, "port", i)) { + aprint_error("%s: could not set locator\n", + device_xname(self)); + break; + } /* and configure it */ sc->sc_ports[i].dev = config_found_sm_loc(self, "puc", locs, &paa, puc_print, config_stdsubmatch); } + + prop_object_release(locs); } CFATTACH_DECL(puc, sizeof(struct puc_softc), Index: sys/dev/pci/radeonfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/radeonfb.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 radeonfb.c --- sys/dev/pci/radeonfb.c 21 Mar 2007 20:54:30 -0000 1.14 +++ sys/dev/pci/radeonfb.c 9 Jul 2007 22:43:42 -0000 @@ -98,7 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v #include #include "opt_radeonfb.h" -static int radeonfb_match(struct device *, struct cfdata *, void *); +static int radeonfb_match(struct device *, cfdata_t, void *); static void radeonfb_attach(struct device *, struct device *, void *); static int radeonfb_ioctl(void *, void *, unsigned long, void *, int, struct lwp *); @@ -406,7 +406,7 @@ CFATTACH_DECL(radeonfb, sizeof (struct r radeonfb_match, radeonfb_attach, NULL, NULL); static int -radeonfb_match(struct device *parent, struct cfdata *match, void *aux) +radeonfb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; int i; Index: sys/dev/pci/rccide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/rccide.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 rccide.c --- sys/dev/pci/rccide.c 9 Feb 2007 21:55:27 -0000 1.16 +++ sys/dev/pci/rccide.c 9 Jul 2007 22:43:44 -0000 @@ -43,7 +43,7 @@ static void serverworks_setup_channel(st static int serverworks_pci_intr(void *); static int serverworkscsb6_pci_intr(void *); -static int rccide_match(struct device *, struct cfdata *, void *); +static int rccide_match(struct device *, cfdata_t, void *); static void rccide_attach(struct device *, struct device *, void *); CFATTACH_DECL(rccide, sizeof(struct pciide_softc), @@ -78,7 +78,7 @@ static const struct pciide_product_desc }; static int -rccide_match(struct device *parent, struct cfdata *match, +rccide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/satalink.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/satalink.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 satalink.c --- sys/dev/pci/satalink.c 9 Feb 2007 21:55:27 -0000 1.34 +++ sys/dev/pci/satalink.c 9 Jul 2007 22:43:44 -0000 @@ -263,7 +263,7 @@ static const struct { /* Interrupt steering bit in BA5[0x200]. */ #define IDEDMA_CMD_INT_STEER (1U << 1) -static int satalink_match(struct device *, struct cfdata *, void *); +static int satalink_match(struct device *, cfdata_t, void *); static void satalink_attach(struct device *, struct device *, void *); CFATTACH_DECL(satalink, sizeof(struct pciide_softc), @@ -303,7 +303,7 @@ static const struct pciide_product_desc }; static int -satalink_match(struct device *parent, struct cfdata *match, +satalink_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; @@ -527,14 +527,15 @@ sii3114_mapreg_dma(struct pciide_softc * struct pciide_channel *pc; int chan, reg; bus_size_t size; + uint64_t flags; sc->sc_wdcdev.dma_arg = sc; sc->sc_wdcdev.dma_init = pciide_dma_init; sc->sc_wdcdev.dma_start = pciide_dma_start; sc->sc_wdcdev.dma_finish = pciide_dma_finish; - if (device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)->cf_flags & - PCIIDE_OPTIONS_NODMA) { + flags = cfdata_flags(device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)); + if (flags & PCIIDE_OPTIONS_NODMA) { aprint_verbose( ", but unused (forced off by config file)"); sc->sc_dma_ok = 0; Index: sys/dev/pci/siop_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/siop_pci.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 siop_pci.c --- sys/dev/pci/siop_pci.c 16 Nov 2006 01:33:10 -0000 1.21 +++ sys/dev/pci/siop_pci.c 9 Jul 2007 22:43:44 -0000 @@ -57,7 +57,7 @@ struct siop_pci_softc { }; static int -siop_pci_match(struct device *parent, struct cfdata *match, +siop_pci_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/siside.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/siside.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 siside.c --- sys/dev/pci/siside.c 9 Feb 2007 21:55:27 -0000 1.22 +++ sys/dev/pci/siside.c 9 Jul 2007 22:43:45 -0000 @@ -49,7 +49,7 @@ static void sis96x_setup_channel(struct static int sis_hostbr_match(struct pci_attach_args *); static int sis_south_match(struct pci_attach_args *); -static int siside_match(struct device *, struct cfdata *, void *); +static int siside_match(struct device *, cfdata_t, void *); static void siside_attach(struct device *, struct device *, void *); CFATTACH_DECL(siside, sizeof(struct pciide_softc), @@ -84,7 +84,7 @@ static const struct pciide_product_desc }; static int -siside_match(struct device *parent, struct cfdata *match, +siside_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/slide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/slide.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 slide.c --- sys/dev/pci/slide.c 26 Apr 2007 19:47:04 -0000 1.18 +++ sys/dev/pci/slide.c 9 Jul 2007 22:43:45 -0000 @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: slide.c,v 1. static void sl82c105_chip_map(struct pciide_softc*, struct pci_attach_args*); static void sl82c105_setup_channel(struct ata_channel*); -static int slide_match(struct device *, struct cfdata *, void *); +static int slide_match(struct device *, cfdata_t, void *); static void slide_attach(struct device *, struct device *, void *); CFATTACH_DECL(slide, sizeof(struct pciide_softc), @@ -84,7 +84,7 @@ static const struct pciide_product_desc }; static int -slide_match(struct device *parent, struct cfdata *match, +slide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/stpcide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/stpcide.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 stpcide.c --- sys/dev/pci/stpcide.c 9 Feb 2007 21:55:27 -0000 1.17 +++ sys/dev/pci/stpcide.c 9 Jul 2007 22:43:45 -0000 @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: stpcide.c,v static void stpc_chip_map(struct pciide_softc *, struct pci_attach_args *); static void stpc_setup_channel(struct ata_channel *); -static int stpcide_match(struct device *, struct cfdata *, void *); +static int stpcide_match(struct device *, cfdata_t, void *); static void stpcide_attach(struct device *, struct device *, void *); const struct pciide_product_desc pciide_stpc_products[] = { @@ -59,7 +59,7 @@ CFATTACH_DECL(stpcide, sizeof(struct pci stpcide_match, stpcide_attach, NULL, NULL); static int -stpcide_match(struct device *parent, struct cfdata *match, +stpcide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/sv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/sv.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 sv.c --- sys/dev/pci/sv.c 4 Mar 2007 06:02:25 -0000 1.36 +++ sys/dev/pci/sv.c 9 Jul 2007 22:43:45 -0000 @@ -118,7 +118,7 @@ int svdebug = 0; #define DPRINTFN(n,x) #endif -static int sv_match(struct device *, struct cfdata *, void *); +static int sv_match(struct device *, cfdata_t, void *); static void sv_attach(struct device *, struct device *, void *); static int sv_intr(void *); @@ -268,7 +268,7 @@ sv_write_indirect(struct sv_softc *sc, u } static int -sv_match(struct device *parent, struct cfdata *match, +sv_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/svwsata.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/svwsata.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 svwsata.c --- sys/dev/pci/svwsata.c 30 Nov 2006 19:32:37 -0000 1.7 +++ sys/dev/pci/svwsata.c 9 Jul 2007 22:43:45 -0000 @@ -31,7 +31,7 @@ __KERNEL_RCSID(0, "$NetBSD: svwsata.c,v #include #include -static int svwsata_match(struct device *, struct cfdata *, void *); +static int svwsata_match(struct device *, cfdata_t, void *); static void svwsata_attach(struct device *, struct device *, void *); static void svwsata_chip_map(struct pciide_softc *, struct pci_attach_args *); @@ -70,7 +70,7 @@ static const struct pciide_product_desc }; static int -svwsata_match(struct device *parent, struct cfdata *match, +svwsata_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; @@ -193,7 +193,7 @@ svwsata_mapreg_dma(struct pciide_softc * sc->sc_wdcdev.dma_start = pciide_dma_start; sc->sc_wdcdev.dma_finish = pciide_dma_finish; - if (device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)->cf_flags & + if (cfdata_flags(device_cfdata(&sc->sc_wdcdev.sc_atac.atac_dev)) & PCIIDE_OPTIONS_NODMA) { aprint_normal( ", but unused (forced off by config file)"); Index: sys/dev/pci/tga.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/tga.c,v retrieving revision 1.66 diff -d -p -u -u -r1.66 tga.c --- sys/dev/pci/tga.c 4 Mar 2007 15:59:31 -0000 1.66 +++ sys/dev/pci/tga.c 9 Jul 2007 22:43:45 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: tga.c,v 1.66 #include #include -int tgamatch(struct device *, struct cfdata *, void *); +int tgamatch(struct device *, cfdata_t, void *); void tgaattach(struct device *, struct device *, void *); int tgaprint(void *, const char *); @@ -168,7 +168,7 @@ tga_cnmatch(iot, memt, pc, tag) int tgamatch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct pci_attach_args *pa = aux; Index: sys/dev/pci/trm.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/trm.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 trm.c --- sys/dev/pci/trm.c 4 Mar 2007 06:02:25 -0000 1.26 +++ sys/dev/pci/trm.c 9 Jul 2007 22:43:46 -0000 @@ -309,7 +309,7 @@ struct trm_softc { #define SCSI_BUS_RST_DETECT 0xFE /* SCSI Bus Reset detected */ #define SCSI_SEL_TIMEOUT 0xFF /* Selection Timeout */ -static int trm_probe(struct device *, struct cfdata *, void *); +static int trm_probe(struct device *, cfdata_t, void *); static void trm_attach(struct device *, struct device *, void *); static int trm_init(struct trm_softc *); @@ -366,7 +366,7 @@ static const uint8_t trm_clock_period[] #define NPERIOD (sizeof(trm_clock_period)/sizeof(trm_clock_period[0])) static int -trm_probe(struct device *parent, struct cfdata *match, +trm_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/twa.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/twa.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 twa.c --- sys/dev/pci/twa.c 4 Mar 2007 06:02:26 -0000 1.17 +++ sys/dev/pci/twa.c 9 Jul 2007 22:43:47 -0000 @@ -113,8 +113,6 @@ __KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.17 #include -#include "locators.h" - #define PCI_CBIO 0x10 static int twa_fetch_aen(struct twa_softc *); @@ -129,7 +127,7 @@ static int twa_init_connection(struct tw uint16_t, uint16_t, uint16_t, uint16_t, uint16_t *, uint16_t *, uint16_t *, uint16_t *, uint32_t *); static int twa_intr(void *); -static int twa_match(struct device *, struct cfdata *, void *); +static int twa_match(struct device *, cfdata_t, void *); static int twa_reset(struct twa_softc *); static int twa_print(void *, const char *); @@ -439,7 +437,7 @@ twa_request_wait_handler(struct twa_requ } static int -twa_match(struct device *parent, struct cfdata *cfdata, +twa_match(struct device *parent, cfdata_t cfdata, void *aux) { int i; @@ -953,9 +951,16 @@ twa_request_bus_scan(struct twa_softc *s struct twa_drive *td; struct twa_request *tr; struct twa_attach_args twaa; - int locs[TWACF_NLOCS]; + prop_dictionary_t locs; int s, unit; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->twa_dv)); + return (ENOMEM); + } + s = splbio(); for (unit = 0; unit < TWA_MAX_UNITS; unit++) { @@ -989,7 +994,13 @@ twa_request_bus_scan(struct twa_softc *s twa_recompute_openings(sc); - locs[TWACF_UNIT] = unit; + if (! prop_dictionary_set_uint32(locs, "unit", + unit)) { + aprint_error("%s: could not set " + "locator\n", + device_xname(&sc->twa_dv)); + break; + } sc->sc_units[unit].td_dev = config_found_sm_loc(&sc->twa_dv, "twa", @@ -1012,6 +1023,7 @@ twa_request_bus_scan(struct twa_softc *s } splx(s); + prop_object_release(locs); return (0); } Index: sys/dev/pci/twavar.h =================================================================== RCS file: /cvsroot/src/sys/dev/pci/twavar.h,v retrieving revision 1.7 diff -d -p -u -u -r1.7 twavar.h --- sys/dev/pci/twavar.h 4 Mar 2007 06:02:26 -0000 1.7 +++ sys/dev/pci/twavar.h 9 Jul 2007 22:43:47 -0000 @@ -39,8 +39,6 @@ #ifndef _PCI_TWAVAR_H_ #define _PCI_TWAVAR_H_ -#include "locators.h" - struct twa_callbacks { void (*tcb_openings)(struct device *, int); }; @@ -200,8 +198,6 @@ struct twa_attach_args { int twaa_unit; }; -#define twaacf_unit cf_loc[TWACF_UNIT] - struct twa_request *twa_get_request(struct twa_softc *, int); struct twa_request *twa_get_request_wait(struct twa_softc *, int); int twa_map_request(struct twa_request *); Index: sys/dev/pci/twe.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/twe.c,v retrieving revision 1.83 diff -d -p -u -u -r1.83 twe.c --- sys/dev/pci/twe.c 4 Mar 2007 06:02:26 -0000 1.83 +++ sys/dev/pci/twe.c 9 Jul 2007 22:43:48 -0000 @@ -99,8 +99,6 @@ __KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.83 #include #include -#include "locators.h" - #define PCI_CBIO 0x10 static int twe_aen_get(struct twe_softc *, uint16_t *); @@ -111,7 +109,7 @@ static uint16_t twe_aen_dequeue(struct t static void twe_attach(struct device *, struct device *, void *); static int twe_init_connection(struct twe_softc *); static int twe_intr(void *); -static int twe_match(struct device *, struct cfdata *, void *); +static int twe_match(struct device *, cfdata_t, void *); static int twe_param_set(struct twe_softc *, int, int, size_t, void *); static void twe_poll(struct twe_softc *); static int twe_print(void *, const char *); @@ -296,7 +294,7 @@ twe_outl(struct twe_softc *sc, int off, * Match a supported board. */ static int -twe_match(struct device *parent, struct cfdata *cfdata, +twe_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; @@ -545,6 +543,7 @@ twe_recompute_openings(struct twe_softc static int twe_add_unit(struct twe_softc *sc, int unit) { + prop_dictionary_t locs; struct twe_param *dtp, *atp; struct twe_array_descriptor *ad; struct twe_drive *td; @@ -553,17 +552,24 @@ twe_add_unit(struct twe_softc *sc, int u int rv; uint16_t dsize; uint8_t newtype, newstripe; - int locs[TWECF_NLOCS]; if (unit < 0 || unit >= TWE_MAX_UNITS) return (EINVAL); + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dv)); + return (ENOMEM); + } + /* Find attached units. */ rv = twe_param_get(sc, TWE_PARAM_UNITSUMMARY, TWE_PARAM_UNITSUMMARY_Status, TWE_MAX_UNITS, NULL, &dtp); if (rv != 0) { aprint_error("%s: error %d fetching unit summary\n", sc->sc_dv.dv_xname, rv); + prop_object_release(locs); return (rv); } @@ -641,13 +647,19 @@ twe_add_unit(struct twe_softc *sc, int u twea.twea_unit = unit; - locs[TWECF_UNIT] = unit; + if (! prop_dictionary_set_uint32(locs, "unit", unit)) { + aprint_error("%s: could not set locator\n", + device_xname(&sc->sc_dv)); + rv = ENOMEM; + goto out; + } td->td_dev = config_found_sm_loc(&sc->sc_dv, "twe", locs, &twea, twe_print, config_stdsubmatch); rv = 0; out: + prop_object_release(locs); free(dtp, M_DEVBUF); return (rv); } Index: sys/dev/pci/ubsec.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ubsec.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 ubsec.c --- sys/dev/pci/ubsec.c 4 Mar 2007 06:02:26 -0000 1.12 +++ sys/dev/pci/ubsec.c 9 Jul 2007 22:43:49 -0000 @@ -79,7 +79,7 @@ /* * Prototypes and count for the pci_device structure */ -static int ubsec_probe(struct device *, struct cfdata *, void *); +static int ubsec_probe(struct device *, cfdata_t, void *); static void ubsec_attach(struct device *, struct device *, void *); static void ubsec_reset_board(struct ubsec_softc *); static void ubsec_init_board(struct ubsec_softc *); @@ -284,7 +284,7 @@ ubsec_lookup(const struct pci_attach_arg } static int -ubsec_probe(struct device *parent, struct cfdata *match, +ubsec_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/uhci_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/uhci_pci.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 uhci_pci.c --- sys/dev/pci/uhci_pci.c 10 Dec 2006 05:14:42 -0000 1.35 +++ sys/dev/pci/uhci_pci.c 9 Jul 2007 22:43:49 -0000 @@ -78,7 +78,7 @@ struct uhci_pci_softc { }; static int -uhci_pci_match(struct device *parent, struct cfdata *match, +uhci_pci_match(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; Index: sys/dev/pci/unichromefb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/unichromefb.c,v retrieving revision 1.7 diff -d -p -u -u -r1.7 unichromefb.c --- sys/dev/pci/unichromefb.c 23 Mar 2007 22:17:30 -0000 1.7 +++ sys/dev/pci/unichromefb.c 9 Jul 2007 22:43:50 -0000 @@ -126,7 +126,7 @@ struct unichromefb_softc { int sc_accel; }; -static int unichromefb_match(struct device *, struct cfdata *, void *); +static int unichromefb_match(struct device *, cfdata_t, void *); static void unichromefb_attach(struct device *, struct device *, void *); static int unichromefb_drm_print(void *, const char *); @@ -233,7 +233,7 @@ CFATTACH_DECL(unichromefb, sizeof(struct unichromefb_match, unichromefb_attach, NULL, NULL); static int -unichromefb_match(struct device *parent, struct cfdata *match, void *opaque) +unichromefb_match(struct device *parent, cfdata_t cfdata, void *opaque) { struct pci_attach_args *pa; Index: sys/dev/pci/vga_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/vga_pci.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 vga_pci.c --- sys/dev/pci/vga_pci.c 20 Mar 2007 18:05:31 -0000 1.32 +++ sys/dev/pci/vga_pci.c 9 Jul 2007 22:43:50 -0000 @@ -71,7 +71,7 @@ struct vga_pci_softc { struct vga_bar sc_rom; }; -static int vga_pci_match(struct device *, struct cfdata *, void *); +static int vga_pci_match(struct device *, cfdata_t, void *); static void vga_pci_attach(struct device *, struct device *, void *); static int vga_pci_lookup_quirks(struct pci_attach_args *); @@ -120,7 +120,7 @@ vga_pci_lookup_quirks(struct pci_attach_ } static int -vga_pci_match(struct device *parent, struct cfdata *match, +vga_pci_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/viaenv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/viaenv.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 viaenv.c --- sys/dev/pci/viaenv.c 18 Feb 2007 23:32:52 -0000 1.20 +++ sys/dev/pci/viaenv.c 9 Jul 2007 22:43:51 -0000 @@ -92,7 +92,7 @@ static const struct envsys_range viaenv_ }; /* autoconf(9) glue */ -static int viaenv_match(struct device *, struct cfdata *, void *); +static int viaenv_match(struct device *, cfdata_t, void *); static void viaenv_attach(struct device *, struct device *, void *); CFATTACH_DECL(viaenv, sizeof(struct viaenv_softc), @@ -107,7 +107,7 @@ static int val_to_rpm(unsigned int, int) static long val_to_uV(unsigned int, int); static int -viaenv_match(struct device *parent, struct cfdata *match, void *aux) +viaenv_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/viaide.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/viaide.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 viaide.c --- sys/dev/pci/viaide.c 27 Mar 2007 00:04:04 -0000 1.41 +++ sys/dev/pci/viaide.c 9 Jul 2007 22:43:51 -0000 @@ -58,7 +58,7 @@ static void via_sata_chip_map_new(struct struct pci_attach_args *); static void via_setup_channel(struct ata_channel *); -static int viaide_match(struct device *, struct cfdata *, void *); +static int viaide_match(struct device *, cfdata_t, void *); static void viaide_attach(struct device *, struct device *, void *); static const struct pciide_product_desc * viaide_lookup(pcireg_t); @@ -308,7 +308,7 @@ viaide_lookup(pcireg_t id) } static int -viaide_match(struct device *parent, struct cfdata *match, +viaide_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/voodoofb.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/voodoofb.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 voodoofb.c --- sys/dev/pci/voodoofb.c 27 Mar 2007 22:44:42 -0000 1.9 +++ sys/dev/pci/voodoofb.c 9 Jul 2007 22:43:51 -0000 @@ -122,7 +122,7 @@ static struct vcons_screen voodoofb_cons extern const u_char rasops_cmap[768]; -static int voodoofb_match(struct device *, struct cfdata *, void *); +static int voodoofb_match(struct device *, cfdata_t, void *); static void voodoofb_attach(struct device *, struct device *, void *); static int voodoofb_drm_print(void *, const char *); @@ -292,7 +292,7 @@ voodoofb_wait_idle(struct voodoofb_softc } static int -voodoofb_match(struct device *parent, struct cfdata *match, void *aux) +voodoofb_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; Index: sys/dev/pci/weasel_pci.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/weasel_pci.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 weasel_pci.c --- sys/dev/pci/weasel_pci.c 16 Nov 2006 01:33:10 -0000 1.9 +++ sys/dev/pci/weasel_pci.c 9 Jul 2007 22:43:51 -0000 @@ -91,7 +91,7 @@ static int weasel_pci_wdog_disarm(struct static int weasel_pci_wdog_query_state(struct weasel_softc *); static int -weasel_pci_match(struct device *parent, struct cfdata *cf, +weasel_pci_match(struct device *parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/yds.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/yds.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 yds.c --- sys/dev/pci/yds.c 16 Nov 2006 01:33:10 -0000 1.37 +++ sys/dev/pci/yds.c 9 Jul 2007 22:43:52 -0000 @@ -88,7 +88,7 @@ int ydsdebug = 0; # define YDS_INPUT_SLOT 1 /* ADC slot */ #endif -static int yds_match(struct device *, struct cfdata *, void *); +static int yds_match(struct device *, cfdata_t, void *); static void yds_attach(struct device *, struct device *, void *); static int yds_intr(void *); @@ -525,7 +525,7 @@ yds_disable_dsp(struct yds_softc *sc) } static int -yds_match(struct device *parent, struct cfdata *match, +yds_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa; Index: sys/dev/pci/bktr/bktr_os.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/bktr/bktr_os.c,v retrieving revision 1.46 diff -d -p -u -u -r1.46 bktr_os.c --- sys/dev/pci/bktr/bktr_os.c 4 Mar 2007 06:02:27 -0000 1.46 +++ sys/dev/pci/bktr/bktr_os.c 9 Jul 2007 22:43:55 -0000 @@ -1328,7 +1328,7 @@ static int bktr_intr(void *arg) { retur static int bktr_probe(struct device *, void *, void *); #else -static int bktr_probe(struct device *, struct cfdata *, void *); +static int bktr_probe(struct device *, cfdata_t, void *); #endif static void bktr_attach(struct device *, struct device *, void *); @@ -1359,7 +1359,7 @@ static struct radio_hw_if bktr_hw_if = { #endif int -bktr_probe(struct device *parent, struct cfdata *match, +bktr_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct pci_attach_args *pa = aux; Index: sys/dev/pci/drm/i915_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/i915_drv.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 i915_drv.c --- sys/dev/pci/drm/i915_drv.c 20 Mar 2007 18:05:32 -0000 1.1 +++ sys/dev/pci/drm/i915_drv.c 9 Jul 2007 22:43:56 -0000 @@ -122,7 +122,7 @@ MODULE_DEPEND(i915, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -i915drm_probe(struct device *parent, struct cfdata *match, void *aux) +i915drm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, i915_pciidlist); Index: sys/dev/pci/drm/mach64_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/mach64_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 mach64_drv.c --- sys/dev/pci/drm/mach64_drv.c 20 Mar 2007 22:12:14 -0000 1.2 +++ sys/dev/pci/drm/mach64_drv.c 9 Jul 2007 22:43:56 -0000 @@ -120,7 +120,7 @@ MODULE_DEPEND(mach64, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -mach64drm_probe(struct device *parent, struct cfdata *match, void *aux) +mach64drm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, mach64_pciidlist); Index: sys/dev/pci/drm/mga_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/mga_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 mga_drv.c --- sys/dev/pci/drm/mga_drv.c 29 Mar 2007 11:42:39 -0000 1.2 +++ sys/dev/pci/drm/mga_drv.c 9 Jul 2007 22:43:58 -0000 @@ -175,7 +175,7 @@ MODULE_DEPEND(mga, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -mgadrm_probe(struct device *parent, struct cfdata *match, void *aux) +mgadrm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, mga_pciidlist); Index: sys/dev/pci/drm/r128_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/r128_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 r128_drv.c --- sys/dev/pci/drm/r128_drv.c 29 Mar 2007 13:09:48 -0000 1.2 +++ sys/dev/pci/drm/r128_drv.c 9 Jul 2007 22:43:59 -0000 @@ -121,7 +121,7 @@ MODULE_DEPEND(r128, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -r128drm_probe(struct device *parent, struct cfdata *match, void *aux) +r128drm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, r128_pciidlist); Index: sys/dev/pci/drm/radeon_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/radeon_drv.c,v retrieving revision 1.4 diff -d -p -u -u -r1.4 radeon_drv.c --- sys/dev/pci/drm/radeon_drv.c 22 Mar 2007 15:17:59 -0000 1.4 +++ sys/dev/pci/drm/radeon_drv.c 9 Jul 2007 22:44:01 -0000 @@ -126,7 +126,7 @@ MODULE_DEPEND(radeon, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -radeondrm_probe(struct device *parent, struct cfdata *match, void *aux) +radeondrm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, radeon_pciidlist); Index: sys/dev/pci/drm/savage_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/savage_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 savage_drv.c --- sys/dev/pci/drm/savage_drv.c 29 Mar 2007 13:09:48 -0000 1.2 +++ sys/dev/pci/drm/savage_drv.c 9 Jul 2007 22:44:03 -0000 @@ -111,7 +111,7 @@ MODULE_DEPEND(savage, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -savagedrm_probe(struct device *parent, struct cfdata *match, void *aux) +savagedrm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, savage_pciidlist); Index: sys/dev/pci/drm/sis_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/sis_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 sis_drv.c --- sys/dev/pci/drm/sis_drv.c 29 Mar 2007 13:09:48 -0000 1.2 +++ sys/dev/pci/drm/sis_drv.c 9 Jul 2007 22:44:03 -0000 @@ -104,7 +104,7 @@ MODULE_DEPEND(sisdrm, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -sisdrm_probe(struct device *parent, struct cfdata *match, void *aux) +sisdrm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, sis_pciidlist); Index: sys/dev/pci/drm/tdfx_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/tdfx_drv.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 tdfx_drv.c --- sys/dev/pci/drm/tdfx_drv.c 24 Mar 2007 20:33:08 -0000 1.2 +++ sys/dev/pci/drm/tdfx_drv.c 9 Jul 2007 22:44:03 -0000 @@ -105,7 +105,7 @@ MODULE_DEPEND(tdfx, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) static int -tdfxdrm_probe(struct device *parent, struct cfdata *match, void *aux) +tdfxdrm_probe(struct device *parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; return drm_probe(pa, tdfx_pciidlist); Index: sys/dev/pci/drm/via_drv.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/drm/via_drv.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 via_drv.c --- sys/dev/pci/drm/via_drv.c 23 Mar 2007 14:58:56 -0000 1.1 +++ sys/dev/pci/drm/via_drv.c 9 Jul 2007 22:44:04 -0000 @@ -74,7 +74,7 @@ static void viadrm_configure(drm_device_ } static int -viadrm_probe(struct device *parent, struct cfdata *match, void *opaque) +viadrm_probe(struct device *parent, cfdata_t match, void *opaque) { struct pci_attach_args *pa = opaque; return drm_probe(pa, via_pciidlist); Index: sys/dev/pckbport/pckbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/pckbport/pckbd.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 pckbd.c --- sys/dev/pckbport/pckbd.c 4 Mar 2007 06:02:27 -0000 1.15 +++ sys/dev/pckbport/pckbd.c 9 Jul 2007 22:44:05 -0000 @@ -96,8 +96,6 @@ __KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1. #include #include -#include "locators.h" - #include "opt_pckbd_layout.h" #include "opt_pckbd_cnattach_may_fail.h" #include "opt_wsdisplay_compat.h" @@ -133,7 +131,7 @@ struct pckbd_softc { static int pckbd_is_console(pckbport_tag_t, pckbport_slot_t); static void pckbd_powerhook(int, void *); -int pckbdprobe(struct device *, struct cfdata *, void *); +int pckbdprobe(struct device *, cfdata_t, void *); void pckbdattach(struct device *, struct device *, void *); CFATTACH_DECL(pckbd, sizeof(struct pckbd_softc), @@ -304,7 +302,7 @@ pckbd_powerhook(int why, void *opaque) * these are both bad jokes */ int -pckbdprobe(struct device *parent, struct cfdata *cf, void *aux) +pckbdprobe(struct device *parent, cfdata_t cf, void *aux) { struct pckbport_attach_args *pa = aux; int res; @@ -317,7 +315,7 @@ pckbdprobe(struct device *parent, struct * wired in the config file. */ if ((pa->pa_slot != PCKBPORT_KBD_SLOT) && - (cf->cf_loc[PCKBPORTCF_SLOT] == PCKBPORTCF_SLOT_DEFAULT)) + !locator_defined(cfdata_locators(cf), "slot")) return 0; /* Flush any garbage. */ Index: sys/dev/pckbport/pckbport.c =================================================================== RCS file: /cvsroot/src/sys/dev/pckbport/pckbport.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 pckbport.c --- sys/dev/pckbport/pckbport.c 3 Sep 2006 13:23:15 -0000 1.9 +++ sys/dev/pckbport/pckbport.c 9 Jul 2007 22:44:05 -0000 @@ -43,8 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: pckbport.c,v #include #include -#include "locators.h" - #include "pckbd.h" #if (NPCKBD > 0) #include @@ -133,10 +131,17 @@ pckbport_attach_slot(struct device *dev, pckbport_slot_t slot) { struct pckbport_attach_args pa; + prop_dictionary_t locs; void *sdata; struct device *found; int alloced = 0; - int locs[PCKBPORTCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(dev)); + return (NULL); + } pa.pa_tag = t; pa.pa_slot = slot; @@ -146,14 +151,18 @@ pckbport_attach_slot(struct device *dev, M_DEVBUF, M_NOWAIT); if (sdata == NULL) { printf("%s: no memory\n", dev->dv_xname); - return 0; + return (NULL); } t->t_slotdata[slot] = sdata; pckbport_init_slotdata(t->t_slotdata[slot]); alloced++; } - locs[PCKBPORTCF_SLOT] = slot; + if (! prop_dictionary_set_uint32(locs, "slot", slot)) { + aprint_error("%s: could not set locator\n", device_xname(dev)); + prop_object_release(locs); + return (NULL); + } found = config_found_sm_loc(dev, "pckbport", locs, &pa, pckbportprint, config_stdsubmatch); @@ -163,6 +172,7 @@ pckbport_attach_slot(struct device *dev, t->t_slotdata[slot] = NULL; } + prop_object_release(locs); return found; } Index: sys/dev/pckbport/pms.c =================================================================== RCS file: /cvsroot/src/sys/dev/pckbport/pms.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 pms.c --- sys/dev/pckbport/pms.c 4 Mar 2007 06:02:27 -0000 1.17 +++ sys/dev/pckbport/pms.c 9 Jul 2007 22:44:05 -0000 @@ -71,7 +71,7 @@ const struct pms_protocol pms_protocols[ }; -int pmsprobe(struct device *, struct cfdata *, void *); +int pmsprobe(struct device *, cfdata_t, void *); void pmsattach(struct device *, struct device *, void *); void pmsinput(void *, int); @@ -130,7 +130,7 @@ pms_protocol(pckbport_tag_t tag, pckbpor } int -pmsprobe(struct device *parent, struct cfdata *match, +pmsprobe(struct device *parent, cfdata_t cfdata, void *aux) { struct pckbport_attach_args *pa = aux; Index: sys/dev/pcmcia/aic_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/aic_pcmcia.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 aic_pcmcia.c --- sys/dev/pcmcia/aic_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.35 +++ sys/dev/pcmcia/aic_pcmcia.c 9 Jul 2007 22:44:06 -0000 @@ -62,7 +62,7 @@ struct aic_pcmcia_softc { #define AIC_PCMCIA_ATTACHED 3 }; -int aic_pcmcia_match(struct device *, struct cfdata *, void *); +int aic_pcmcia_match(struct device *, cfdata_t, void *); int aic_pcmcia_validate_config(struct pcmcia_config_entry *); void aic_pcmcia_attach(struct device *, struct device *, void *); int aic_pcmcia_detach(struct device *, int); @@ -85,8 +85,7 @@ const size_t aic_pcmcia_nproducts = sizeof(aic_pcmcia_products) / sizeof(aic_pcmcia_products[0]); int -aic_pcmcia_match(struct device *parent, struct cfdata *match, - void *aux) +aic_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/bt3c.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/bt3c.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 bt3c.c --- sys/dev/pcmcia/bt3c.c 27 Dec 2006 22:07:17 -0000 1.9 +++ sys/dev/pcmcia/bt3c.c 9 Jul 2007 22:44:06 -0000 @@ -126,7 +126,7 @@ struct bt3c_softc { /* sc_flags */ #define BT3C_SLEEPING (1 << 0) /* but not with the fishes */ -static int bt3c_match(struct device *, struct cfdata *, void *); +static int bt3c_match(struct device *, cfdata_t, void *); static void bt3c_attach(struct device *, struct device *, void *); static int bt3c_detach(struct device *, int); static int bt3c_activate(struct device *, enum devact); @@ -553,17 +553,17 @@ hex(const uint8_t *p, int n) static int bt3c_load_firmware(struct bt3c_softc *sc) { + device_t self = &sc->sc_dev; uint8_t *buf, *line, *next, *p; int32_t addr, data; int err, sum, len; firmware_handle_t fh; size_t size; - err = firmware_open(sc->sc_dev.dv_cfdata->cf_name, - BT3C_FIRMWARE_FILE, &fh); + err = firmware_open(device_driver(self), BT3C_FIRMWARE_FILE, &fh); if (err) { - printf("%s: Cannot open firmware %s/%s\n", sc->sc_dev.dv_xname, - sc->sc_dev.dv_cfdata->cf_name, BT3C_FIRMWARE_FILE); + printf("%s: Cannot open firmware %s/%s\n", device_xname(self), + device_driver(self), BT3C_FIRMWARE_FILE); return err; } @@ -571,7 +571,7 @@ bt3c_load_firmware(struct bt3c_softc *sc #ifdef DIAGNOSTIC if (size > 10 * 1024) { /* sanity check */ printf("%s: firmware file seems WAY too big!\n", - sc->sc_dev.dv_xname); + device_xname(self)); firmware_close(fh); return EFBIG; } @@ -824,7 +824,7 @@ bt3c_disable(struct hci_unit *unit) */ static int -bt3c_match(struct device *parent, struct cfdata *match, +bt3c_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/com_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/com_pcmcia.c,v retrieving revision 1.54 diff -d -p -u -u -r1.54 com_pcmcia.c --- sys/dev/pcmcia/com_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.54 +++ sys/dev/pcmcia/com_pcmcia.c 9 Jul 2007 22:44:06 -0000 @@ -96,7 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: com_pcmcia.c #include -int com_pcmcia_match(struct device *, struct cfdata *, void *); +int com_pcmcia_match(struct device *, cfdata_t, void *); int com_pcmcia_validate_config(struct pcmcia_config_entry *); void com_pcmcia_attach(struct device *, struct device *, void *); int com_pcmcia_detach(struct device *, int); @@ -124,7 +124,7 @@ static const size_t com_pcmcia_nproducts sizeof(com_pcmcia_products) / sizeof(com_pcmcia_products[0]); int -com_pcmcia_match(struct device *parent, struct cfdata *match, +com_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { int comportmask; Index: sys/dev/pcmcia/esl_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/esl_pcmcia.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 esl_pcmcia.c --- sys/dev/pcmcia/esl_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.17 +++ sys/dev/pcmcia/esl_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -61,7 +61,7 @@ static const struct pcmcia_product esl_p static const size_t esl_pcmcia_nproducts = sizeof(esl_pcmcia_products) / sizeof(esl_pcmcia_products[0]); -int esl_pcmcia_match(struct device *, struct cfdata *, void *); +int esl_pcmcia_match(struct device *, cfdata_t, void *); int esl_pcmcia_validate_config(struct pcmcia_config_entry *); void esl_pcmcia_attach(struct device *, struct device *, void *); int esl_pcmcia_detach(struct device *, int); @@ -73,7 +73,7 @@ CFATTACH_DECL(esl_pcmcia, sizeof(struct esl_pcmcia_match, esl_pcmcia_attach, esl_pcmcia_detach, NULL); int -esl_pcmcia_match(struct device *parent, struct cfdata *match, +esl_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa; Index: sys/dev/pcmcia/esp_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/esp_pcmcia.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 esp_pcmcia.c --- sys/dev/pcmcia/esp_pcmcia.c 4 Mar 2007 06:02:27 -0000 1.31 +++ sys/dev/pcmcia/esp_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -82,7 +82,7 @@ struct esp_pcmcia_softc { #define ESP_PCMCIA_ATTACHED 3 }; -int esp_pcmcia_match(struct device *, struct cfdata *, void *); +int esp_pcmcia_match(struct device *, cfdata_t, void *); int esp_pcmcia_validate_config(struct pcmcia_config_entry *); void esp_pcmcia_attach(struct device *, struct device *, void *); void esp_pcmcia_init(struct esp_pcmcia_softc *); @@ -133,7 +133,7 @@ const size_t esp_pcmcia_nproducts = sizeof(esp_pcmcia_products) / sizeof(esp_pcmcia_products[0]); int -esp_pcmcia_match(struct device *parent, struct cfdata *match, +esp_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/fdc_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/fdc_pcmcia.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 fdc_pcmcia.c --- sys/dev/pcmcia/fdc_pcmcia.c 11 Dec 2005 12:23:23 -0000 1.17 +++ sys/dev/pcmcia/fdc_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -64,7 +64,7 @@ struct fdc_pcmcia_softc { struct pcmcia_function *sc_pf; /* our PCMCIA function */ }; -int fdc_pcmcia_match(struct device *, struct cfdata *, void *); +int fdc_pcmcia_match(struct device *, cfdata_t, void *); int fdc_pcmcia_validate_config(struct pcmcia_config_entry *); void fdc_pcmcia_attach(struct device *, struct device *, void *); static void fdc_conf(struct fdc_softc *); @@ -136,7 +136,7 @@ fdc_conf(fdc) int fdc_pcmcia_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_an_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_an_pcmcia.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 if_an_pcmcia.c --- sys/dev/pcmcia/if_an_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.31 +++ sys/dev/pcmcia/if_an_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -69,7 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_an_pcmcia #include #include -static int an_pcmcia_match(struct device *, struct cfdata *, void *); +static int an_pcmcia_match(struct device *, cfdata_t, void *); static int an_pcmcia_validate_config(struct pcmcia_config_entry *); static void an_pcmcia_attach(struct device *, struct device *, void *); static int an_pcmcia_detach(struct device *, int); @@ -105,7 +105,7 @@ static const size_t an_pcmcia_nproducts sizeof(an_pcmcia_products) / sizeof(an_pcmcia_products[0]); static int -an_pcmcia_match(struct device *parent, struct cfdata *match, +an_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_awi_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_awi_pcmcia.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 if_awi_pcmcia.c --- sys/dev/pcmcia/if_awi_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.37 +++ sys/dev/pcmcia/if_awi_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_awi_pcmci #include #include -static int awi_pcmcia_match(struct device *, struct cfdata *, void *); +static int awi_pcmcia_match(struct device *, cfdata_t, void *); static int awi_pcmcia_validate_config(struct pcmcia_config_entry *); static void awi_pcmcia_attach(struct device *, struct device *, void *); static int awi_pcmcia_detach(struct device *, int); @@ -159,7 +159,7 @@ awi_pcmcia_disable(sc) } static int -awi_pcmcia_match(struct device *parent, struct cfdata *match, +awi_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_cnw.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_cnw.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 if_cnw.c --- sys/dev/pcmcia/if_cnw.c 4 Mar 2007 06:02:27 -0000 1.41 +++ sys/dev/pcmcia/if_cnw.c 9 Jul 2007 22:44:07 -0000 @@ -185,7 +185,7 @@ int cnw_skey = CNW_SCRAMBLEKEY; /* Scra */ #define MEMORY_MAPPED -int cnw_match(struct device *, struct cfdata *, void *); +int cnw_match(struct device *, cfdata_t, void *); void cnw_attach(struct device *, struct device *, void *); int cnw_detach(struct device *, int); @@ -479,7 +479,7 @@ cnw_disable(sc) * Match the hardware we handle. */ int -cnw_match(struct device *parent, struct cfdata *match, +cnw_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_cs_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_cs_pcmcia.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 if_cs_pcmcia.c --- sys/dev/pcmcia/if_cs_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.14 +++ sys/dev/pcmcia/if_cs_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_pcmcia struct cs_pcmcia_softc; -static int cs_pcmcia_match(struct device *, struct cfdata *, void *); +static int cs_pcmcia_match(struct device *, cfdata_t, void *); static int cs_pcmcia_validate_config(struct pcmcia_config_entry *); static void cs_pcmcia_attach(struct device *, struct device *, void *); static int cs_pcmcia_detach(struct device *, int); @@ -78,7 +78,7 @@ CFATTACH_DECL(cs_pcmcia, sizeof(struct c cs_pcmcia_match, cs_pcmcia_attach, cs_pcmcia_detach, cs_activate); static int -cs_pcmcia_match(struct device *parent, struct cfdata *match, +cs_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_ep_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_ep_pcmcia.c,v retrieving revision 1.58 diff -d -p -u -u -r1.58 if_ep_pcmcia.c --- sys/dev/pcmcia/if_ep_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.58 +++ sys/dev/pcmcia/if_ep_pcmcia.c 9 Jul 2007 22:44:07 -0000 @@ -97,7 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ep_pcmcia #include #include -int ep_pcmcia_match(struct device *, struct cfdata *, void *); +int ep_pcmcia_match(struct device *, cfdata_t, void *); void ep_pcmcia_attach(struct device *, struct device *, void *); int ep_pcmcia_detach(struct device *, int); @@ -158,7 +158,7 @@ const size_t ep_pcmcia_nproducts = sizeof(ep_pcmcia_products) / sizeof(ep_pcmcia_products[0]); int -ep_pcmcia_match(struct device *parent, struct cfdata *match, +ep_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_mbe_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_mbe_pcmcia.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 if_mbe_pcmcia.c --- sys/dev/pcmcia/if_mbe_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.41 +++ sys/dev/pcmcia/if_mbe_pcmcia.c 9 Jul 2007 22:44:08 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_mbe_pcmci #include #include -int mbe_pcmcia_match(struct device *, struct cfdata *, void *); +int mbe_pcmcia_match(struct device *, cfdata_t, void *); int mbe_pcmcia_validate_config(struct pcmcia_config_entry *); void mbe_pcmcia_attach(struct device *, struct device *, void *); int mbe_pcmcia_detach(struct device *, int); @@ -145,7 +145,7 @@ static const size_t mbe_pcmcia_nproducts sizeof(mbe_pcmcia_products) / sizeof(mbe_pcmcia_products[0]); int -mbe_pcmcia_match(struct device *parent, struct cfdata *match, +mbe_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_ne_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_ne_pcmcia.c,v retrieving revision 1.149 diff -d -p -u -u -r1.149 if_ne_pcmcia.c --- sys/dev/pcmcia/if_ne_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.149 +++ sys/dev/pcmcia/if_ne_pcmcia.c 9 Jul 2007 22:44:08 -0000 @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ne_pcmcia #include #include -int ne_pcmcia_match(struct device *, struct cfdata *, void *); +int ne_pcmcia_match(struct device *, cfdata_t, void *); int ne_pcmcia_validate_config(struct pcmcia_config_entry *); void ne_pcmcia_attach(struct device *, struct device *, void *); int ne_pcmcia_detach(struct device *, int); @@ -541,7 +541,7 @@ match: int -ne_pcmcia_match(struct device *parent, struct cfdata *match, +ne_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_ray.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_ray.c,v retrieving revision 1.64 diff -d -p -u -u -r1.64 if_ray.c --- sys/dev/pcmcia/if_ray.c 4 Mar 2007 06:02:27 -0000 1.64 +++ sys/dev/pcmcia/if_ray.c 9 Jul 2007 22:44:09 -0000 @@ -307,7 +307,7 @@ static int ray_intr(void *); static void ray_intr_start(struct ray_softc *); static int ray_ioctl(struct ifnet *, u_long, void *); static int ray_issue_cmd(struct ray_softc *, bus_size_t, u_int); -static int ray_match(struct device *, struct cfdata *, void *); +static int ray_match(struct device *, cfdata_t, void *); static int ray_media_change(struct ifnet *); static void ray_media_status(struct ifnet *, struct ifmediareq *); void ray_power(int, void *); @@ -475,7 +475,7 @@ CFATTACH_DECL(ray, sizeof(struct ray_sof */ static int -ray_match(struct device *parent, struct cfdata *match, +ray_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_sm_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_sm_pcmcia.c,v retrieving revision 1.48 diff -d -p -u -u -r1.48 if_sm_pcmcia.c --- sys/dev/pcmcia/if_sm_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.48 +++ sys/dev/pcmcia/if_sm_pcmcia.c 9 Jul 2007 22:44:10 -0000 @@ -68,7 +68,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_sm_pcmcia #include #include -int sm_pcmcia_match(struct device *, struct cfdata *, void *); +int sm_pcmcia_match(struct device *, cfdata_t, void *); int sm_pcmcia_validate_config(struct pcmcia_config_entry *); void sm_pcmcia_attach(struct device *, struct device *, void *); int sm_pcmcia_detach(struct device *, int); @@ -112,7 +112,7 @@ const size_t sm_pcmcia_nproducts = sizeof(sm_pcmcia_products) / sizeof(sm_pcmcia_products[0]); int -sm_pcmcia_match(struct device *parent, struct cfdata *match, +sm_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_tr_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_tr_pcmcia.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 if_tr_pcmcia.c --- sys/dev/pcmcia/if_tr_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.18 +++ sys/dev/pcmcia/if_tr_pcmcia.c 9 Jul 2007 22:44:10 -0000 @@ -93,7 +93,7 @@ struct tr_pcmcia_softc { struct pcmcia_function *sc_pf; }; -static int tr_pcmcia_match(struct device *, struct cfdata *, void *); +static int tr_pcmcia_match(struct device *, cfdata_t, void *); static void tr_pcmcia_attach(struct device *, struct device *, void *); static int tr_pcmcia_detach(struct device *, int); static int tr_pcmcia_enable(struct tr_softc *); @@ -106,7 +106,7 @@ CFATTACH_DECL(tr_pcmcia, sizeof(struct t tr_pcmcia_match, tr_pcmcia_attach, tr_pcmcia_detach, tr_activate); static int -tr_pcmcia_match(struct device *parent, struct cfdata *match, +tr_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/if_wi_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/if_wi_pcmcia.c,v retrieving revision 1.75 diff -d -p -u -u -r1.75 if_wi_pcmcia.c --- sys/dev/pcmcia/if_wi_pcmcia.c 10 Dec 2006 03:44:28 -0000 1.75 +++ sys/dev/pcmcia/if_wi_pcmcia.c 9 Jul 2007 22:44:10 -0000 @@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_wi_pcmcia #include #endif -static int wi_pcmcia_match(struct device *, struct cfdata *, void *); +static int wi_pcmcia_match(struct device *, cfdata_t, void *); static int wi_pcmcia_validate_config(struct pcmcia_config_entry *); static void wi_pcmcia_attach(struct device *, struct device *, void *); static int wi_pcmcia_detach(struct device *, int); @@ -262,7 +262,7 @@ static const size_t wi_pcmcia_nproducts sizeof(wi_pcmcia_products) / sizeof(wi_pcmcia_products[0]); static int -wi_pcmcia_match(struct device *parent, struct cfdata *match, +wi_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/isic_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/isic_pcmcia.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 isic_pcmcia.c --- sys/dev/pcmcia/isic_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.31 +++ sys/dev/pcmcia/isic_pcmcia.c 9 Jul 2007 22:44:10 -0000 @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: isic_pcmcia. extern const struct isdn_layer1_isdnif_driver isic_std_driver; -static int isic_pcmcia_match(struct device *, struct cfdata *, void *); +static int isic_pcmcia_match(struct device *, cfdata_t, void *); static void isic_pcmcia_attach(struct device *, struct device *, void *); static const struct isic_pcmcia_card_entry * find_matching_card(struct pcmcia_attach_args *pa); static int isic_pcmcia_isdn_attach(struct isic_softc *sc, const char*); @@ -180,7 +180,7 @@ find_matching_card(pa) */ static int isic_pcmcia_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/mhzc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/mhzc.c,v retrieving revision 1.39 diff -d -p -u -u -r1.39 mhzc.c --- sys/dev/pcmcia/mhzc.c 16 Nov 2006 01:33:20 -0000 1.39 +++ sys/dev/pcmcia/mhzc.c 9 Jul 2007 22:44:10 -0000 @@ -134,7 +134,7 @@ struct mhzc_softc { #define MHZC_MODEM_ALLOCED 0x10 #define MHZC_ETHERNET_ALLOCED 0x20 -int mhzc_match(struct device *, struct cfdata *, void *); +int mhzc_match(struct device *, cfdata_t, void *); void mhzc_attach(struct device *, struct device *, void *); int mhzc_detach(struct device *, int); int mhzc_activate(struct device *, enum devact); @@ -172,7 +172,7 @@ void mhzc_disable(struct mhzc_softc *, i int mhzc_intr(void *); int -mhzc_match(struct device *parent, struct cfdata *match, +mhzc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; @@ -651,7 +651,7 @@ mhzc_em3336_ascii_enaddr(cisstr, myla) /****** Here begins the com attachment code. ******/ #if NCOM_MHZC > 0 -int com_mhzc_match(struct device *, struct cfdata *, void *); +int com_mhzc_match(struct device *, cfdata_t, void *); void com_mhzc_attach(struct device *, struct device *, void *); int com_mhzc_detach(struct device *, int); @@ -663,7 +663,7 @@ int com_mhzc_enable(struct com_softc *); void com_mhzc_disable(struct com_softc *); int -com_mhzc_match(struct device *parent, struct cfdata *match, +com_mhzc_match(struct device *parent, cfdata_t cfdata, void *aux) { extern struct cfdriver com_cd; @@ -726,7 +726,7 @@ com_mhzc_disable(sc) /****** Here begins the sm attachment code. ******/ #if NSM_MHZC > 0 -int sm_mhzc_match(struct device *, struct cfdata *, void *); +int sm_mhzc_match(struct device *, cfdata_t, void *); void sm_mhzc_attach(struct device *, struct device *, void *); /* No mhzc-specific goo in the softc; it's all in the parent. */ @@ -737,7 +737,7 @@ int sm_mhzc_enable(struct smc91cxx_softc void sm_mhzc_disable(struct smc91cxx_softc *); int -sm_mhzc_match(struct device *parent, struct cfdata *match, +sm_mhzc_match(struct device *parent, cfdata_t cfdata, void *aux) { extern struct cfdriver sm_cd; Index: sys/dev/pcmcia/nca_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/nca_pcmcia.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 nca_pcmcia.c --- sys/dev/pcmcia/nca_pcmcia.c 11 Dec 2005 12:23:23 -0000 1.21 +++ sys/dev/pcmcia/nca_pcmcia.c 9 Jul 2007 22:44:10 -0000 @@ -70,7 +70,7 @@ struct nca_pcmcia_softc { #define NCA_PCMCIA_ATTACHED 3 }; -int nca_pcmcia_match(struct device *, struct cfdata *, void *); +int nca_pcmcia_match(struct device *, cfdata_t, void *); int nca_pcmcia_validate_config(struct pcmcia_config_entry *); void nca_pcmcia_attach(struct device *, struct device *, void *); int nca_pcmcia_detach(struct device *, int); @@ -95,7 +95,7 @@ const size_t nca_pcmcia_nproducts = int nca_pcmcia_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/opl_esl.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/opl_esl.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 opl_esl.c --- sys/dev/pcmcia/opl_esl.c 16 Nov 2006 01:33:20 -0000 1.14 +++ sys/dev/pcmcia/opl_esl.c 9 Jul 2007 22:44:10 -0000 @@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: opl_esl.c,v #include #include -int opl_esl_match(struct device *, struct cfdata *, void *); +int opl_esl_match(struct device *, cfdata_t, void *); void opl_esl_attach(struct device *, struct device *, void *); int opl_esl_detach(struct device *, int); @@ -67,7 +67,7 @@ CFATTACH_DECL(opl_esl, sizeof(struct opl opl_esl_match, opl_esl_attach, opl_esl_detach, NULL); int -opl_esl_match(struct device *parent, struct cfdata *match, void *aux) +opl_esl_match(struct device *parent, cfdata_t cfdata, void *aux) { struct audio_attach_args *aa = (struct audio_attach_args *)aux; struct esl_pcmcia_softc *ssc = (struct esl_pcmcia_softc *)parent; Index: sys/dev/pcmcia/pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/pcmcia.c,v retrieving revision 1.82 diff -d -p -u -u -r1.82 pcmcia.c --- sys/dev/pcmcia/pcmcia.c 16 Nov 2006 01:33:20 -0000 1.82 +++ sys/dev/pcmcia/pcmcia.c 9 Jul 2007 22:44:11 -0000 @@ -63,8 +63,6 @@ __KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1 #include #endif -#include "locators.h" - #ifdef PCMCIADEBUG int pcmcia_debug = 0; #define DPRINTF(arg) if (pcmcia_debug) printf arg @@ -78,9 +76,9 @@ int pcmcia_verbose = 1; int pcmcia_verbose = 0; #endif -int pcmcia_match(struct device *, struct cfdata *, void *); +int pcmcia_match(struct device *, cfdata_t, void *); void pcmcia_attach(struct device *, struct device *, void *); -int pcmcia_rescan(struct device *, const char *, const int *); +int pcmcia_rescan(struct device *, const char *, prop_dictionary_t); void pcmcia_childdetached(struct device *, struct device *); int pcmcia_print(void *, const char *); @@ -112,13 +110,15 @@ pcmcia_ccr_write(pf, ccr, val) } int -pcmcia_match(struct device *parent, struct cfdata *match, void *aux) +pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmciabus_attach_args *paa = aux; - if (strcmp(paa->paa_busname, match->cf_name)) { + /* XXXfreza: should use interface attribute */ + if (strcmp(paa->paa_busname, cfdata_driver(cfdata))) { return 0; } + /* if the autoconfiguration got this far, there's a socket here */ return (1); } @@ -146,9 +146,6 @@ pcmcia_card_attach(dev) struct pcmcia_softc *sc = (struct pcmcia_softc *) dev; struct pcmcia_function *pf; int error; - static const int wildcard[PCMCIACF_NLOCS] = { - PCMCIACF_FUNCTION_DEFAULT - }; /* * this is here so that when socket_enable calls gettype, trt happens @@ -195,7 +192,7 @@ pcmcia_card_attach(dev) pf->pf_ih = NULL; } - error = pcmcia_rescan(dev, "pcmcia", wildcard); + error = pcmcia_rescan(dev, "pcmcia", NULL); done: pcmcia_socket_disable(dev); return (error); @@ -203,16 +200,24 @@ done: int pcmcia_rescan(struct device *self, const char *ifattr, - const int *locators) + prop_dictionary_t locators) { struct pcmcia_softc *sc = (struct pcmcia_softc *)self; struct pcmcia_function *pf; + prop_dictionary_t locs; struct pcmcia_attach_args paa; - int locs[PCMCIACF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return (ENOMEM); + } if (sc->card.error || SIMPLEQ_EMPTY(&sc->card.pf_head)) { /* XXX silently ignore if no card present? */ + prop_object_release(locs); return (EIO); } @@ -220,14 +225,19 @@ pcmcia_rescan(struct device *self, const if (SIMPLEQ_EMPTY(&pf->cfe_head)) continue; - if ((locators[PCMCIACF_FUNCTION] != PCMCIACF_FUNCTION_DEFAULT) - && (locators[PCMCIACF_FUNCTION] != pf->number)) - continue; - if (pf->child) continue; - locs[PCMCIACF_FUNCTION] = pf->number; + if (! prop_dictionary_set_uint32(locs, "function", + pf->number)) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + prop_object_release(locs); + return (ENOMEM); + } + + if (! prop_dictionary_subset(locators, locs)) + continue; paa.manufacturer = sc->card.manufacturer; paa.product = sc->card.product; @@ -239,6 +249,7 @@ pcmcia_rescan(struct device *self, const config_stdsubmatch); } + prop_object_release(locs); return (0); } @@ -289,7 +300,7 @@ pcmcia_childdetached(struct device *self if (SIMPLEQ_EMPTY(&pf->cfe_head)) continue; if (pf->child == child) { - KASSERT(device_locator(child, PCMCIACF_FUNCTION) + KASSERT(device_locator(child, "function") == pf->number); pf->child = NULL; return; Index: sys/dev/pcmcia/pcmcom.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/pcmcom.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 pcmcom.c --- sys/dev/pcmcia/pcmcom.c 16 Nov 2006 01:33:20 -0000 1.30 +++ sys/dev/pcmcia/pcmcom.c 9 Jul 2007 22:44:12 -0000 @@ -72,8 +72,6 @@ __KERNEL_RCSID(0, "$NetBSD: pcmcom.c,v 1 #include "com.h" #include "pcmcom.h" -#include "locators.h" - struct pcmcom_softc { struct device sc_dev; /* generic device glue */ @@ -95,7 +93,7 @@ struct pcmcom_attach_args { int pca_slave; /* slave # */ }; -int pcmcom_match(struct device *, struct cfdata *, void *); +int pcmcom_match(struct device *, cfdata_t, void *); int pcmcom_validate_config(struct pcmcia_config_entry *); void pcmcom_attach(struct device *, struct device *, void *); int pcmcom_detach(struct device *, int); @@ -123,7 +121,7 @@ void pcmcom_disable(struct pcmcom_softc int pcmcom_intr(void *); int -pcmcom_match(struct device *parent, struct cfdata *cf, +pcmcom_match(struct device *parent, cfdata_t cf, void *aux) { struct pcmcia_attach_args *pa = aux; @@ -150,9 +148,16 @@ pcmcom_attach(struct device *parent, str struct pcmcom_softc *sc = (void *)self; struct pcmcia_attach_args *pa = aux; struct pcmcia_config_entry *cfe; + prop_dictionary_t locs; int slave; int error; - int locs[PCMCOMCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(self)); + return; + } sc->sc_pf = pa->pf; @@ -160,6 +165,7 @@ pcmcom_attach(struct device *parent, str if (error) { aprint_error("%s: configure failed, error=%d\n", self->dv_xname, error); + prop_object_release(locs); return; } @@ -180,19 +186,25 @@ pcmcom_attach(struct device *parent, str pca.pca_ioh = cfe->iospace[slave].handle.ioh; pca.pca_slave = slave; - locs[PCMCOMCF_SLAVE] = slave; + if (! prop_dictionary_set_uint32(locs, "slave", slave)) { + aprint_error("%s: could not set locator\n", + device_xname(self)); + goto fail; + } sc->sc_slaves[slave] = config_found_sm_loc(&sc->sc_dev, "pcmcom", locs, &pca, pcmcom_print, config_stdsubmatch); } + prop_object_release(locs); pcmcom_disable(sc); sc->sc_state = PCMCOM_ATTACHED; return; fail: pcmcia_function_unconfigure(pa->pf); + prop_object_release(locs); } int @@ -332,7 +344,7 @@ pcmcom_disable(sc) /****** Here begins the com attachment code. ******/ #if NCOM_PCMCOM > 0 -int com_pcmcom_match(struct device *, struct cfdata *, void *); +int com_pcmcom_match(struct device *, cfdata_t, void *); void com_pcmcom_attach(struct device *, struct device *, void *); /* No pcmcom-specific goo in the softc; it's all in the parent. */ @@ -343,7 +355,7 @@ int com_pcmcom_enable(struct com_softc * void com_pcmcom_disable(struct com_softc *); int -com_pcmcom_match(struct device *parent, struct cfdata *cf, +com_pcmcom_match(struct device *parent, cfdata_t cf, void *aux) { Index: sys/dev/pcmcia/spc_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/spc_pcmcia.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 spc_pcmcia.c --- sys/dev/pcmcia/spc_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.17 +++ sys/dev/pcmcia/spc_pcmcia.c 9 Jul 2007 22:44:12 -0000 @@ -68,7 +68,7 @@ struct spc_pcmcia_softc { #define SPC_PCMCIA_ATTACHED 3 }; -int spc_pcmcia_match(struct device *, struct cfdata *, void *); +int spc_pcmcia_match(struct device *, cfdata_t, void *); int spc_pcmcia_validate_config(struct pcmcia_config_entry *); void spc_pcmcia_attach(struct device *, struct device *, void *); int spc_pcmcia_detach(struct device *, int); @@ -85,7 +85,7 @@ const size_t spc_pcmcia_nproducts = sizeof(spc_pcmcia_products) / sizeof(spc_pcmcia_products[0]); int -spc_pcmcia_match(struct device *parent, struct cfdata *match, +spc_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/wdc_pcmcia.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/wdc_pcmcia.c,v retrieving revision 1.108 diff -d -p -u -u -r1.108 wdc_pcmcia.c --- sys/dev/pcmcia/wdc_pcmcia.c 16 Nov 2006 01:33:20 -0000 1.108 +++ sys/dev/pcmcia/wdc_pcmcia.c 9 Jul 2007 22:44:13 -0000 @@ -89,7 +89,7 @@ struct wdc_pcmcia_softc { #define bus_space_write_region_stream_4 bus_space_write_region_4 #endif /* __BUS_SPACE_HAS_STREAM_METHODS */ -static int wdc_pcmcia_match(struct device *, struct cfdata *, void *); +static int wdc_pcmcia_match(struct device *, cfdata_t, void *); static int wdc_pcmcia_validate_config_io(struct pcmcia_config_entry *); static int wdc_pcmcia_validate_config_memory(struct pcmcia_config_entry *); static void wdc_pcmcia_attach(struct device *, struct device *, void *); @@ -176,7 +176,7 @@ static void wdc_pcmcia_dataout_memory(st size_t); static int -wdc_pcmcia_match(struct device *parent, struct cfdata *match, +wdc_pcmcia_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; Index: sys/dev/pcmcia/xirc.c =================================================================== RCS file: /cvsroot/src/sys/dev/pcmcia/xirc.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 xirc.c --- sys/dev/pcmcia/xirc.c 16 Nov 2006 01:33:20 -0000 1.20 +++ sys/dev/pcmcia/xirc.c 9 Jul 2007 22:44:13 -0000 @@ -128,7 +128,7 @@ struct xirc_softc { #define XIRC_ETHERNET_ALLOCED 0x20 }; -int xirc_match(struct device *, struct cfdata *, void *); +int xirc_match(struct device *, cfdata_t, void *); void xirc_attach(struct device *, struct device *, void *); int xirc_detach(struct device *, int); int xirc_activate(struct device *, enum devact); @@ -152,7 +152,7 @@ void xirc_disable(struct xirc_softc *, i int xirc_intr(void *); int -xirc_match(struct device *parent, struct cfdata *match, +xirc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct pcmcia_attach_args *pa = aux; @@ -575,7 +575,7 @@ xirc_disable(sc, flag, media) /****** Here begins the com attachment code. ******/ #if NCOM_XIRC > 0 -int com_xirc_match(struct device *, struct cfdata *, void *); +int com_xirc_match(struct device *, cfdata_t, void *); void com_xirc_attach(struct device *, struct device *, void *); int com_xirc_detach(struct device *, int); @@ -587,7 +587,7 @@ int com_xirc_enable(struct com_softc *); void com_xirc_disable(struct com_softc *); int -com_xirc_match(struct device *parent, struct cfdata *match, +com_xirc_match(struct device *parent, cfdata_t cfdata, void *aux) { extern struct cfdriver com_cd; @@ -651,7 +651,7 @@ com_xirc_disable(sc) /****** Here begins the xi attachment code. ******/ #if NXI_XIRC > 0 -int xi_xirc_match(struct device *, struct cfdata *, void *); +int xi_xirc_match(struct device *, cfdata_t, void *); void xi_xirc_attach(struct device *, struct device *, void *); /* No xirc-specific goo in the softc; it's all in the parent. */ @@ -663,7 +663,7 @@ void xi_xirc_disable(struct xi_softc *); int xi_xirc_lan_nid_ciscallback(struct pcmcia_tuple *, void *); int -xi_xirc_match(struct device *parent, struct cfdata *match, +xi_xirc_match(struct device *parent, cfdata_t cfdata, void *aux) { extern struct cfdriver xi_cd; Index: sys/dev/podulebus/acemidi.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/acemidi.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 acemidi.c --- sys/dev/podulebus/acemidi.c 13 Jul 2006 22:56:02 -0000 1.12 +++ sys/dev/podulebus/acemidi.c 9 Jul 2007 22:44:13 -0000 @@ -54,9 +54,9 @@ struct com_acemidi_softc { struct evcnt sc_intrcnt; }; -static int acemidi_match(struct device *, struct cfdata *, void *); +static int acemidi_match(struct device *, cfdata_t, void *); static void acemidi_attach(struct device *, struct device *, void *); -static int com_acemidi_match(struct device *, struct cfdata *, void *); +static int com_acemidi_match(struct device *, cfdata_t, void *); static void com_acemidi_attach(struct device *, struct device *, void *); CFATTACH_DECL(acemidi, sizeof(struct acemidi_softc), @@ -66,7 +66,7 @@ CFATTACH_DECL(com_acemidi, sizeof(struct com_acemidi_match, com_acemidi_attach, NULL, NULL); static int -acemidi_match(struct device *parent, struct cfdata *cf, void *aux) +acemidi_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; @@ -86,7 +86,7 @@ acemidi_attach(struct device *parent, st } static int -com_acemidi_match(struct device *parent, struct cfdata *cf, void *aux) +com_acemidi_match(struct device *parent, cfdata_t cf, void *aux) { return 1; Index: sys/dev/podulebus/dtide.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/dtide.c,v retrieving revision 1.23 diff -d -p -u -u -r1.23 dtide.c --- sys/dev/podulebus/dtide.c 1 Oct 2006 21:34:30 -0000 1.23 +++ sys/dev/podulebus/dtide.c 9 Jul 2007 22:44:13 -0000 @@ -59,7 +59,7 @@ struct dtide_softc { bus_space_handle_t sc_magich; }; -static int dtide_match(struct device *, struct cfdata *, void *); +static int dtide_match(struct device *, cfdata_t, void *); static void dtide_attach(struct device *, struct device *, void *); CFATTACH_DECL(dtide, sizeof(struct dtide_softc), @@ -69,7 +69,7 @@ static const int dtide_cmdoffsets[] = { static const int dtide_ctloffsets[] = { DTIDE_CTLBASE0, DTIDE_CTLBASE1 }; static int -dtide_match(struct device *parent, struct cfdata *cf, void *aux) +dtide_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/hcide.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/hcide.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 hcide.c --- sys/dev/podulebus/hcide.c 1 Oct 2006 21:34:30 -0000 1.20 +++ sys/dev/podulebus/hcide.c 9 Jul 2007 22:44:13 -0000 @@ -56,7 +56,7 @@ struct hcide_softc { struct wdc_regs sc_wdc_regs[HCIDE_NCHANNELS]; }; -static int hcide_match (struct device *, struct cfdata *, void *); +static int hcide_match (struct device *, cfdata_t, void *); static void hcide_attach (struct device *, struct device *, void *); CFATTACH_DECL(hcide, sizeof(struct hcide_softc), @@ -66,7 +66,7 @@ static const int hcide_cmdoffsets[] = { static const int hcide_ctloffsets[] = { HCIDE_CTL, HCIDE_CTL, HCIDE_CTL }; static int -hcide_match(struct device *parent, struct cfdata *cf, void *aux) +hcide_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/hcsc.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/hcsc.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 hcsc.c --- sys/dev/podulebus/hcsc.c 29 Mar 2006 07:12:56 -0000 1.17 +++ sys/dev/podulebus/hcsc.c 9 Jul 2007 22:44:13 -0000 @@ -98,7 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.1 #include void hcsc_attach (struct device *, struct device *, void *); -int hcsc_match (struct device *, struct cfdata *, void *); +int hcsc_match (struct device *, cfdata_t, void *); static int hcsc_pdma_in(struct ncr5380_softc *, int, int, u_char *); static int hcsc_pdma_out(struct ncr5380_softc *, int, int, u_char *); @@ -129,7 +129,7 @@ CFATTACH_DECL(hcsc, sizeof(struct hcsc_s */ int -hcsc_match(struct device *parent, struct cfdata *cf, void *aux) +hcsc_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/if_ea.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/if_ea.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 if_ea.c --- sys/dev/podulebus/if_ea.c 29 Mar 2006 07:12:56 -0000 1.12 +++ sys/dev/podulebus/if_ea.c 9 Jul 2007 22:44:13 -0000 @@ -71,7 +71,7 @@ struct ea_softc { * prototypes */ -int eaprobe(struct device *, struct cfdata *, void *); +int eaprobe(struct device *, cfdata_t, void *); void eaattach(struct device *, struct device *, void *); /* driver structure for autoconf */ @@ -88,7 +88,7 @@ CFATTACH_DECL(ea, sizeof(struct ea_softc */ int -eaprobe(struct device *parent, struct cfdata *cf, void *aux) +eaprobe(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/if_eb.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/if_eb.c,v retrieving revision 1.10 diff -d -p -u -u -r1.10 if_eb.c --- sys/dev/podulebus/if_eb.c 29 Mar 2006 07:12:56 -0000 1.10 +++ sys/dev/podulebus/if_eb.c 9 Jul 2007 22:44:13 -0000 @@ -71,7 +71,7 @@ struct eb_softc { * prototypes */ -int ebprobe(struct device *, struct cfdata *, void *); +int ebprobe(struct device *, cfdata_t, void *); void ebattach(struct device *, struct device *, void *); /* driver structure for autoconf */ @@ -88,7 +88,7 @@ CFATTACH_DECL(eb, sizeof(struct eb_softc */ int -ebprobe(struct device *parent, struct cfdata *cf, void *aux) +ebprobe(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/if_ei.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/if_ei.c,v retrieving revision 1.12 diff -d -p -u -u -r1.12 if_ei.c --- sys/dev/podulebus/if_ei.c 29 Mar 2006 07:12:56 -0000 1.12 +++ sys/dev/podulebus/if_ei.c 9 Jul 2007 22:44:13 -0000 @@ -69,7 +69,7 @@ static void ei_write16(struct ie_softc * static void ei_write24(struct ie_softc *, int, int); /* autoconfiguration glue */ -static int ei_match(struct device *, struct cfdata *, void *); +static int ei_match(struct device *, cfdata_t, void *); static void ei_attach(struct device *, struct device *, void *); struct ei_softc { @@ -103,7 +103,7 @@ ei_cli(struct ei_softc *sc) } static int -ei_match(struct device *parent, struct cfdata *cf, void *aux) +ei_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/oak.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/oak.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 oak.c --- sys/dev/podulebus/oak.c 29 Mar 2006 07:12:56 -0000 1.17 +++ sys/dev/podulebus/oak.c 9 Jul 2007 22:44:13 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: oak.c,v 1.17 #include void oak_attach (struct device *, struct device *, void *); -int oak_match (struct device *, struct cfdata *, void *); +int oak_match (struct device *, cfdata_t, void *); #if 0 static int oak_pdma_in(struct ncr5380_softc *, int, int, u_char *); @@ -119,7 +119,7 @@ CFATTACH_DECL(oak, sizeof(struct oak_sof */ int -oak_match(struct device *parent, struct cfdata *cf, void *aux) +oak_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/podulebus/sec.c =================================================================== RCS file: /cvsroot/src/sys/dev/podulebus/sec.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 sec.c --- sys/dev/podulebus/sec.c 7 Mar 2007 23:17:01 -0000 1.8 +++ sys/dev/podulebus/sec.c 9 Jul 2007 22:44:14 -0000 @@ -91,7 +91,7 @@ struct sec_softc { #define SEC_DMAMODE MODE_TMODE_DMD /* autoconfiguration glue */ -static int sec_match(struct device *, struct cfdata *, void *); +static int sec_match(struct device *, cfdata_t, void *); static void sec_attach(struct device *, struct device *, void *); /* shutdown hook */ @@ -144,7 +144,7 @@ dmac_read(struct sec_softc *sc, int reg) } static int -sec_match(struct device *parent, struct cfdata *cf, void *aux) +sec_match(struct device *parent, cfdata_t cf, void *aux) { struct podulebus_attach_args *pa = aux; Index: sys/dev/ppbus/if_plip.c =================================================================== RCS file: /cvsroot/src/sys/dev/ppbus/if_plip.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 if_plip.c --- sys/dev/ppbus/if_plip.c 4 Apr 2007 16:31:05 -0000 1.13 +++ sys/dev/ppbus/if_plip.c 9 Jul 2007 22:44:14 -0000 @@ -174,7 +174,7 @@ static u_char *ctxmith; static uint16_t lp_count = 0; /* Autoconf functions */ -static int lp_probe(struct device *, struct cfdata *, void *); +static int lp_probe(struct device *, cfdata_t, void *); static void lp_attach(struct device *, struct device *, void *); static int lp_detach(struct device *, int); @@ -203,7 +203,7 @@ static void lp_intr(void *); static int -lp_probe(struct device * parent, struct cfdata * match, void *aux) +lp_probe(struct device * parent, cfdata_t match, void *aux) { struct ppbus_attach_args * args = aux; Index: sys/dev/ppbus/lpt.c =================================================================== RCS file: /cvsroot/src/sys/dev/ppbus/lpt.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 lpt.c --- sys/dev/ppbus/lpt.c 4 Mar 2007 06:02:28 -0000 1.19 +++ sys/dev/ppbus/lpt.c 9 Jul 2007 22:44:15 -0000 @@ -93,7 +93,7 @@ __KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.19 #include /* Autoconf functions */ -static int lpt_probe(struct device *, struct cfdata *, void *); +static int lpt_probe(struct device *, cfdata_t, void *); static void lpt_attach(struct device *, struct device *, void *); static int lpt_detach(struct device *, int); @@ -125,7 +125,7 @@ static int lpt_logstatus(const struct de * lpt_probe() */ static int -lpt_probe(struct device * parent, struct cfdata * match, void *aux) +lpt_probe(struct device * parent, cfdata_t match, void *aux) { /* Test ppbus's capability */ return lpt_detect(parent); Index: sys/dev/ppbus/ppbus_conf.c =================================================================== RCS file: /cvsroot/src/sys/dev/ppbus/ppbus_conf.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 ppbus_conf.c --- sys/dev/ppbus/ppbus_conf.c 29 Mar 2006 17:23:56 -0000 1.11 +++ sys/dev/ppbus/ppbus_conf.c 9 Jul 2007 22:44:15 -0000 @@ -48,12 +48,12 @@ __KERNEL_RCSID(0, "$NetBSD: ppbus_conf.c #include /* Probe, attach, and detach functions for ppbus. */ -static int ppbus_probe(struct device *, struct cfdata *, void *); +static int ppbus_probe(struct device *, cfdata_t, void *); static void ppbus_attach(struct device *, struct device *, void *); static int ppbus_detach(struct device *, int); /* Utility function prototypes */ -static int ppbus_search_children(struct device *, struct cfdata *, +static int ppbus_search_children(struct device *, cfdata_t, const int *, void *); @@ -62,7 +62,7 @@ CFATTACH_DECL(ppbus, sizeof(struct ppbus /* Probe function for ppbus. */ static int -ppbus_probe(struct device *parent, struct cfdata *cf, void *aux) +ppbus_probe(struct device *parent, cfdata_t cf, void *aux) { struct parport_adapter *sc_link = aux; @@ -227,7 +227,7 @@ ppbus_detach(struct device *self, int fl /* Search for children device and add to list */ static int -ppbus_search_children(struct device *parent, struct cfdata *cf, +ppbus_search_children(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct ppbus_softc *ppbus = (struct ppbus_softc *)parent; Index: sys/dev/ppbus/pps_ppbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/ppbus/pps_ppbus.c,v retrieving revision 1.9 diff -d -p -u -u -r1.9 pps_ppbus.c --- sys/dev/ppbus/pps_ppbus.c 4 Mar 2007 06:02:28 -0000 1.9 +++ sys/dev/ppbus/pps_ppbus.c 9 Jul 2007 22:44:15 -0000 @@ -60,7 +60,7 @@ struct pps_softc { #endif /* !__HAVE_TIMECOUNTER */ }; -static int pps_probe(struct device *, struct cfdata *, void *); +static int pps_probe(struct device *, cfdata_t, void *); static void pps_attach(struct device *, struct device *, void *); CFATTACH_DECL(pps, sizeof(struct pps_softc), pps_probe, pps_attach, NULL, NULL); @@ -81,7 +81,7 @@ static int ppscap = PPS_TSFMT_TSPEC | PP #endif static int -pps_probe(struct device *parent, struct cfdata *match, void *aux) +pps_probe(struct device *parent, cfdata_t cfdata, void *aux) { struct ppbus_attach_args *args = aux; Index: sys/dev/qbus/dhu.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/dhu.c,v retrieving revision 1.47 diff -d -p -u -u -r1.47 dhu.c --- sys/dev/qbus/dhu.c 4 Mar 2007 06:02:29 -0000 1.47 +++ sys/dev/qbus/dhu.c 9 Jul 2007 22:44:16 -0000 @@ -171,7 +171,7 @@ static const struct speedtab dhuspeedtab { -1, -1 } }; -static int dhu_match(struct device *, struct cfdata *, void *); +static int dhu_match(struct device *, cfdata_t, void *); static void dhu_attach(struct device *, struct device *, void *); static void dhurint(void *); static void dhuxint(void *); Index: sys/dev/qbus/dl.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/dl.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 dl.c --- sys/dev/qbus/dl.c 4 Mar 2007 06:02:29 -0000 1.37 +++ sys/dev/qbus/dl.c 9 Jul 2007 22:44:16 -0000 @@ -144,7 +144,7 @@ struct dl_softc { struct tty *sc_tty; }; -static int dl_match (struct device *, struct cfdata *, void *); +static int dl_match (struct device *, cfdata_t, void *); static void dl_attach (struct device *, struct device *, void *); static void dlrint (void *); static void dlxint (void *); @@ -180,7 +180,7 @@ const struct cdevsw dl_cdevsw = { /* then complete the housecleaning for full operation */ static int -dl_match (struct device *parent, struct cfdata *cf, void *aux) +dl_match (struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; Index: sys/dev/qbus/dz_uba.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/dz_uba.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 dz_uba.c --- sys/dev/qbus/dz_uba.c 14 May 2006 21:45:00 -0000 1.25 +++ sys/dev/qbus/dz_uba.c 9 Jul 2007 22:44:16 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: dz_uba.c,v 1 #include "ioconf.h" -static int dz_uba_match(struct device *, struct cfdata *, void *); +static int dz_uba_match(struct device *, cfdata_t, void *); static void dz_uba_attach(struct device *, struct device *, void *); CFATTACH_DECL(dz_uba, sizeof(struct dz_softc), Index: sys/dev/qbus/if_de.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/if_de.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_de.c --- sys/dev/qbus/if_de.c 4 Mar 2007 06:02:29 -0000 1.21 +++ sys/dev/qbus/if_de.c 9 Jul 2007 22:44:16 -0000 @@ -174,7 +174,7 @@ struct de_softc { void *sc_sh; /* shutdownhook cookie */ }; -static int dematch(struct device *, struct cfdata *, void *); +static int dematch(struct device *, cfdata_t, void *); static void deattach(struct device *, struct device *, void *); static void dewait(struct de_softc *, const char *); static int deinit(struct ifnet *); @@ -620,7 +620,7 @@ dewait(struct de_softc *sc, const char * } int -dematch(struct device *parent, struct cfdata *cf, void *aux) +dematch(struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; struct de_softc ssc; Index: sys/dev/qbus/if_dmc.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/if_dmc.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 if_dmc.c --- sys/dev/qbus/if_dmc.c 4 Mar 2007 06:02:29 -0000 1.14 +++ sys/dev/qbus/if_dmc.c 9 Jul 2007 22:44:17 -0000 @@ -168,7 +168,7 @@ struct dmc_softc { } dmc_base; }; -static int dmcmatch(struct device *, struct cfdata *, void *); +static int dmcmatch(struct device *, cfdata_t, void *); static void dmcattach(struct device *, struct device *, void *); static int dmcinit(struct ifnet *); static void dmcrint(void *); @@ -214,7 +214,7 @@ CFATTACH_DECL(dmc, sizeof(struct dmc_sof (tail) = (head) int -dmcmatch(struct device *parent, struct cfdata *cf, void *aux) +dmcmatch(struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; struct dmc_softc ssc; @@ -305,7 +305,7 @@ dmcinit(struct ifnet *ifp) struct dmcbufs *rp; struct dmc_command *qp; struct ifaddr *ifa; - struct cfdata *ui = device_cfdata(&sc->sc_dev); + cfdata_tui = device_cfdata(&sc->sc_dev); int base; int s; Index: sys/dev/qbus/if_il.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/if_il.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 if_il.c --- sys/dev/qbus/if_il.c 4 Mar 2007 06:02:29 -0000 1.16 +++ sys/dev/qbus/if_il.c 9 Jul 2007 22:44:17 -0000 @@ -111,7 +111,7 @@ struct il_softc { int sc_ubaddr; /* mapping registers of is_stats */ }; -static int ilmatch(struct device *, struct cfdata *, void *); +static int ilmatch(struct device *, cfdata_t, void *); static void ilattach(struct device *, struct device *, void *); static void ilcint(void *); static void ilrint(void *); @@ -134,7 +134,7 @@ CFATTACH_DECL(il, sizeof(struct il_softc #define HIWORD(x) (((int)(x) >> 16) & 0x3) int -ilmatch(struct device *parent, struct cfdata *cf, void *aux) +ilmatch(struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; volatile int i; Index: sys/dev/qbus/if_qe.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/if_qe.c,v retrieving revision 1.62 diff -d -p -u -u -r1.62 if_qe.c --- sys/dev/qbus/if_qe.c 4 Mar 2007 06:02:29 -0000 1.62 +++ sys/dev/qbus/if_qe.c 9 Jul 2007 22:44:17 -0000 @@ -105,7 +105,7 @@ struct qe_softc { int sc_setup; /* Setup packet in queue */ }; -static int qematch(struct device *, struct cfdata *, void *); +static int qematch(struct device *, cfdata_t, void *); static void qeattach(struct device *, struct device *, void *); static void qeinit(struct qe_softc *); static void qestart(struct ifnet *); @@ -133,7 +133,7 @@ CFATTACH_DECL(qe, sizeof(struct qe_softc * and wait for interrupt. */ int -qematch(struct device *parent, struct cfdata *cf, void *aux) +qematch(struct device *parent, cfdata_t cf, void *aux) { struct qe_softc ssc; struct qe_softc *sc = &ssc; Index: sys/dev/qbus/if_qt.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/if_qt.c,v retrieving revision 1.11 diff -d -p -u -u -r1.11 if_qt.c --- sys/dev/qbus/if_qt.c 4 Mar 2007 06:02:29 -0000 1.11 +++ sys/dev/qbus/if_qt.c 9 Jul 2007 22:44:17 -0000 @@ -164,7 +164,7 @@ struct qt_softc { short vector; /* Interrupt vector assigned */ }; -static int qtmatch(struct device *, struct cfdata *, void *); +static int qtmatch(struct device *, cfdata_t, void *); static void qtattach(struct device *, struct device *, void *); static void qtintr(void *); static int qtinit(struct ifnet *); @@ -202,7 +202,7 @@ CFATTACH_DECL(qt, sizeof(struct qt_softc * Check if this card is a turbo delqa. */ int -qtmatch(struct device *parent, struct cfdata *cf, void *aux) +qtmatch(struct device *parent, cfdata_t cf, void *aux) { struct qt_softc ssc; struct qt_softc *sc = &ssc; Index: sys/dev/qbus/qd.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/qd.c,v retrieving revision 1.37 diff -d -p -u -u -r1.37 qd.c --- sys/dev/qbus/qd.c 4 Mar 2007 06:02:29 -0000 1.37 +++ sys/dev/qbus/qd.c 9 Jul 2007 22:44:18 -0000 @@ -235,7 +235,7 @@ int QDlast_DMAtype; /* type of the last #define TOY ((time.tv_sec * 100) + (time.tv_usec / 10000)) void qd_attach(struct device *, struct device *, void *); -static int qd_match(struct device *, struct cfdata *, void *); +static int qd_match(struct device *, cfdata_t, void *); static void qddint(void *); /* DMA gate array intrpt service */ static void qdaint(void *); /* Dragon ADDER intrpt service */ @@ -550,7 +550,7 @@ CFATTACH_DECL(qd, sizeof(struct qd_softc static int qd_match(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct qd_softc ssc; Index: sys/dev/qbus/rf.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/rf.c,v retrieving revision 1.14 diff -d -p -u -u -r1.14 rf.c --- sys/dev/qbus/rf.c 8 Mar 2007 23:56:45 -0000 1.14 +++ sys/dev/qbus/rf.c 9 Jul 2007 22:44:19 -0000 @@ -98,9 +98,9 @@ __KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.14 /* autoconfig stuff */ -static int rfc_match(struct device *, struct cfdata *, void *); +static int rfc_match(struct device *, cfdata_t, void *); static void rfc_attach(struct device *, struct device *, void *); -static int rf_match(struct device *, struct cfdata *, void *); +static int rf_match(struct device *, cfdata_t, void *); static void rf_attach(struct device *, struct device *, void *); static int rf_print(void *, const char *); @@ -218,7 +218,7 @@ static void rfc_intr(void *); * RX2ES has to be set, all other bits must be 0 */ int -rfc_match(struct device *parent, struct cfdata *match, void *aux) +rfc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct uba_attach_args *ua = aux; int i; @@ -425,7 +425,7 @@ rfc_attach(struct device *parent, struct int -rf_match(struct device *parent, struct cfdata *match, void *aux) +rf_match(struct device *parent, cfdata_t cfdata, void *aux) { struct rfc_attach_args *rfc_aa = aux; Index: sys/dev/qbus/rl.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/rl.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 rl.c --- sys/dev/qbus/rl.c 10 Mar 2007 00:52:46 -0000 1.33 +++ sys/dev/qbus/rl.c 9 Jul 2007 22:44:20 -0000 @@ -70,11 +70,11 @@ __KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.33 #include "ioconf.h" #include "locators.h" -static int rlcmatch(struct device *, struct cfdata *, void *); +static int rlcmatch(struct device *, cfdata_t, void *); static void rlcattach(struct device *, struct device *, void *); static int rlcprint(void *, const char *); static void rlcintr(void *); -static int rlmatch(struct device *, struct cfdata *, void *); +static int rlmatch(struct device *, cfdata_t, void *); static void rlattach(struct device *, struct device *, void *); static void rlcstart(struct rlc_softc *, struct buf *); static void waitcrdy(struct rlc_softc *); @@ -171,7 +171,7 @@ rlcprint(void *aux, const char *name) * Force the controller to interrupt. */ int -rlcmatch(struct device *parent, struct cfdata *cf, void *aux) +rlcmatch(struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; struct rlc_softc ssc, *sc = &ssc; @@ -235,7 +235,7 @@ rlcattach(struct device *parent, struct } int -rlmatch(struct device *parent, struct cfdata *cf, void *aux) +rlmatch(struct device *parent, cfdata_t cf, void *aux) { struct rlc_attach_args *ra = aux; Index: sys/dev/qbus/ts.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/ts.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 ts.c --- sys/dev/qbus/ts.c 4 Mar 2007 06:02:30 -0000 1.19 +++ sys/dev/qbus/ts.c 9 Jul 2007 22:44:20 -0000 @@ -161,7 +161,7 @@ static void tscommand(struct ts_softc *, static int tsstart(struct ts_softc *, int); static void tswchar(struct ts_softc *); static int tsreset(struct ts_softc *); -static int tsmatch(struct device *, struct cfdata *, void *); +static int tsmatch(struct device *, cfdata_t, void *); static void tsattach(struct device *, struct device *, void *); static int tsready(struct uba_unit *); @@ -196,7 +196,7 @@ const struct cdevsw ts_cdevsw = { * Probe for device. If found, try to raise an interrupt. */ int -tsmatch(struct device *parent, struct cfdata *match, void *aux) +tsmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct ts_softc ssc; struct ts_softc *sc = &ssc; Index: sys/dev/qbus/uba.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/uba.c,v retrieving revision 1.75 diff -d -p -u -u -r1.75 uba.c --- sys/dev/qbus/uba.c 4 Mar 2007 06:02:30 -0000 1.75 +++ sys/dev/qbus/uba.c 9 Jul 2007 22:44:20 -0000 @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: uba.c,v 1.75 #include "ioconf.h" #include "locators.h" -static int ubasearch (struct device *, struct cfdata *, +static int ubasearch (struct device *, cfdata_t, const int *, void *); static int ubaprint (void *, const char *); @@ -287,7 +287,7 @@ uba_attach(struct uba_softc *sc, paddr_t } int -ubasearch(struct device *parent, struct cfdata *cf, +ubasearch(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct uba_softc *sc = (struct uba_softc *)parent; Index: sys/dev/qbus/uda.c =================================================================== RCS file: /cvsroot/src/sys/dev/qbus/uda.c,v retrieving revision 1.56 diff -d -p -u -u -r1.56 uda.c --- sys/dev/qbus/uda.c 29 Mar 2006 18:17:36 -0000 1.56 +++ sys/dev/qbus/uda.c 9 Jul 2007 22:44:20 -0000 @@ -113,7 +113,7 @@ struct uda_softc { int sc_inq; }; -static int udamatch(struct device *, struct cfdata *, void *); +static int udamatch(struct device *, cfdata_t, void *); static void udaattach(struct device *, struct device *, void *); static void udareset(struct device *); static void udaintr(void *); @@ -150,7 +150,7 @@ udaprint(void *aux, const char *name) * Poke at a supposed UDA50 to see if it is there. */ int -udamatch(struct device *parent, struct cfdata *cf, void *aux) +udamatch(struct device *parent, cfdata_t cf, void *aux) { struct uba_attach_args *ua = aux; struct mscp_softc mi; /* Nice hack */ Index: sys/dev/raidframe/rf_netbsdkintf.c =================================================================== RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v retrieving revision 1.227 diff -d -p -u -u -r1.227 rf_netbsdkintf.c --- sys/dev/raidframe/rf_netbsdkintf.c 12 Mar 2007 18:18:31 -0000 1.227 +++ sys/dev/raidframe/rf_netbsdkintf.c 9 Jul 2007 22:44:28 -0000 @@ -214,7 +214,7 @@ static void InitBP(struct buf *, struct static void raidinit(RF_Raid_t *); void raidattach(int); -static int raid_match(struct device *, struct cfdata *, void *); +static int raid_match(struct device *, cfdata_t, void *); static void raid_attach(struct device *, struct device *, void *); static int raid_detach(struct device *, int); @@ -675,7 +675,6 @@ int raidclose(dev_t dev, int flags, int fmt, struct lwp *l) { int unit = raidunit(dev); - struct cfdata *cf; struct raid_softc *rs; int error = 0; int part; @@ -721,9 +720,7 @@ raidclose(dev_t dev, int flags, int fmt, /* detach the device */ - cf = device_cfdata(rs->sc_dev); error = config_detach(rs->sc_dev, DETACH_QUIET); - free(cf, M_RAIDFRAME); /* Detach the disk. */ pseudo_disk_detach(&rs->sc_dkdev); @@ -850,7 +847,6 @@ raidioctl(dev_t dev, u_long cmd, void *d int unit = raidunit(dev); int error = 0; int part, pmask; - struct cfdata *cf; struct raid_softc *rs; RF_Config_t *k_cfg, *u_cfg; RF_Raid_t *raidPtr; @@ -1066,11 +1062,9 @@ raidioctl(dev_t dev, u_long cmd, void *d /* free the pseudo device attach bits */ - cf = device_cfdata(rs->sc_dev); /* XXX this causes us to not return any errors from the above call to rf_Shutdown() */ retcode = config_detach(rs->sc_dev, DETACH_QUIET); - free(cf, M_RAIDFRAME); /* Detach the disk. */ pseudo_disk_detach(&rs->sc_dkdev); @@ -1709,7 +1703,6 @@ raidioctl(dev_t dev, u_long cmd, void *d static void raidinit(RF_Raid_t *raidPtr) { - struct cfdata *cf; struct raid_softc *rs; int unit; @@ -1725,14 +1718,9 @@ raidinit(RF_Raid_t *raidPtr) rs->sc_dkdev.dk_name = rs->sc_xname; - /* attach the pseudo device */ - cf = malloc(sizeof(*cf), M_RAIDFRAME, M_WAITOK); - cf->cf_name = raid_cd.cd_name; - cf->cf_atname = raid_cd.cd_name; - cf->cf_unit = unit; - cf->cf_fstate = FSTATE_STAR; - - rs->sc_dev = config_attach_pseudo(cf); + /* XXXfreza: do we ever want WILDUNIT for unit? */ + rs->sc_dev = config_attach_pseudo(raid_cd.cd_name, raid_cd.cd_name, + unit); if (rs->sc_dev==NULL) { printf("raid%d: config_attach_pseudo failed\n", @@ -3465,7 +3453,7 @@ rf_getdisksize(struct vnode *vp, struct } static int -raid_match(struct device *self, struct cfdata *cfdata, +raid_match(struct device *self, cfdata_t cfdata, void *aux) { return 1; Index: sys/dev/sbus/be.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/be.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 be.c --- sys/dev/sbus/be.c 4 Mar 2007 07:54:11 -0000 1.52 +++ sys/dev/sbus/be.c 9 Jul 2007 22:44:34 -0000 @@ -166,7 +166,7 @@ struct be_softc { #endif }; -int bematch(struct device *, struct cfdata *, void *); +int bematch(struct device *, cfdata_t, void *); void beattach(struct device *, struct device *, void *); void beinit(struct be_softc *); Index: sys/dev/sbus/bpp.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/bpp.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 bpp.c --- sys/dev/sbus/bpp.c 4 Mar 2007 07:54:11 -0000 1.29 +++ sys/dev/sbus/bpp.c 9 Jul 2007 22:44:34 -0000 @@ -114,7 +114,7 @@ struct bpp_softc { struct hwstate sc_hwcurrent; }; -static int bppmatch(struct device *, struct cfdata *, void *); +static int bppmatch(struct device *, cfdata_t, void *); static void bppattach(struct device *, struct device *, void *); static int bppintr (void *); static void bpp_setparams(struct bpp_softc *, struct hwstate *); Index: sys/dev/sbus/bwtwo_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/bwtwo_sbus.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 bwtwo_sbus.c --- sys/dev/sbus/bwtwo_sbus.c 4 Mar 2007 06:02:40 -0000 1.19 +++ sys/dev/sbus/bwtwo_sbus.c 9 Jul 2007 22:44:35 -0000 @@ -111,7 +111,7 @@ __KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c /* autoconfiguration driver */ static void bwtwoattach_sbus (struct device *, struct device *, void *); -static int bwtwomatch_sbus (struct device *, struct cfdata *, void *); +static int bwtwomatch_sbus (struct device *, cfdata_t, void *); /* Allocate an `sbusdev' in addition to the bwtwo softc */ struct bwtwo_sbus_softc { Index: sys/dev/sbus/cgsix_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/cgsix_sbus.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 cgsix_sbus.c --- sys/dev/sbus/cgsix_sbus.c 11 Apr 2007 05:01:39 -0000 1.21 +++ sys/dev/sbus/cgsix_sbus.c 9 Jul 2007 22:44:35 -0000 @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c #include /* autoconfiguration driver */ -static int cgsixmatch(struct device *, struct cfdata *, void *); +static int cgsixmatch(struct device *, cfdata_t, void *); static void cgsixattach(struct device *, struct device *, void *); /* Allocate an `sbusdev' in addition to the cgsix softc */ Index: sys/dev/sbus/cgthree_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/cgthree_sbus.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 cgthree_sbus.c --- sys/dev/sbus/cgthree_sbus.c 4 Mar 2007 06:02:40 -0000 1.18 +++ sys/dev/sbus/cgthree_sbus.c 9 Jul 2007 22:44:35 -0000 @@ -118,7 +118,7 @@ struct cgthree_sbus_softc { /* autoconfiguration driver */ -static int cgthreematch_sbus(struct device *, struct cfdata *, void *); +static int cgthreematch_sbus(struct device *, cfdata_t, void *); static void cgthreeattach_sbus(struct device *, struct device *, void *); CFATTACH_DECL(cgthree_sbus, sizeof(struct cgthree_softc), Index: sys/dev/sbus/cs4231_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/cs4231_sbus.c,v retrieving revision 1.34 diff -d -p -u -u -r1.34 cs4231_sbus.c --- sys/dev/sbus/cs4231_sbus.c 15 Oct 2006 19:45:06 -0000 1.34 +++ sys/dev/sbus/cs4231_sbus.c 9 Jul 2007 22:44:35 -0000 @@ -85,7 +85,7 @@ struct cs4231_sbus_softc { }; -static int cs4231_sbus_match(struct device *, struct cfdata *, void *); +static int cs4231_sbus_match(struct device *, cfdata_t, void *); static void cs4231_sbus_attach(struct device *, struct device *, void *); CFATTACH_DECL(audiocs_sbus, sizeof(struct cs4231_sbus_softc), @@ -142,7 +142,7 @@ static int cs4231_sbus_intr(void *); static int -cs4231_sbus_match(struct device *parent, struct cfdata *cf, void *aux) +cs4231_sbus_match(struct device *parent, cfdata_t cf, void *aux) { struct sbus_attach_args *sa; Index: sys/dev/sbus/dbri.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/dbri.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 dbri.c --- sys/dev/sbus/dbri.c 14 Mar 2007 05:40:35 -0000 1.13 +++ sys/dev/sbus/dbri.c 9 Jul 2007 22:44:36 -0000 @@ -102,7 +102,7 @@ enum io { /* softc stuff */ static void dbri_attach_sbus(struct device *, struct device *, void *); -static int dbri_match_sbus(struct device *, struct cfdata *, void *); +static int dbri_match_sbus(struct device *, cfdata_t, void *); static void dbri_config_interrupts(struct device *); @@ -247,7 +247,7 @@ enum { * Autoconfig routines */ static int -dbri_match_sbus(struct device *parent, struct cfdata *match, void *aux) +dbri_match_sbus(struct device *parent, cfdata_t cfdata, void *aux) { struct sbus_attach_args *sa = aux; char *ver; Index: sys/dev/sbus/dma_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/dma_sbus.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 dma_sbus.c --- sys/dev/sbus/dma_sbus.c 28 Feb 2006 23:10:49 -0000 1.28 +++ sys/dev/sbus/dma_sbus.c 9 Jul 2007 22:44:36 -0000 @@ -89,7 +89,7 @@ struct dma_softc { struct sbusdev sc_sd; /* sbus device */ }; -int dmamatch_sbus(struct device *, struct cfdata *, void *); +int dmamatch_sbus(struct device *, cfdata_t, void *); void dmaattach_sbus(struct device *, struct device *, void *); int dmaprint_sbus(void *, const char *); Index: sys/dev/sbus/esp_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/esp_sbus.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 esp_sbus.c --- sys/dev/sbus/esp_sbus.c 4 Mar 2007 06:02:40 -0000 1.36 +++ sys/dev/sbus/esp_sbus.c 9 Jul 2007 22:44:36 -0000 @@ -80,7 +80,7 @@ struct esp_softc { void espattach_sbus(struct device *, struct device *, void *); void espattach_dma(struct device *, struct device *, void *); -int espmatch_sbus(struct device *, struct cfdata *, void *); +int espmatch_sbus(struct device *, cfdata_t, void *); CFATTACH_DECL(esp_sbus, sizeof(struct esp_softc), Index: sys/dev/sbus/genfb_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/genfb_sbus.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 genfb_sbus.c --- sys/dev/sbus/genfb_sbus.c 11 Apr 2007 04:45:45 -0000 1.1 +++ sys/dev/sbus/genfb_sbus.c 9 Jul 2007 22:44:37 -0000 @@ -60,7 +60,7 @@ struct genfb_sbus_softc { paddr_t sc_paddr; }; -static int genfb_match_sbus(struct device *, struct cfdata *, void *); +static int genfb_match_sbus(struct device *, cfdata_t, void *); static void genfb_attach_sbus(struct device *, struct device *, void *); static int genfb_ioctl_sbus(void *, void *, u_long, void *, int, struct lwp*); @@ -73,7 +73,7 @@ CFATTACH_DECL(genfb_sbus, sizeof(struct * Match a graphics device. */ static int -genfb_match_sbus(struct device *parent, struct cfdata *cf, void *aux) +genfb_match_sbus(struct device *parent, cfdata_t cf, void *aux) { struct sbus_attach_args *sa = aux; Index: sys/dev/sbus/if_en.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_en.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_en.c --- sys/dev/sbus/if_en.c 11 Dec 2005 12:23:44 -0000 1.21 +++ sys/dev/sbus/if_en.c 9 Jul 2007 22:44:37 -0000 @@ -79,7 +79,7 @@ struct en_sbus_softc { /* * prototypes */ -static int en_sbus_match(struct device *, struct cfdata *, void *); +static int en_sbus_match(struct device *, cfdata_t, void *); static void en_sbus_attach(struct device *, struct device *, void *); /* Index: sys/dev/sbus/if_gem_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_gem_sbus.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 if_gem_sbus.c --- sys/dev/sbus/if_gem_sbus.c 24 Nov 2006 13:23:32 -0000 1.1 +++ sys/dev/sbus/if_gem_sbus.c 9 Jul 2007 22:44:37 -0000 @@ -74,14 +74,14 @@ struct gem_sbus_softc { bus_space_handle_t gsc_sbus_regs_h; }; -int gemmatch_sbus(struct device *, struct cfdata *, void *); +int gemmatch_sbus(struct device *, cfdata_t, void *); void gemattach_sbus(struct device *, struct device *, void *); CFATTACH_DECL(gem_sbus, sizeof(struct gem_sbus_softc), gemmatch_sbus, gemattach_sbus, NULL, NULL); int -gemmatch_sbus(struct device *parent, struct cfdata *cf, void *aux) +gemmatch_sbus(struct device *parent, cfdata_t cf, void *aux) { struct sbus_attach_args *sa = aux; Index: sys/dev/sbus/if_hme_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_hme_sbus.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_hme_sbus.c --- sys/dev/sbus/if_hme_sbus.c 11 Dec 2005 12:23:44 -0000 1.21 +++ sys/dev/sbus/if_hme_sbus.c 9 Jul 2007 22:44:37 -0000 @@ -70,7 +70,7 @@ struct hmesbus_softc { struct sbusdev hsc_sbus; /* SBus device */ }; -int hmematch_sbus(struct device *, struct cfdata *, void *); +int hmematch_sbus(struct device *, cfdata_t, void *); void hmeattach_sbus(struct device *, struct device *, void *); CFATTACH_DECL(hme_sbus, sizeof(struct hmesbus_softc), Index: sys/dev/sbus/if_le.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_le.c,v retrieving revision 1.33 diff -d -p -u -u -r1.33 if_le.c --- sys/dev/sbus/if_le.c 4 Mar 2007 06:02:40 -0000 1.33 +++ sys/dev/sbus/if_le.c 9 Jul 2007 22:44:37 -0000 @@ -84,7 +84,7 @@ struct le_softc { #define MEMSIZE 0x4000 /* LANCE memory size */ -int lematch_sbus(struct device *, struct cfdata *, void *); +int lematch_sbus(struct device *, cfdata_t, void *); void leattach_sbus(struct device *, struct device *, void *); /* Index: sys/dev/sbus/if_le_lebuffer.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_le_lebuffer.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 if_le_lebuffer.c --- sys/dev/sbus/if_le_lebuffer.c 11 Dec 2005 12:23:44 -0000 1.21 +++ sys/dev/sbus/if_le_lebuffer.c 9 Jul 2007 22:44:37 -0000 @@ -87,7 +87,7 @@ struct le_softc { }; -int lematch_lebuffer(struct device *, struct cfdata *, void *); +int lematch_lebuffer(struct device *, cfdata_t, void *); void leattach_lebuffer(struct device *, struct device *, void *); /* Index: sys/dev/sbus/if_le_ledma.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/if_le_ledma.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 if_le_ledma.c --- sys/dev/sbus/if_le_ledma.c 4 Mar 2007 06:02:40 -0000 1.27 +++ sys/dev/sbus/if_le_ledma.c 9 Jul 2007 22:44:37 -0000 @@ -93,7 +93,7 @@ struct le_softc { #define MEMSIZE (16*1024) /* LANCE memory size */ #define LEDMA_BOUNDARY (16*1024*1024) /* must not cross 16MB boundary */ -int lematch_ledma(struct device *, struct cfdata *, void *); +int lematch_ledma(struct device *, cfdata_t, void *); void leattach_ledma(struct device *, struct device *, void *); /* Index: sys/dev/sbus/isp_sbus.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/isp_sbus.c,v retrieving revision 1.68 diff -d -p -u -u -r1.68 isp_sbus.c --- sys/dev/sbus/isp_sbus.c 24 May 2007 21:30:44 -0000 1.68 +++ sys/dev/sbus/isp_sbus.c 9 Jul 2007 22:44:37 -0000 @@ -94,13 +94,13 @@ struct isp_sbussoftc { }; -static int isp_match(struct device *, struct cfdata *, void *); +static int isp_match(struct device *, cfdata_t, void *); static void isp_sbus_attach(struct device *, struct device *, void *); CFATTACH_DECL(isp_sbus, sizeof (struct isp_sbussoftc), isp_match, isp_sbus_attach, NULL, NULL); static int -isp_match(struct device *parent, struct cfdata *cf, void *aux) +isp_match(struct device *parent, cfdata_t cf, void *aux) { int rv; #ifdef DEBUG Index: sys/dev/sbus/lebuffer.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/lebuffer.c,v retrieving revision 1.25 diff -d -p -u -u -r1.25 lebuffer.c --- sys/dev/sbus/lebuffer.c 11 Dec 2005 12:23:44 -0000 1.25 +++ sys/dev/sbus/lebuffer.c 9 Jul 2007 22:44:37 -0000 @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: lebuffer.c,v #include int lebufprint(void *, const char *); -int lebufmatch(struct device *, struct cfdata *, void *); +int lebufmatch(struct device *, cfdata_t, void *); void lebufattach(struct device *, struct device *, void *); CFATTACH_DECL(lebuffer, sizeof(struct lebuf_softc), Index: sys/dev/sbus/magmareg.h =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/magmareg.h,v retrieving revision 1.12 diff -d -p -u -u -r1.12 magmareg.h --- sys/dev/sbus/magmareg.h 4 Mar 2007 06:02:41 -0000 1.12 +++ sys/dev/sbus/magmareg.h 9 Jul 2007 22:44:37 -0000 @@ -209,18 +209,18 @@ __inline u_char cd1400_read_reg(struct c __inline void cd1400_write_reg(struct cd1400 *, int, u_char); void cd1400_enable_transmitter(struct cd1400 *, int); -int magma_match(struct device *, struct cfdata *, void *); +int magma_match(struct device *, cfdata_t, void *); void magma_attach(struct device *, struct device *, void *); int magma_hard(void *); void magma_soft(void *); -int mtty_match(struct device *, struct cfdata *, void *); +int mtty_match(struct device *, cfdata_t, void *); void mtty_attach(struct device *, struct device *, void *); int mtty_modem_control(struct mtty_port *, int, int); int mtty_param(struct tty *, struct termios *); void mtty_start(struct tty *); -int mbpp_match(struct device *, struct cfdata *, void *); +int mbpp_match(struct device *, cfdata_t, void *); void mbpp_attach(struct device *, struct device *, void *); void mbpp_timeout(void *); void mbpp_start(void *); Index: sys/dev/sbus/p9100.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/p9100.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 p9100.c --- sys/dev/sbus/p9100.c 4 Mar 2007 06:02:41 -0000 1.35 +++ sys/dev/sbus/p9100.c 9 Jul 2007 22:44:38 -0000 @@ -156,7 +156,7 @@ struct wsscreen_list p9100_screenlist = }; /* autoconfiguration driver */ -static int p9100_sbus_match(struct device *, struct cfdata *, void *); +static int p9100_sbus_match(struct device *, cfdata_t, void *); static void p9100_sbus_attach(struct device *, struct device *, void *); static void p9100unblank(struct device *); @@ -263,7 +263,7 @@ struct wsdisplay_accessops p9100_accesso * Match a p9100. */ static int -p9100_sbus_match(struct device *parent, struct cfdata *cf, void *aux) +p9100_sbus_match(struct device *parent, cfdata_t cf, void *aux) { struct sbus_attach_args *sa = aux; Index: sys/dev/sbus/qe.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/qe.c,v retrieving revision 1.41 diff -d -p -u -u -r1.41 qe.c --- sys/dev/sbus/qe.c 4 Mar 2007 07:54:11 -0000 1.41 +++ sys/dev/sbus/qe.c 9 Jul 2007 22:44:38 -0000 @@ -156,7 +156,7 @@ struct qe_softc { #endif }; -int qematch(struct device *, struct cfdata *, void *); +int qematch(struct device *, cfdata_t, void *); void qeattach(struct device *, struct device *, void *); void qeinit(struct qe_softc *); Index: sys/dev/sbus/qec.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/qec.c,v retrieving revision 1.36 diff -d -p -u -u -r1.36 qec.c --- sys/dev/sbus/qec.c 4 Mar 2007 07:54:11 -0000 1.36 +++ sys/dev/sbus/qec.c 9 Jul 2007 22:44:38 -0000 @@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.36 #include static int qecprint(void *, const char *); -static int qecmatch(struct device *, struct cfdata *, void *); +static int qecmatch(struct device *, cfdata_t, void *); static void qecattach(struct device *, struct device *, void *); void qec_init(struct qec_softc *); Index: sys/dev/sbus/sio16.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/sio16.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 sio16.c --- sys/dev/sbus/sio16.c 11 Dec 2005 12:23:44 -0000 1.15 +++ sys/dev/sbus/sio16.c 9 Jul 2007 22:44:39 -0000 @@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1. * device cfattach and cfdriver definitions, plus the routine we pass * to the cd18xx code or interrupt acknowledgement. */ -static int sio16_match(struct device *, struct cfdata *, void *); +static int sio16_match(struct device *, cfdata_t, void *); static void sio16_attach(struct device *, struct device *, void *); static u_char sio16_ackfunc(void *, int who); @@ -277,7 +277,7 @@ sio16_ackfunc(v, who) * we attach two `clcd' instances per 1600se, that each call the * backend cd18xx driver for help. */ -static int clcd_match(struct device *, struct cfdata *, void *); +static int clcd_match(struct device *, cfdata_t, void *); static void clcd_attach(struct device *, struct device *, void *); CFATTACH_DECL(clcd, sizeof(struct cd18xx_softc), Index: sys/dev/sbus/spifreg.h =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/spifreg.h,v retrieving revision 1.2 diff -d -p -u -u -r1.2 spifreg.h --- sys/dev/sbus/spifreg.h 11 Dec 2005 12:23:44 -0000 1.2 +++ sys/dev/sbus/spifreg.h 9 Jul 2007 22:44:39 -0000 @@ -390,10 +390,10 @@ /* * internal function prototypes */ -int spif_match(struct device *, struct cfdata *, void *); +int spif_match(struct device *, cfdata_t, void *); void spif_attach(struct device *, struct device *, void *); -int stty_match(struct device *, struct cfdata *, void *); +int stty_match(struct device *, cfdata_t, void *); void stty_attach(struct device *, struct device *, void *); int spif_stcintr(void *); @@ -409,7 +409,7 @@ void stty_write_ccr(struct spif_softc *, int stty_compute_baud(speed_t, int, u_int8_t *, u_int8_t *); void stty_start(struct tty *); -int sbpp_match(struct device *, struct cfdata *, void *); +int sbpp_match(struct device *, cfdata_t, void *); void sbpp_attach(struct device *, struct device *, void *); int sbpp_rw(dev_t, struct uio *); Index: sys/dev/sbus/stp4020.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/stp4020.c,v retrieving revision 1.49 diff -d -p -u -u -r1.49 stp4020.c --- sys/dev/sbus/stp4020.c 11 Dec 2006 11:42:48 -0000 1.49 +++ sys/dev/sbus/stp4020.c 9 Jul 2007 22:44:40 -0000 @@ -135,7 +135,7 @@ struct stp4020_softc { static int stp4020print(void *, const char *); -static int stp4020match(struct device *, struct cfdata *, void *); +static int stp4020match(struct device *, cfdata_t, void *); static void stp4020attach(struct device *, struct device *, void *); static int stp4020_intr(void *); static void stp4020_map_window(struct stp4020_socket *h, int win, int speed); Index: sys/dev/sbus/tcx.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/tcx.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 tcx.c --- sys/dev/sbus/tcx.c 4 Mar 2007 06:02:41 -0000 1.21 +++ sys/dev/sbus/tcx.c 9 Jul 2007 22:44:40 -0000 @@ -114,7 +114,7 @@ struct tcx_softc { /* autoconfiguration driver */ static void tcxattach(struct device *, struct device *, void *); -static int tcxmatch(struct device *, struct cfdata *, void *); +static int tcxmatch(struct device *, cfdata_t, void *); static void tcx_unblank(struct device *); CFATTACH_DECL(tcx, sizeof(struct tcx_softc), Index: sys/dev/sbus/xbox.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/xbox.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 xbox.c --- sys/dev/sbus/xbox.c 11 Dec 2005 12:23:44 -0000 1.13 +++ sys/dev/sbus/xbox.c 9 Jul 2007 22:44:40 -0000 @@ -98,7 +98,7 @@ struct xbox_softc { }; /* autoconfiguration driver */ -int xbox_match(struct device *, struct cfdata *, void *); +int xbox_match(struct device *, cfdata_t, void *); void xbox_attach(struct device *, struct device *, void *); int xbox_print( void *, const char *); Index: sys/dev/sbus/zx.c =================================================================== RCS file: /cvsroot/src/sys/dev/sbus/zx.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 zx.c --- sys/dev/sbus/zx.c 4 Mar 2007 06:02:41 -0000 1.19 +++ sys/dev/sbus/zx.c 9 Jul 2007 22:44:40 -0000 @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.19 ZX_ATTR_OE_ENABLE | ZX_ATTR_FORCE_WID) void zx_attach(struct device *, struct device *, void *); -int zx_match(struct device *, struct cfdata *, void *); +int zx_match(struct device *, cfdata_t, void *); void zx_blank(struct device *); int zx_cmap_put(struct zx_softc *); @@ -149,7 +149,7 @@ static struct fbdriver zx_fbdriver = { }; int -zx_match(struct device *parent, struct cfdata *cf, void *aux) +zx_match(struct device *parent, cfdata_t cf, void *aux) { struct sbus_attach_args *sa; Index: sys/dev/scsipi/atapiconf.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/atapiconf.c,v retrieving revision 1.72 diff -d -p -u -u -r1.72 atapiconf.c --- sys/dev/scsipi/atapiconf.c 16 Nov 2006 01:33:26 -0000 1.72 +++ sys/dev/scsipi/atapiconf.c 9 Jul 2007 22:44:41 -0000 @@ -44,8 +44,6 @@ __KERNEL_RCSID(0, "$NetBSD: atapiconf.c, #include #include -#include "locators.h" - #define SILENT_PRINTF(flags,string) if (!(flags & A_SILENT)) printf string #define MAX_TARGET 1 @@ -56,13 +54,13 @@ const struct scsipi_periphsw atapi_probe NULL, }; -static int atapibusmatch(struct device *, struct cfdata *, void *); +static int atapibusmatch(struct device *, cfdata_t, void *); static void atapibusattach(struct device *, struct device *, void *); static int atapibusactivate(struct device *, enum devact); static int atapibusdetach(struct device *, int flags); -static int atapibussubmatch(struct device *, struct cfdata *, - const int *, void *); +static int atapibussubmatch(struct device *, cfdata_t, + prop_dictionary_t, void *); static int atapi_probe_bus(struct atapibus_softc *, int); @@ -115,8 +113,7 @@ atapiprint(void *aux, const char *pnp) } static int -atapibusmatch(struct device *parent, struct cfdata *cf, - void *aux) +atapibusmatch(struct device *parent, cfdata_t cf, void *aux) { struct scsipi_channel *chan = aux; @@ -130,15 +127,16 @@ atapibusmatch(struct device *parent, str } static int -atapibussubmatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +atapibussubmatch(struct device *parent, cfdata_t cf, prop_dictionary_t locs, + void *aux) { struct scsipibus_attach_args *sa = aux; struct scsipi_periph *periph = sa->sa_periph; - if (cf->cf_loc[ATAPIBUSCF_DRIVE] != ATAPIBUSCF_DRIVE_DEFAULT && - cf->cf_loc[ATAPIBUSCF_DRIVE] != periph->periph_target) + if (! locator_match_uint64(cfdata_locators(cf), "driver", + periph->periph_target)) return (0); + return (config_match(parent, cf, aux)); } @@ -257,7 +255,7 @@ atapi_probe_device(struct atapibus_softc { struct scsipi_channel *chan = sc->sc_channel; const struct scsi_quirk_inquiry_pattern *finger; - struct cfdata *cf; + cfdata_t cf; int priority, quirks; finger = scsipi_inqmatch( Index: sys/dev/scsipi/cd.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/cd.c,v retrieving revision 1.262 diff -d -p -u -u -r1.262 cd.c --- sys/dev/scsipi/cd.c 4 Mar 2007 06:02:42 -0000 1.262 +++ sys/dev/scsipi/cd.c 9 Jul 2007 22:44:42 -0000 @@ -159,7 +159,7 @@ static int cd_set_pa_immed(struct cd_sof static int cd_load_unload(struct cd_softc *, struct ioc_load_unload *); static int cd_setblksize(struct cd_softc *); -static int cdmatch(struct device *, struct cfdata *, void *); +static int cdmatch(struct device *, cfdata_t, void *); static void cdattach(struct device *, struct device *, void *); static int cdactivate(struct device *, enum devact); static int cddetach(struct device *, int); @@ -217,7 +217,7 @@ static const struct scsipi_periphsw cd_s * A device suitable for this driver */ static int -cdmatch(struct device *parent, struct cfdata *match, +cdmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/ch.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/ch.c,v retrieving revision 1.77 diff -d -p -u -u -r1.77 ch.c --- sys/dev/scsipi/ch.c 4 Mar 2007 06:02:42 -0000 1.77 +++ sys/dev/scsipi/ch.c 9 Jul 2007 22:44:42 -0000 @@ -106,7 +106,7 @@ struct ch_softc { #define CHF_ROTATE 0x01 /* picker can rotate */ /* Autoconfiguration glue */ -static int chmatch(struct device *, struct cfdata *, void *); +static int chmatch(struct device *, cfdata_t, void *); static void chattach(struct device *, struct device *, void *); CFATTACH_DECL(ch, sizeof(struct ch_softc), @@ -180,7 +180,7 @@ static const struct chquirk chquirks[] = }; static int -chmatch(struct device *parent, struct cfdata *match, +chmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/if_se.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/if_se.c,v retrieving revision 1.65 diff -d -p -u -u -r1.65 if_se.c --- sys/dev/scsipi/if_se.c 4 Mar 2007 15:17:20 -0000 1.65 +++ sys/dev/scsipi/if_se.c 9 Jul 2007 22:44:42 -0000 @@ -194,7 +194,7 @@ struct se_softc { int sc_enabled; }; -static int sematch(struct device *, struct cfdata *, void *); +static int sematch(struct device *, cfdata_t, void *); static void seattach(struct device *, struct device *, void *); static void se_ifstart(struct ifnet *); @@ -281,7 +281,7 @@ ether_cmp(one, two) static int sematch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/scsiconf.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/scsiconf.c,v retrieving revision 1.243 diff -d -p -u -u -r1.243 scsiconf.c --- sys/dev/scsipi/scsiconf.c 4 Mar 2007 06:02:42 -0000 1.243 +++ sys/dev/scsipi/scsiconf.c 9 Jul 2007 22:44:44 -0000 @@ -74,8 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v #include #include -#include "locators.h" - static const struct scsipi_periphsw scsi_probe_dev = { NULL, NULL, @@ -94,11 +92,11 @@ static struct simplelock scsibus_interlo static int scsi_probe_device(struct scsibus_softc *, int, int); -static int scsibusmatch(struct device *, struct cfdata *, void *); +static int scsibusmatch(struct device *, cfdata_t, void *); static void scsibusattach(struct device *, struct device *, void *); static int scsibusactivate(struct device *, enum devact); static int scsibusdetach(struct device *, int flags); -static int scsibusrescan(struct device *, const char *, const int *); +static int scsibusrescan(struct device *, const char *, prop_dictionary_t); static void scsidevdetached(struct device *, struct device *); CFATTACH_DECL2(scsibus, sizeof(struct scsibus_softc), @@ -145,15 +143,15 @@ scsiprint(void *aux, const char *pnp) } static int -scsibusmatch(struct device *parent, struct cfdata *cf, void *aux) +scsibusmatch(struct device *parent, cfdata_t cf, void *aux) { struct scsipi_channel *chan = aux; if (chan->chan_bustype->bustype_type != SCSIPI_BUSTYPE_SCSI) return 0; - if (cf->cf_loc[SCSICF_CHANNEL] != chan->chan_channel && - cf->cf_loc[SCSICF_CHANNEL] != SCSICF_CHANNEL_DEFAULT) + if (! locator_match_uint64(cfdata_locators(cf), "channel", + chan->chan_channel)) return (0); return (1); @@ -382,14 +380,26 @@ scsi_probe_bus(struct scsibus_softc *sc, static int scsibusrescan(struct device *sc, const char *ifattr, - const int *locators) + prop_dictionary_t locators) { + uint8_t utarget, ulun; + int target, lun; KASSERT(ifattr && !strcmp(ifattr, "scsibus")); KASSERT(locators); - return (scsi_probe_bus((struct scsibus_softc *)sc, - locators[SCSIBUSCF_TARGET], locators[SCSIBUSCF_LUN])); + /* XXXfreza: target and lun are *not* really 8bit */ + if (prop_dictionary_get_uint8(locators, "target", &utarget)) + target = utarget; + else + target = -1; + + if (prop_dictionary_get_uint8(locators, "lun", &ulun)) + lun = ulun; + else + lun = -1; + + return (scsi_probe_bus((struct scsibus_softc *)sc, target, lun)); } static void @@ -400,8 +410,8 @@ scsidevdetached(struct device *sc, struc struct scsipi_periph *periph; int target, lun; - target = device_locator(dev, SCSIBUSCF_TARGET); - lun = device_locator(dev, SCSIBUSCF_LUN); + target = device_locator(dev, "target"); + lun = device_locator(dev, "lun"); periph = scsipi_lookup_periph(chan, target, lun); KASSERT(periph->periph_dev == dev); @@ -726,12 +736,19 @@ scsi_probe_device(struct scsibus_softc * struct scsipi_periph *periph; struct scsipi_inquiry_data inqbuf; const struct scsi_quirk_inquiry_pattern *finger; + prop_dictionary_t locs; int checkdtype, priority, docontinue, quirks; struct scsipibus_attach_args sa; - struct cfdata *cf; - int locs[SCSIBUSCF_NLOCS]; + cfdata_t cf; struct device *chld; + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dev)); + return (ENOMEM); + } + /* * Assume no more luns to search after this one. * If we successfully get Inquiry data and after @@ -751,6 +768,7 @@ scsi_probe_device(struct scsibus_softc * "%s: cannot allocate periph for target %d lun %d\n", sc->sc_dev.dv_xname, target, lun); #endif + prop_object_release(locs); return (ENOMEM); } periph->periph_channel = chan; @@ -943,8 +961,17 @@ scsi_probe_device(struct scsibus_softc * if ((periph->periph_quirks & PQUIRK_NOLUNS) == 0) docontinue = 1; - locs[SCSIBUSCF_TARGET] = target; - locs[SCSIBUSCF_LUN] = lun; + if (target != -1 && !prop_dictionary_set_uint8(locs, "target", + target)) { + aprint_error("%s: could not set 'target'\n", + device_xname(&sc->sc_dev)); + goto bad; + } + if (lun != -1 && !prop_dictionary_set_uint8(locs, "lun", lun)) { + aprint_error("%s: could not set 'lun'\n", + device_xname(&sc->sc_dev)); + goto bad; + } if ((cf = config_search_loc(config_stdsubmatch, &sc->sc_dev, "scsibus", locs, &sa)) != NULL) { @@ -962,9 +989,11 @@ scsi_probe_device(struct scsibus_softc * goto bad; } + prop_object_release(locs); return (docontinue); bad: + prop_object_release(locs); free(periph, M_DEVBUF); return (docontinue); } Index: sys/dev/scsipi/sd.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/sd.c,v retrieving revision 1.261 diff -d -p -u -u -r1.261 sd.c --- sys/dev/scsipi/sd.c 4 Mar 2007 06:02:43 -0000 1.261 +++ sys/dev/scsipi/sd.c 9 Jul 2007 22:44:46 -0000 @@ -129,7 +129,7 @@ static int sd_flush(struct sd_softc *, i static int sd_getcache(struct sd_softc *, int *); static int sd_setcache(struct sd_softc *, int); -static int sdmatch(struct device *, struct cfdata *, void *); +static int sdmatch(struct device *, cfdata_t, void *); static void sdattach(struct device *, struct device *, void *); static int sdactivate(struct device *, enum devact); static int sddetach(struct device *, int); @@ -201,7 +201,7 @@ struct sd_mode_sense_data { * A device suitable for this driver */ static int -sdmatch(struct device *parent, struct cfdata *match, +sdmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/ses.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/ses.c,v retrieving revision 1.38 diff -d -p -u -u -r1.38 ses.c --- sys/dev/scsipi/ses.c 4 Mar 2007 06:02:44 -0000 1.38 +++ sys/dev/scsipi/ses.c 9 Jul 2007 22:44:47 -0000 @@ -167,7 +167,7 @@ struct ses_softc { #define SESUNIT(x) (minor((x))) -static int ses_match(struct device *, struct cfdata *, void *); +static int ses_match(struct device *, cfdata_t, void *); static void ses_attach(struct device *, struct device *, void *); static enctyp ses_device_type(struct scsipibus_attach_args *); @@ -184,7 +184,7 @@ static const struct scsipi_periphsw ses_ }; static int -ses_match(struct device *parent, struct cfdata *match, +ses_match(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/ss.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/ss.c,v retrieving revision 1.70 diff -d -p -u -u -r1.70 ss.c --- sys/dev/scsipi/ss.c 4 Mar 2007 06:02:44 -0000 1.70 +++ sys/dev/scsipi/ss.c 9 Jul 2007 22:44:47 -0000 @@ -69,7 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.70 #define MODE_NONREWIND 1 #define MODE_CONTROL 3 -static int ssmatch(struct device *, struct cfdata *, void *); +static int ssmatch(struct device *, cfdata_t, void *); static void ssattach(struct device *, struct device *, void *); static int ssdetach(struct device *self, int flags); static int ssactivate(struct device *self, enum devact act); @@ -123,7 +123,7 @@ static const struct scsipi_inquiry_patte }; static int -ssmatch(struct device *parent, struct cfdata *match, +ssmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/st_atapi.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/st_atapi.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 st_atapi.c --- sys/dev/scsipi/st_atapi.c 16 Nov 2006 01:33:26 -0000 1.20 +++ sys/dev/scsipi/st_atapi.c 9 Jul 2007 22:44:48 -0000 @@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: st_atapi.c,v #include #include -static int st_atapibus_match(struct device *, struct cfdata *, void *); +static int st_atapibus_match(struct device *, cfdata_t, void *); static void st_atapibus_attach(struct device *, struct device *, void *); static int st_atapibus_ops(struct st_softc *, int, int); static int st_atapibus_mode_sense(struct st_softc *, int); @@ -62,7 +62,7 @@ static const struct scsipi_inquiry_patte }; static int -st_atapibus_match(struct device *parent, struct cfdata *match, +st_atapibus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/st_scsi.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/st_scsi.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 st_scsi.c --- sys/dev/scsipi/st_scsi.c 16 Nov 2006 01:33:26 -0000 1.26 +++ sys/dev/scsipi/st_scsi.c 9 Jul 2007 22:44:48 -0000 @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v #include #include -static int st_scsibus_match(struct device *, struct cfdata *, void *); +static int st_scsibus_match(struct device *, cfdata_t, void *); static void st_scsibus_attach(struct device *, struct device *, void *); static int st_scsibus_ops(struct st_softc *, int, int); static int st_scsibus_read_block_limits(struct st_softc *, int); @@ -91,7 +91,7 @@ static const struct scsipi_inquiry_patte }; static int -st_scsibus_match(struct device *parent, struct cfdata *match, +st_scsibus_match(struct device *parent, cfdata_t cfdata, void *aux) { struct scsipibus_attach_args *sa = aux; Index: sys/dev/scsipi/uk.c =================================================================== RCS file: /cvsroot/src/sys/dev/scsipi/uk.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 uk.c --- sys/dev/scsipi/uk.c 4 Mar 2007 06:02:44 -0000 1.52 +++ sys/dev/scsipi/uk.c 9 Jul 2007 22:44:49 -0000 @@ -65,7 +65,7 @@ struct uk_softc { struct scsipi_periph *sc_periph; /* all the inter level info */ }; -static int ukmatch(struct device *, struct cfdata *, void *); +static int ukmatch(struct device *, cfdata_t, void *); static void ukattach(struct device *, struct device *, void *); static int ukactivate(struct device *, enum devact); static int ukdetach(struct device *, int); @@ -86,7 +86,7 @@ const struct cdevsw uk_cdevsw = { }; static int -ukmatch(struct device *parent, struct cfdata *match, +ukmatch(struct device *parent, cfdata_t cfdata, void *aux) { Index: sys/dev/spi/m25p.c =================================================================== RCS file: /cvsroot/src/sys/dev/spi/m25p.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 m25p.c --- sys/dev/spi/m25p.c 7 Oct 2006 07:21:13 -0000 1.1 +++ sys/dev/spi/m25p.c 9 Jul 2007 22:44:49 -0000 @@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.1 * Device driver for STMicroelectronics M25P Family SPI Flash Devices */ -static int m25p_match(struct device *, struct cfdata *, void *); +static int m25p_match(struct device *, cfdata_t, void *); static void m25p_attach(struct device *, struct device *, void *); static const char *m25p_getname(void *); static struct spi_handle *m25p_gethandle(void *); @@ -98,7 +98,7 @@ static const struct m25p_info { }; static int -m25p_match(struct device *parent, struct cfdata *cf, void *aux) +m25p_match(struct device *parent, cfdata_t cf, void *aux) { struct spi_attach_args *sa = aux; Index: sys/dev/spi/spi.c =================================================================== RCS file: /cvsroot/src/sys/dev/spi/spi.c,v retrieving revision 1.2 diff -d -p -u -u -r1.2 spi.c --- sys/dev/spi/spi.c 7 Oct 2006 07:21:13 -0000 1.2 +++ sys/dev/spi/spi.c 9 Jul 2007 22:44:49 -0000 @@ -89,7 +89,7 @@ spibus_print(void *aux, const char *pnp) static int -spi_match(struct device *parent, struct cfdata *cf, void *aux) +spi_match(struct device *parent, cfdata_t cf, void *aux) { return 1; @@ -107,7 +107,7 @@ spi_print(void *aux, const char *pnp) } static int -spi_search(struct device *parent, struct cfdata *cf, const int *ldesc, +spi_search(struct device *parent, cfdata_t cf, const int *ldesc, void *aux) { struct spi_softc *sc = (void *)parent; Index: sys/dev/spi/spiflash.c =================================================================== RCS file: /cvsroot/src/sys/dev/spi/spiflash.c,v retrieving revision 1.3 diff -d -p -u -u -r1.3 spiflash.c --- sys/dev/spi/spiflash.c 4 Mar 2007 06:02:44 -0000 1.3 +++ sys/dev/spi/spiflash.c 9 Jul 2007 22:44:49 -0000 @@ -108,7 +108,7 @@ struct spiflash_attach_args { }; #define STATIC -STATIC int spiflash_match(struct device *, struct cfdata *, void *); +STATIC int spiflash_match(struct device *, cfdata_t, void *); STATIC void spiflash_attach(struct device *, struct device *, void *); STATIC int spiflash_print(void *, const char *); STATIC int spiflash_common_erase(spiflash_handle_t, size_t, size_t); @@ -189,7 +189,7 @@ spiflash_print(void *aux, const char *pn } int -spiflash_match(struct device *parent, struct cfdata *cf, void *aux) +spiflash_match(struct device *parent, cfdata_t cf, void *aux) { return 1; Index: sys/dev/spi/tmp121.c =================================================================== RCS file: /cvsroot/src/sys/dev/spi/tmp121.c,v retrieving revision 1.1 diff -d -p -u -u -r1.1 tmp121.c --- sys/dev/spi/tmp121.c 2 Oct 2006 07:18:19 -0000 1.1 +++ sys/dev/spi/tmp121.c 9 Jul 2007 22:44:49 -0000 @@ -64,7 +64,7 @@ struct tmp121temp_softc { struct sysmon_envsys sc_sysmon; }; -static int tmp121temp_match(struct device *, struct cfdata *, void *); +static int tmp121temp_match(struct device *, cfdata_t, void *); static void tmp121temp_attach(struct device *, struct device *, void *); static int tmp121temp_gtredata(struct sysmon_envsys *, @@ -83,7 +83,7 @@ static const struct envsys_range tmp121t }; static int -tmp121temp_match(struct device *parent, struct cfdata *cf, void *aux) +tmp121temp_match(struct device *parent, cfdata_t cf, void *aux) { struct spi_attach_args *sa = aux; Index: sys/dev/sun/kbd_zs.c =================================================================== RCS file: /cvsroot/src/sys/dev/sun/kbd_zs.c,v retrieving revision 1.21 diff -d -p -u -u -r1.21 kbd_zs.c --- sys/dev/sun/kbd_zs.c 30 Mar 2006 16:12:10 -0000 1.21 +++ sys/dev/sun/kbd_zs.c 9 Jul 2007 22:44:56 -0000 @@ -97,7 +97,7 @@ struct zsops zsops_kbd = { kbd_zs_softint, /* process software interrupt */ }; -static int kbd_zs_match(struct device *, struct cfdata *, void *); +static int kbd_zs_match(struct device *, cfdata_t, void *); static void kbd_zs_attach(struct device *, struct device *, void *); static void kbd_zs_write_data(struct kbd_sun_softc *, int); Index: sys/dev/sun/ms_zs.c =================================================================== RCS file: /cvsroot/src/sys/dev/sun/ms_zs.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 ms_zs.c --- sys/dev/sun/ms_zs.c 30 Mar 2006 16:12:10 -0000 1.16 +++ sys/dev/sun/ms_zs.c 9 Jul 2007 22:44:56 -0000 @@ -93,7 +93,7 @@ int ms_zs_bps = SUN_MS_BPS; int ms_zs_bps = MS_DEFAULT_BPS; #endif -static int ms_zs_match(struct device *, struct cfdata *, void *); +static int ms_zs_match(struct device *, cfdata_t, void *); static void ms_zs_attach(struct device *, struct device *, void *); CFATTACH_DECL(ms_zs, sizeof(struct ms_softc), Index: sys/dev/sun/sunkbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/sun/sunkbd.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 sunkbd.c --- sys/dev/sun/sunkbd.c 30 Mar 2006 16:12:10 -0000 1.24 +++ sys/dev/sun/sunkbd.c 9 Jul 2007 22:44:57 -0000 @@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunkbd.c,v 1 * Interface to the lower layer (ttycc) ****************************************************************/ -static int sunkbd_match(struct device *, struct cfdata *, void *); +static int sunkbd_match(struct device *, cfdata_t, void *); static void sunkbd_attach(struct device *, struct device *, void *); static void sunkbd_write_data(struct kbd_sun_softc *, int); static int sunkbdiopen(struct device *, int mode); Index: sys/dev/sun/sunms.c =================================================================== RCS file: /cvsroot/src/sys/dev/sun/sunms.c,v retrieving revision 1.26 diff -d -p -u -u -r1.26 sunms.c --- sys/dev/sun/sunms.c 4 Mar 2007 06:02:45 -0000 1.26 +++ sys/dev/sun/sunms.c 9 Jul 2007 22:44:57 -0000 @@ -88,7 +88,7 @@ int sunms_bps = SUN_MS_BPS; int sunms_bps = MS_DEFAULT_BPS; #endif -static int sunms_match(struct device *, struct cfdata *, void *); +static int sunms_match(struct device *, cfdata_t, void *); static void sunms_attach(struct device *, struct device *, void *); static int sunmsiopen(struct device *, int mode); int sunmsinput(int, struct tty *); Index: sys/dev/tc/asc_tc.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/asc_tc.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 asc_tc.c --- sys/dev/tc/asc_tc.c 4 Mar 2007 15:17:06 -0000 1.30 +++ sys/dev/tc/asc_tc.c 9 Jul 2007 22:44:57 -0000 @@ -72,7 +72,7 @@ struct asc_softc { char *sc_base, *sc_bounce, *sc_target; }; -static int asc_tc_match(struct device *, struct cfdata *, void *); +static int asc_tc_match(struct device *, cfdata_t, void *); static void asc_tc_attach(struct device *, struct device *, void *); CFATTACH_DECL(asc_tc, sizeof(struct asc_softc), @@ -119,7 +119,7 @@ static struct ncr53c9x_glue asc_tc_glue #define PMAZ_DMA_ADDR(x) ((unsigned long)(x) & PMAZ_DMAR_MASK) static int -asc_tc_match(struct device *parent, struct cfdata *cfdata, void *aux) +asc_tc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *d = aux; Index: sys/dev/tc/asc_tcds.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/asc_tcds.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 asc_tcds.c --- sys/dev/tc/asc_tcds.c 4 Mar 2007 15:17:06 -0000 1.19 +++ sys/dev/tc/asc_tcds.c 9 Jul 2007 22:44:57 -0000 @@ -105,7 +105,7 @@ struct asc_softc { struct tcds_slotconfig *sc_tcds; /* DMA/slot info lives here */ }; -static int asc_tcds_match (struct device *, struct cfdata *, void *); +static int asc_tcds_match (struct device *, cfdata_t, void *); static void asc_tcds_attach(struct device *, struct device *, void *); CFATTACH_DECL(asc_tcds, sizeof(struct asc_softc), @@ -140,7 +140,7 @@ static struct ncr53c9x_glue asc_tcds_glu }; static int -asc_tcds_match(struct device *parent, struct cfdata *cf, void *aux) +asc_tcds_match(struct device *parent, cfdata_t cf, void *aux) { /* We always exist. */ Index: sys/dev/tc/bba.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/bba.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 bba.c --- sys/dev/tc/bba.c 4 Mar 2007 06:02:46 -0000 1.31 +++ sys/dev/tc/bba.c 9 Jul 2007 22:44:58 -0000 @@ -99,7 +99,7 @@ struct bba_softc { struct bba_dma_state sc_rx_dma_state; }; -static int bba_match(struct device *, struct cfdata *, void *); +static int bba_match(struct device *, cfdata_t, void *); static void bba_attach(struct device *, struct device *, void *); CFATTACH_DECL(bba, sizeof(struct bba_softc), @@ -197,7 +197,7 @@ static void bba_codec_dwrite(struct am79 static uint8_t bba_codec_dread(struct am7930_softc *, int); static int -bba_match(struct device *parent, struct cfdata *cf, void *aux) +bba_match(struct device *parent, cfdata_t cf, void *aux) { struct ioasicdev_attach_args *ia; Index: sys/dev/tc/cfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/cfb.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 cfb.c --- sys/dev/tc/cfb.c 4 Mar 2007 15:17:06 -0000 1.52 +++ sys/dev/tc/cfb.c 9 Jul 2007 22:44:58 -0000 @@ -138,7 +138,7 @@ struct cfb_softc { #define CX_BT459_OFFSET 0x200000 #define CX_OFFSET_IREQ 0x300000 /* Interrupt req. control */ -static int cfbmatch(struct device *, struct cfdata *, void *); +static int cfbmatch(struct device *, cfdata_t, void *); static void cfbattach(struct device *, struct device *, void *); CFATTACH_DECL(cfb, sizeof(struct cfb_softc), @@ -235,7 +235,7 @@ static const u_int8_t shuffle[256] = { }; static int -cfbmatch(struct device *parent, struct cfdata *match, void *aux) +cfbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/if_fta.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/if_fta.c,v retrieving revision 1.24 diff -d -p -u -u -r1.24 if_fta.c --- sys/dev/tc/if_fta.c 4 Mar 2007 06:02:46 -0000 1.24 +++ sys/dev/tc/if_fta.c 9 Jul 2007 22:44:58 -0000 @@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1 static int pdq_tc_match( struct device *parent, - struct cfdata *match, + cfdata_t match, void *aux) { struct tc_attach_args *ta = (struct tc_attach_args *) aux; Index: sys/dev/tc/if_le_ioasic.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/if_le_ioasic.c,v retrieving revision 1.29 diff -d -p -u -u -r1.29 if_le_ioasic.c --- sys/dev/tc/if_le_ioasic.c 4 Mar 2007 15:17:06 -0000 1.29 +++ sys/dev/tc/if_le_ioasic.c 9 Jul 2007 22:44:58 -0000 @@ -71,7 +71,7 @@ struct le_ioasic_softc { bus_dmamap_t sc_dmamap; /* bus dmamap */ }; -static int le_ioasic_match(struct device *, struct cfdata *, void *); +static int le_ioasic_match(struct device *, cfdata_t, void *); static void le_ioasic_attach(struct device *, struct device *, void *); CFATTACH_DECL(le_ioasic, sizeof(struct le_softc), @@ -85,7 +85,7 @@ static void le_ioasic_copyfrombuf_gap16( static void le_ioasic_zerobuf_gap16(struct lance_softc *, int, int); static int -le_ioasic_match(struct device *parent, struct cfdata *match, void *aux) +le_ioasic_match(struct device *parent, cfdata_t cfdata, void *aux) { struct ioasicdev_attach_args *d = aux; Index: sys/dev/tc/if_le_tc.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/if_le_tc.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 if_le_tc.c --- sys/dev/tc/if_le_tc.c 31 Mar 2006 17:39:33 -0000 1.20 +++ sys/dev/tc/if_le_tc.c 9 Jul 2007 22:44:58 -0000 @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_tc.c,v #include #include -static int le_tc_match(struct device *, struct cfdata *, void *); +static int le_tc_match(struct device *, cfdata_t, void *); static void le_tc_attach(struct device *, struct device *, void *); CFATTACH_DECL(le_tc, sizeof(struct le_softc), @@ -71,7 +71,7 @@ CFATTACH_DECL(le_tc, sizeof(struct le_so #define LE_OFFSET_ROM 0x1c0000 static int -le_tc_match(struct device *parent, struct cfdata *match, void *aux) +le_tc_match(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *d = aux; Index: sys/dev/tc/mfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/mfb.c,v retrieving revision 1.49 diff -d -p -u -u -r1.49 mfb.c --- sys/dev/tc/mfb.c 4 Mar 2007 15:46:18 -0000 1.49 +++ sys/dev/tc/mfb.c 9 Jul 2007 22:44:59 -0000 @@ -125,7 +125,7 @@ struct mfb_softc { #define MX_BT431_OFFSET 0x180000 #define MX_IREQ_OFFSET 0x080000 /* Interrupt req. control */ -static int mfbmatch(struct device *, struct cfdata *, void *); +static int mfbmatch(struct device *, cfdata_t, void *); static void mfbattach(struct device *, struct device *, void *); CFATTACH_DECL(mfb, sizeof(struct mfb_softc), @@ -213,7 +213,7 @@ static const u_int8_t flip[256] = { }; static int -mfbmatch(struct device *parent, struct cfdata *match, void *aux) +mfbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/px.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/px.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 px.c --- sys/dev/tc/px.c 4 Mar 2007 15:55:29 -0000 1.30 +++ sys/dev/tc/px.c 9 Jul 2007 22:44:59 -0000 @@ -101,7 +101,7 @@ static void px_attach(struct device *, s static void px_init(struct stic_info *, int); static int px_ioctl(struct stic_info *, u_long, void *, int, struct lwp *); -static int px_match(struct device *, struct cfdata *, void *); +static int px_match(struct device *, cfdata_t, void *); static int px_intr(void *); static uint32_t *px_pbuf_get(struct stic_info *); @@ -119,7 +119,7 @@ CFATTACH_DECL(px, sizeof(struct px_softc px_match, px_attach, NULL, NULL); static int -px_match(struct device *parent, struct cfdata *match, void *aux) +px_match(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta; Index: sys/dev/tc/pxg.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/pxg.c,v retrieving revision 1.27 diff -d -p -u -u -r1.27 pxg.c --- sys/dev/tc/pxg.c 4 Mar 2007 15:55:29 -0000 1.27 +++ sys/dev/tc/pxg.c 9 Jul 2007 22:44:59 -0000 @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.27 static void pxg_attach(struct device *, struct device *, void *); static int pxg_intr(void *); -static int pxg_match(struct device *, struct cfdata *, void *); +static int pxg_match(struct device *, cfdata_t, void *); static void pxg_init(struct stic_info *); static int pxg_ioctl(struct stic_info *, u_long, void *, int, struct lwp *); @@ -117,7 +117,7 @@ static const char *pxg_types[] = { }; static int -pxg_match(struct device *parent, struct cfdata *match, void *aux) +pxg_match(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta; int i; Index: sys/dev/tc/sfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/sfb.c,v retrieving revision 1.74 diff -d -p -u -u -r1.74 sfb.c --- sys/dev/tc/sfb.c 5 Mar 2007 21:05:02 -0000 1.74 +++ sys/dev/tc/sfb.c 9 Jul 2007 22:44:59 -0000 @@ -141,7 +141,7 @@ struct sfb_softc { #define HX_MAGIC_X 368 #define HX_MAGIC_Y 38 -static int sfbmatch(struct device *, struct cfdata *, void *); +static int sfbmatch(struct device *, cfdata_t, void *); static void sfbattach(struct device *, struct device *, void *); CFATTACH_DECL(sfb, sizeof(struct sfb_softc), @@ -248,7 +248,7 @@ static const u_int8_t shuffle[256] = { }; static int -sfbmatch(struct device *parent, struct cfdata *match, void *aux) +sfbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/sfbplus.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/sfbplus.c,v retrieving revision 1.28 diff -d -p -u -u -r1.28 sfbplus.c --- sys/dev/tc/sfbplus.c 5 Mar 2007 21:05:02 -0000 1.28 +++ sys/dev/tc/sfbplus.c 9 Jul 2007 22:44:59 -0000 @@ -124,7 +124,7 @@ struct sfbp_softc { #define HX_MAGIC_X 368 #define HX_MAGIC_Y 38 -static int sfbpmatch(struct device *, struct cfdata *, void *); +static int sfbpmatch(struct device *, cfdata_t, void *); static void sfbpattach(struct device *, struct device *, void *); CFATTACH_DECL(sfbp, sizeof(struct sfbp_softc), @@ -239,7 +239,7 @@ static const u_int8_t shuffle[256] = { }; static int -sfbpmatch(struct device *parent, struct cfdata *match, void *aux) +sfbpmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/tc.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/tc.c,v retrieving revision 1.46 diff -d -p -u -u -r1.46 tc.c --- sys/dev/tc/tc.c 12 Apr 2007 21:35:08 -0000 1.46 +++ sys/dev/tc/tc.c 9 Jul 2007 22:45:01 -0000 @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.46 #include "locators.h" /* Definition of the driver for autoconfig. */ -static int tcmatch(struct device *, struct cfdata *, void *); +static int tcmatch(struct device *, cfdata_t, void *); CFATTACH_DECL(tc, sizeof(struct tc_softc), tcmatch, tcattach, NULL, NULL); @@ -54,7 +54,7 @@ static int tcprint(void *, const char *) static void tc_devinfo(const char *, char *, size_t); static int -tcmatch(struct device *parent, struct cfdata *cf, void *aux) +tcmatch(struct device *parent, cfdata_t cf, void *aux) { struct tcbus_attach_args *tba = aux; Index: sys/dev/tc/tcds.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/tcds.c,v retrieving revision 1.19 diff -d -p -u -u -r1.19 tcds.c --- sys/dev/tc/tcds.c 31 Mar 2006 17:39:33 -0000 1.19 +++ sys/dev/tc/tcds.c 9 Jul 2007 22:45:01 -0000 @@ -106,7 +106,7 @@ struct tcds_softc { #define TCDSF_FASTSCSI 0x02 /* supports Fast SCSI */ /* Definition of the driver for autoconfig. */ -static int tcdsmatch(struct device *, struct cfdata *, void *); +static int tcdsmatch(struct device *, cfdata_t, void *); static void tcdsattach(struct device *, struct device *, void *); static int tcdsprint(void *, const char *); @@ -144,7 +144,7 @@ tcds_lookup(const char *modname) } static int -tcdsmatch(struct device *parent, struct cfdata *cfdata, void *aux) +tcdsmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/tfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/tfb.c,v retrieving revision 1.52 diff -d -p -u -u -r1.52 tfb.c --- sys/dev/tc/tfb.c 4 Mar 2007 15:57:25 -0000 1.52 +++ sys/dev/tc/tfb.c 9 Jul 2007 22:45:01 -0000 @@ -176,7 +176,7 @@ struct tfb_softc { #define TX_CTL_SEG_ENA 0x10 #define TX_CTL_SEG 0x0f -static int tfbmatch(struct device *, struct cfdata *, void *); +static int tfbmatch(struct device *, cfdata_t, void *); static void tfbattach(struct device *, struct device *, void *); CFATTACH_DECL(tfb, sizeof(struct tfb_softc), @@ -267,7 +267,7 @@ static const u_int8_t flip[256] = { }; static int -tfbmatch(struct device *parent, struct cfdata *match, void *aux) +tfbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/xcfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/xcfb.c,v retrieving revision 1.44 diff -d -p -u -u -r1.44 xcfb.c --- sys/dev/tc/xcfb.c 6 Mar 2007 22:29:29 -0000 1.44 +++ sys/dev/tc/xcfb.c 9 Jul 2007 22:45:01 -0000 @@ -96,7 +96,7 @@ struct xcfb_softc { int sc_csr; /* software copy of IMS332 CSR A */ }; -static int xcfbmatch(struct device *, struct cfdata *, void *); +static int xcfbmatch(struct device *, cfdata_t, void *); static void xcfbattach(struct device *, struct device *, void *); CFATTACH_DECL(xcfb, sizeof(struct xcfb_softc), @@ -203,7 +203,7 @@ static const u_int8_t shuffle[256] = { }; static int -xcfbmatch(struct device *parent, struct cfdata *match, void *aux) +xcfbmatch(struct device *parent, cfdata_t cfdata, void *aux) { struct tc_attach_args *ta = aux; Index: sys/dev/tc/zs_ioasic.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/zs_ioasic.c,v retrieving revision 1.32 diff -d -p -u -u -r1.32 zs_ioasic.c --- sys/dev/tc/zs_ioasic.c 10 May 2006 06:24:03 -0000 1.32 +++ sys/dev/tc/zs_ioasic.c 9 Jul 2007 22:45:01 -0000 @@ -186,10 +186,10 @@ zs_ioasic_get_chan_addr(tc_addr_t zsaddr ****************************************************************/ /* Definition of the driver for autoconfig. */ -static int zs_ioasic_match(struct device *, struct cfdata *, void *); +static int zs_ioasic_match(struct device *, cfdata_t, void *); static void zs_ioasic_attach(struct device *, struct device *, void *); static int zs_ioasic_print(void *, const char *name); -static int zs_ioasic_submatch(struct device *, struct cfdata *, +static int zs_ioasic_submatch(struct device *, cfdata_t, const int *, void *); CFATTACH_DECL(zsc_ioasic, sizeof(struct zsc_softc), @@ -203,7 +203,7 @@ static void zs_ioasic_softintr(void *); * Is the zs chip present? */ static int -zs_ioasic_match(struct device *parent, struct cfdata *cf, void *aux) +zs_ioasic_match(struct device *parent, cfdata_t cf, void *aux) { struct ioasicdev_attach_args *d = aux; tc_addr_t zs_addr; @@ -371,7 +371,7 @@ zs_ioasic_print(void *aux, const char *n } static int -zs_ioasic_submatch(struct device *parent, struct cfdata *cf, const int *locs, +zs_ioasic_submatch(struct device *parent, cfdata_t cf, const int *locs, void *aux) { struct zsc_softc *zs = (void *)parent; Index: sys/dev/tc/zskbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/zskbd.c,v retrieving revision 1.15 diff -d -p -u -u -r1.15 zskbd.c --- sys/dev/tc/zskbd.c 4 Mar 2007 06:02:47 -0000 1.15 +++ sys/dev/tc/zskbd.c 9 Jul 2007 22:45:02 -0000 @@ -120,7 +120,7 @@ static struct zsops zsops_zskbd; static void zskbd_input(struct zskbd_softc *, int); -static int zskbd_match(struct device *, struct cfdata *, void *); +static int zskbd_match(struct device *, cfdata_t, void *); static void zskbd_attach(struct device *, struct device *, void *); CFATTACH_DECL(zskbd, sizeof(struct zskbd_softc), @@ -161,7 +161,7 @@ int zskbd_cnattach(struct zs_chanstate * * kbd_match: how is this zs channel configured? */ static int -zskbd_match(struct device *parent, struct cfdata *cf, void *aux) +zskbd_match(struct device *parent, cfdata_t cf, void *aux) { struct zsc_attach_args *args = aux; Index: sys/dev/tc/zsms.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/zsms.c,v retrieving revision 1.16 diff -d -p -u -u -r1.16 zsms.c --- sys/dev/tc/zsms.c 4 Mar 2007 06:02:47 -0000 1.16 +++ sys/dev/tc/zsms.c 9 Jul 2007 22:45:02 -0000 @@ -110,7 +110,7 @@ struct zsms_softc { /* driver status in static struct zsops zsops_zsms; -static int zsms_match(struct device *, struct cfdata *, void *); +static int zsms_match(struct device *, cfdata_t, void *); static void zsms_attach(struct device *, struct device *, void *); static void zsms_input(void *, int); @@ -128,7 +128,7 @@ static const struct wsmouse_accessops zs }; static int -zsms_match(struct device *parent, struct cfdata *cf, void *aux) +zsms_match(struct device *parent, cfdata_t cf, void *aux) { struct zsc_attach_args *args = aux; Index: sys/dev/usb/ucom.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ucom.c,v retrieving revision 1.70 diff -d -p -u -u -r1.70 ucom.c --- sys/dev/usb/ucom.c 4 Mar 2007 06:02:48 -0000 1.70 +++ sys/dev/usb/ucom.c 9 Jul 2007 22:45:11 -0000 @@ -74,8 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.7 #include "ucom.h" -#include "locators.h" - #if NUCOM > 0 #ifdef UCOM_DEBUG @@ -1139,14 +1137,14 @@ ucomprint(void *aux, const char *pnp) } int -ucomsubmatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +ucomsubmatch(struct device *parent, cfdata_t cf, prop_dictionary_t locs, + void *aux) { struct ucom_attach_args *uca = aux; if (uca->portno != UCOM_UNK_PORTNO && - cf->cf_loc[UCOMBUSCF_PORTNO] != UCOMBUSCF_PORTNO_DEFAULT && - cf->cf_loc[UCOMBUSCF_PORTNO] != uca->portno) + !locator_match_uint64(locs, "portno", uca->portno)) return (0); + return (config_match(parent, cf, aux)); } Index: sys/dev/usb/ucomvar.h =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ucomvar.h,v retrieving revision 1.15 diff -d -p -u -u -r1.15 ucomvar.h --- sys/dev/usb/ucomvar.h 4 Mar 2007 06:02:49 -0000 1.15 +++ sys/dev/usb/ucomvar.h 9 Jul 2007 22:45:11 -0000 @@ -101,6 +101,5 @@ struct ucom_attach_args { }; int ucomprint(void *, const char *); -int ucomsubmatch(struct device *t, struct cfdata *, - const int *, void *); +int ucomsubmatch(struct device *t, cfdata_t, prop_dictionary_t, void *); void ucom_status_change(struct ucom_softc *); Index: sys/dev/usb/ucycom.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ucycom.c,v retrieving revision 1.17 diff -d -p -u -u -r1.17 ucycom.c --- sys/dev/usb/ucycom.c 4 Mar 2007 06:02:49 -0000 1.17 +++ sys/dev/usb/ucycom.c 9 Jul 2007 22:45:12 -0000 @@ -181,7 +181,7 @@ Static const struct usb_devno ucycom_dev USB_DECLARE_DRIVER(ucycom); int -ucycom_match(struct device *parent, struct cfdata *match, +ucycom_match(struct device *parent, cfdata_t match, void *aux) { struct uhidev_attach_arg *uha = aux; Index: sys/dev/usb/ugen.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ugen.c,v retrieving revision 1.92 diff -d -p -u -u -r1.92 ugen.c --- sys/dev/usb/ugen.c 4 Mar 2007 06:02:49 -0000 1.92 +++ sys/dev/usb/ugen.c 9 Jul 2007 22:45:12 -0000 @@ -216,7 +216,7 @@ USB_MATCH(ugen) { USB_MATCH_START(ugen, uaa); - if (match->cf_flags & 1) + if (cfdata_flags(cfdata) & 1) return (UMATCH_HIGHEST); else if (uaa->usegeneric) return (UMATCH_GENERIC); Index: sys/dev/usb/uhid.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/uhid.c,v retrieving revision 1.76 diff -d -p -u -u -r1.76 uhid.c --- sys/dev/usb/uhid.c 4 Mar 2007 06:02:49 -0000 1.76 +++ sys/dev/usb/uhid.c 9 Jul 2007 22:45:13 -0000 @@ -127,8 +127,7 @@ Static int uhid_do_ioctl(struct uhid_sof USB_DECLARE_DRIVER(uhid); int -uhid_match(struct device *parent, struct cfdata *match, - void *aux) +uhid_match(struct device *parent, cfdata_t cfdata, void *aux) { #ifdef UHID_DEBUG struct uhidev_attach_arg *uha = aux; @@ -136,7 +135,7 @@ uhid_match(struct device *parent, struct DPRINTF(("uhid_match: report=%d\n", uha->reportid)); - if (match->cf_flags & 1) + if (cfdata_flags(cfdata) & 1) return (UMATCH_HIGHEST); else return (UMATCH_IFACECLASS_GENERIC); Index: sys/dev/usb/uhidev.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/uhidev.c,v retrieving revision 1.35 diff -d -p -u -u -r1.35 uhidev.c --- sys/dev/usb/uhidev.c 15 Mar 2007 15:11:54 -0000 1.35 +++ sys/dev/usb/uhidev.c 9 Jul 2007 22:45:14 -0000 @@ -67,8 +67,6 @@ __KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1 /* Report descriptor for broken Wacom Graphire */ #include -#include "locators.h" - #ifdef UHIDEV_DEBUG #define DPRINTF(x) if (uhidevdebug) logprintf x #define DPRINTFN(n,x) if (uhidevdebug>(n)) logprintf x @@ -100,6 +98,7 @@ USB_ATTACH(uhidev) usbd_interface_handle iface = uaa->iface; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; + prop_dictionary_t locs; struct uhidev_attach_arg uha; struct uhidev *dev; int size, nrepid, repid, repsz; @@ -109,7 +108,14 @@ USB_ATTACH(uhidev) const void *descptr; usbd_status err; char *devinfop; - int locs[UHIDBUSCF_NLOCS]; + + locs = prop_dictionary_create(); + if (locs == NULL) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dev)); + sc->sc_dying = 1; + return; + } sc->sc_udev = uaa->device; sc->sc_iface = iface; @@ -137,6 +143,7 @@ USB_ATTACH(uhidev) printf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; + prop_object_release(locs); USB_ATTACH_ERROR_RETURN; } @@ -167,6 +174,7 @@ USB_ATTACH(uhidev) if (sc->sc_iep_addr == -1) { printf("%s: no input interrupt endpoint\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; + prop_object_release(locs); USB_ATTACH_ERROR_RETURN; } @@ -218,6 +226,7 @@ USB_ATTACH(uhidev) if (err) { printf("%s: no report descriptor\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; + prop_object_release(locs); USB_ATTACH_ERROR_RETURN; } @@ -253,6 +262,7 @@ USB_ATTACH(uhidev) free(repsizes, M_TEMP); nomem: printf("%s: no memory\n", USBDEVNAME(sc->sc_dev)); + prop_object_release(locs); USB_ATTACH_ERROR_RETURN; } sc->sc_nrepid = nrepid; @@ -282,7 +292,15 @@ nomem: ; /* already NULL in sc->sc_subdevs[repid] */ } else { uha.reportid = repid; - locs[UHIDBUSCF_REPORTID] = repid; + + if (! prop_dictionary_set_uint32(locs, "reportid", + repid)) { + aprint_error("%s: could not create locators\n", + device_xname(&sc->sc_dev)); + prop_object_release(locs); + free(repsizes, M_TEMP); + USB_ATTACH_ERROR_RETURN; + } dev = (struct uhidev *)config_found_sm_loc(self, "uhidbus", locs, &uha, @@ -297,6 +315,7 @@ nomem: free(repsizes, M_TEMP); printf("%s: sc_intr == NULL\n", USBDEVNAME(sc->sc_dev)); + prop_object_release(locs); USB_ATTACH_ERROR_RETURN; } #endif @@ -308,6 +327,7 @@ nomem: } } } + prop_object_release(locs); free(repsizes, M_TEMP); USB_ATTACH_SUCCESS_RETURN; Index: sys/dev/usb/ukbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ukbd.c,v retrieving revision 1.95 diff -d -p -u -u -r1.95 ukbd.c --- sys/dev/usb/ukbd.c 4 Mar 2007 06:02:49 -0000 1.95 +++ sys/dev/usb/ukbd.c 9 Jul 2007 22:45:14 -0000 @@ -278,7 +278,7 @@ const struct wskbd_mapdata ukbd_keymapda USB_DECLARE_DRIVER(ukbd); int -ukbd_match(struct device *parent, struct cfdata *match, +ukbd_match(struct device *parent, cfdata_t match, void *aux) { struct uhidev_attach_arg *uha = aux; Index: sys/dev/usb/ums.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ums.c,v retrieving revision 1.68 diff -d -p -u -u -r1.68 ums.c --- sys/dev/usb/ums.c 4 Mar 2007 06:02:49 -0000 1.68 +++ sys/dev/usb/ums.c 9 Jul 2007 22:45:17 -0000 @@ -129,7 +129,7 @@ const struct wsmouse_accessops ums_acces USB_DECLARE_DRIVER(ums); int -ums_match(struct device *parent, struct cfdata *match, +ums_match(struct device *parent, cfdata_t match, void *aux) { struct uhidev_attach_arg *uha = aux; Index: sys/dev/usb/usb.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/usb.c,v retrieving revision 1.96 diff -d -p -u -u -r1.96 usb.c --- sys/dev/usb/usb.c 4 Mar 2007 06:02:50 -0000 1.96 +++ sys/dev/usb/usb.c 9 Jul 2007 22:45:18 -0000 @@ -236,7 +236,7 @@ USB_ATTACH(usb) * until the USB event thread is running, which means that * the keyboard will not work until after cold boot. */ - if (cold && (device_cfdata(&sc->sc_dev)->cf_flags & 1)) + if (cold && (cfdata_flags(device_cfdata(&sc->sc_dev)) & 1)) dev->hub->explore(sc->sc_bus->root_hub); #endif } else { Index: sys/dev/usb/usb_port.h =================================================================== RCS file: /cvsroot/src/sys/dev/usb/usb_port.h,v retrieving revision 1.75 diff -d -p -u -u -r1.75 usb_port.h --- sys/dev/usb/usb_port.h 13 Mar 2007 13:51:56 -0000 1.75 +++ sys/dev/usb/usb_port.h 9 Jul 2007 22:45:18 -0000 @@ -140,7 +140,7 @@ typedef struct malloc_type *usb_malloc_t #define USB_DNAME(dname) dname #define USB_DECLARE_DRIVER(dname) \ -int __CONCAT(dname,_match)(struct device *, struct cfdata *, void *); \ +int __CONCAT(dname,_match)(struct device *, cfdata_t, void *); \ void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \ int __CONCAT(dname,_detach)(struct device *, int); \ int __CONCAT(dname,_activate)(struct device *, enum devact); \ @@ -155,8 +155,7 @@ CFATTACH_DECL(USB_DNAME(dname), \ ___CONCAT(dname,_activate)) #define USB_MATCH(dname) \ -int __CONCAT(dname,_match)(struct device *parent, \ - struct cfdata *match, void *aux) +int __CONCAT(dname,_match)(struct device *parent, cfdata_t cfdata, void *aux) #define USB_MATCH_START(dname, uaa) \ struct usb_attach_arg *uaa = aux Index: sys/dev/usb/usb_subr.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.147 diff -d -p -u -u -r1.147 usb_subr.c --- sys/dev/usb/usb_subr.c 20 May 2007 09:24:55 -0000 1.147 +++ sys/dev/usb/usb_subr.c 9 Jul 2007 22:45:19 -0000 @@ -91,10 +91,8 @@ Static int usbd_getnewaddr(usbd_bus_hand #if defined(__NetBSD__) Static int usbd_print(void *, const char *); Static int usbd_ifprint(void *, const char *); -Static int usbd_submatch(device_ptr_t, struct cfdata *, - const int *, void *); -Static int usbd_ifsubmatch(device_ptr_t, struct cfdata *, - const int *, void *); +Static int usbd_submatch(device_ptr_t, cfdata_t, prop_dictionary_t, void *); +Static int usbd_ifsubmatch(device_ptr_t, cfdata_t, prop_dictionary_t, void *); #elif defined(__OpenBSD__) Static int usbd_print(void *aux, const char *pnp); Static int usbd_submatch(device_ptr_t, void *, void *); @@ -1241,14 +1239,15 @@ usbd_ifprint(void *aux, const char *pnp) #if defined(__NetBSD__) int -usbd_submatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +usbd_submatch(struct device *parent, cfdata_t cf, prop_dictionary_t locators, + void *aux) { + prop_dictionary_t cflocs = cfdata_locators(cf); #elif defined(__OpenBSD__) int usbd_submatch(struct device *parent, void *match, void *aux) { - struct cfdata *cf = match; + cfdata_t cf = match; #endif struct usb_attach_arg *uaa = aux; @@ -1258,29 +1257,27 @@ usbd_submatch(struct device *parent, voi uaa->vendor, cf->uhubcf_vendor, uaa->product, cf->uhubcf_product, uaa->release, cf->uhubcf_release)); + /* XXXfreza caller should build locator dictionary we could match + * XXXfreza at which point we could use config_stdsubmatch + */ if (uaa->port != 0 && /* root hub has port 0, it should match */ - ((cf->uhubcf_port != UHUB_UNK_PORT && - cf->uhubcf_port != uaa->port) || + (!locator_match_uint64(cflocs, "port", uaa->port) || (uaa->vendor != UHUB_UNK_VENDOR && - cf->uhubcf_vendor != UHUB_UNK_VENDOR && - cf->uhubcf_vendor != uaa->vendor) || + !locator_match_uint64(cflocs, "vendor", uaa->vendor)) || (uaa->product != UHUB_UNK_PRODUCT && - cf->uhubcf_product != UHUB_UNK_PRODUCT && - cf->uhubcf_product != uaa->product) || + !locator_match_uint64(cflocs, "product", uaa->product)) || (uaa->release != UHUB_UNK_RELEASE && - cf->uhubcf_release != UHUB_UNK_RELEASE && - cf->uhubcf_release != uaa->release) - ) - ) + !locator_match_uint64(cflocs, "release", uaa->release)))) return 0; return (config_match(parent, cf, aux)); } int -usbd_ifsubmatch(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +usbd_ifsubmatch(struct device *parent, cfdata_t cf, prop_dictionary_t locators, + void *aux) { struct usbif_attach_arg *uaa = aux; + prop_dictionary_t cflocs = cfdata_locators(cf); DPRINTFN(5,("usbd_submatch port=%d,%d configno=%d,%d " "ifaceno=%d,%d vendor=%d,%d product=%d,%d release=%d,%d\n", @@ -1290,24 +1287,21 @@ usbd_ifsubmatch(struct device *parent, s uaa->vendor, cf->uhubcf_vendor, uaa->product, cf->uhubcf_product, uaa->release, cf->uhubcf_release)); + /* XXXfreza caller should construct proper locators we could match, + * XXXfreza at which point we could just use config_stdsubmatch + */ if (uaa->port != 0 && /* root hub has port 0, it should match */ - ((cf->uhubcf_port != UHUB_UNK_PORT && - cf->uhubcf_port != uaa->port) || + (!locator_match_uint64(cflocs, "port", uaa->port) || (uaa->configno != UHUB_UNK_CONFIGURATION && - cf->uhubcf_configuration != UHUB_UNK_CONFIGURATION && - cf->uhubcf_configuration != uaa->configno) || + !locator_match_uint64(cflocs, "configuration", uaa->configno)) || (uaa->ifaceno != UHUB_UNK_INTERFACE && - cf->uhubcf_interface != UHUB_UNK_INTERFACE && - cf->uhubcf_interface != uaa->ifaceno) || + !locator_match_uint64(cflocs, "interface", uaa->ifaceno)) || (uaa->vendor != UHUB_UNK_VENDOR && - cf->uhubcf_vendor != UHUB_UNK_VENDOR && - cf->uhubcf_vendor != uaa->vendor) || + !locator_match_uint64(cflocs, "vendor", uaa->vendor)) || (uaa->product != UHUB_UNK_PRODUCT && - cf->uhubcf_product != UHUB_UNK_PRODUCT && - cf->uhubcf_product != uaa->product) || + !locator_match_uint64(cflocs, "product", uaa->product)) || (uaa->release != UHUB_UNK_RELEASE && - cf->uhubcf_release != UHUB_UNK_RELEASE && - cf->uhubcf_release != uaa->release) + !locator_match_uint64(cflocs, "release", uaa->release)) ) ) return 0; Index: sys/dev/usb/usbdivar.h =================================================================== RCS file: /cvsroot/src/sys/dev/usb/usbdivar.h,v retrieving revision 1.80 diff -d -p -u -u -r1.80 usbdivar.h --- sys/dev/usb/usbdivar.h 26 Feb 2007 13:23:59 -0000 1.80 +++ sys/dev/usb/usbdivar.h 9 Jul 2007 22:45:23 -0000 @@ -285,41 +285,15 @@ void usb_schedsoftintr(struct usbd_bus /* Locator stuff. */ -#if defined(__NetBSD__) -#include "locators.h" -#elif defined(__FreeBSD__) || defined(__OpenBSD__) -/* XXX these values are used to statically bind some elements in the USB tree - * to specific driver instances. This should be somehow emulated in FreeBSD - * but can be done later on. - * The values are copied from the files.usb file in the NetBSD sources. +/* + * XXXfreza These should die. We should just pass locators dictionary + * XXXfreza instead of trying to stuff everything into attach_args. + * XXXfreza Removal will affect at least usb_subr.c and ucom_attach_args + * XXXfreza users. */ -#define UHUBCF_PORT_DEFAULT -1 -#define UHUBCF_CONFIGURATION_DEFAULT -1 -#define UHUBCF_INTERFACE_DEFAULT -1 -#define UHUBCF_VENDOR_DEFAULT -1 -#define UHUBCF_PRODUCT_DEFAULT -1 -#define UHUBCF_RELEASE_DEFAULT -1 -#endif - -#if defined (__OpenBSD__) -#define UHUBCF_PORT 0 -#define UHUBCF_CONFIGURATION 1 -#define UHUBCF_INTERFACE 2 -#define UHUBCF_VENDOR 3 -#define UHUBCF_PRODUCT 4 -#define UHUBCF_RELEASE 5 -#endif - -#define uhubcf_port cf_loc[USBDEVIFCF_PORT] -#define uhubcf_configuration cf_loc[USBDEVIFCF_CONFIGURATION] -#define uhubcf_interface cf_loc[USBDEVIFCF_INTERFACE] -#define uhubcf_vendor cf_loc[USBDEVIFCF_VENDOR] -#define uhubcf_product cf_loc[USBDEVIFCF_PRODUCT] -#define uhubcf_release cf_loc[USBDEVIFCF_RELEASE] -#define UHUB_UNK_PORT USBDEVIFCF_PORT_DEFAULT /* wildcarded 'port' */ -#define UHUB_UNK_CONFIGURATION USBDEVIFCF_CONFIGURATION_DEFAULT /* wildcarded 'configuration' */ -#define UHUB_UNK_INTERFACE USBDEVIFCF_INTERFACE_DEFAULT /* wildcarded 'interface' */ -#define UHUB_UNK_VENDOR USBDEVIFCF_VENDOR_DEFAULT /* wildcarded 'vendor' */ -#define UHUB_UNK_PRODUCT USBDEVIFCF_PRODUCT_DEFAULT /* wildcarded 'product' */ -#define UHUB_UNK_RELEASE USBDEVIFCF_RELEASE_DEFAULT /* wildcarded 'release' */ - +#define UHUB_UNK_PORT -1 /* undefined 'port' */ +#define UHUB_UNK_CONFIGURATION -1 /* undefined 'configuration' */ +#define UHUB_UNK_INTERFACE -1 /* undefined 'interface' */ +#define UHUB_UNK_VENDOR -1 /* undefined 'vendor' */ +#define UHUB_UNK_PRODUCT -1 /* undefined 'product' */ +#define UHUB_UNK_RELEASE -1 /* undefined 'release' */ Index: sys/dev/vme/if_ie_vme.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/if_ie_vme.c,v retrieving revision 1.22 diff -d -p -u -u -r1.22 if_ie_vme.c --- sys/dev/vme/if_ie_vme.c 11 Dec 2005 12:24:07 -0000 1.22 +++ sys/dev/vme/if_ie_vme.c 9 Jul 2007 22:45:26 -0000 @@ -238,7 +238,7 @@ static void ie_vmeattend(struct ie_softc static void ie_vmerun(struct ie_softc *); static int ie_vmeintr(struct ie_softc *, int); -int ie_vme_match(struct device *, struct cfdata *, void *); +int ie_vme_match(struct device *, cfdata_t, void *); void ie_vme_attach(struct device *, struct device *, void *); struct ie_vme_softc { Index: sys/dev/vme/sc_vme.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/sc_vme.c,v retrieving revision 1.13 diff -d -p -u -u -r1.13 sc_vme.c --- sys/dev/vme/sc_vme.c 29 Mar 2006 04:16:51 -0000 1.13 +++ sys/dev/vme/sc_vme.c 9 Jul 2007 22:45:27 -0000 @@ -112,7 +112,7 @@ __KERNEL_RCSID(0, "$NetBSD: sc_vme.c,v 1 int sunsc_vme_options = 0; -static int sc_vme_match(struct device *, struct cfdata *, void *); +static int sc_vme_match(struct device *, cfdata_t, void *); static void sc_vme_attach(struct device *, struct device *, void *); static int sc_vme_intr(void *); Index: sys/dev/vme/si.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/si.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 si.c --- sys/dev/vme/si.c 4 Mar 2007 06:02:50 -0000 1.18 +++ sys/dev/vme/si.c 9 Jul 2007 22:45:27 -0000 @@ -172,7 +172,7 @@ struct si_softc { #define SI_OPTIONS_BITS "\10\3RESELECT\2DMA_INTR\1DMA" int si_options = SI_ENABLE_DMA|SI_DMA_INTR|SI_DO_RESELECT; -static int si_match(struct device *, struct cfdata *, void *); +static int si_match(struct device *, cfdata_t, void *); static void si_attach(struct device *, struct device *, void *); static int si_intr(void *); static void si_reset_adapter(struct ncr5380_softc *); Index: sys/dev/vme/vme.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/vme.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 vme.c --- sys/dev/vme/vme.c 25 Mar 2006 23:26:51 -0000 1.18 +++ sys/dev/vme/vme.c 9 Jul 2007 22:45:27 -0000 @@ -47,7 +47,7 @@ static int vmesubmatch1(struct device*, const int *, void*); static int vmesubmatch(struct device*, struct cfdata*, const int *, void*); -int vmematch(struct device *, struct cfdata *, void *); +int vmematch(struct device *, cfdata_t, void *); void vmeattach(struct device*, struct device*,void*); static struct extent *vme_select_map(struct vmebus_softc*, vme_am_t); @@ -175,7 +175,7 @@ vmesubmatch(bus, dev, ldesc, aux) int vmematch(parent, match, aux) struct device *parent; - struct cfdata *match; + cfdata_t cfdata; void *aux; { return (1); Index: sys/dev/vme/xd.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/xd.c,v retrieving revision 1.67 diff -d -p -u -u -r1.67 xd.c --- sys/dev/vme/xd.c 4 Mar 2007 22:12:44 -0000 1.67 +++ sys/dev/vme/xd.c 9 Jul 2007 22:45:28 -0000 @@ -241,9 +241,9 @@ void xd_dmamem_free(bus_dma_tag_t, bus_d int xdcintr(void *); /* autoconf */ -int xdcmatch(struct device *, struct cfdata *, void *); +int xdcmatch(struct device *, cfdata_t, void *); void xdcattach(struct device *, struct device *, void *); -int xdmatch(struct device *, struct cfdata *, void *); +int xdmatch(struct device *, cfdata_t, void *); void xdattach(struct device *, struct device *, void *); static int xdc_probe(void *, bus_space_tag_t, bus_space_handle_t); Index: sys/dev/vme/xy.c =================================================================== RCS file: /cvsroot/src/sys/dev/vme/xy.c,v retrieving revision 1.70 diff -d -p -u -u -r1.70 xy.c --- sys/dev/vme/xy.c 4 Mar 2007 22:12:44 -0000 1.70 +++ sys/dev/vme/xy.c 9 Jul 2007 22:45:28 -0000 @@ -183,9 +183,9 @@ void xy_dmamem_free(bus_dma_tag_t, bus_d int xycintr(void *); /* autoconf */ -int xycmatch(struct device *, struct cfdata *, void *); +int xycmatch(struct device *, cfdata_t, void *); void xycattach(struct device *, struct device *, void *); -int xymatch(struct device *, struct cfdata *, void *); +int xymatch(struct device *, cfdata_t, void *); void xyattach(struct device *, struct device *, void *); static int xyc_probe(void *, bus_space_tag_t, bus_space_handle_t); Index: sys/dev/wscons/wsdisplay.c =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wsdisplay.c,v retrieving revision 1.108 diff -d -p -u -u -r1.108 wsdisplay.c --- sys/dev/wscons/wsdisplay.c 5 Mar 2007 16:06:52 -0000 1.108 +++ sys/dev/wscons/wsdisplay.c 9 Jul 2007 22:45:30 -0000 @@ -154,9 +154,9 @@ struct wsdisplay_scroll_data wsdisplay_d extern struct cfdriver wsdisplay_cd; /* Autoconfiguration definitions. */ -static int wsdisplay_emul_match(struct device *, struct cfdata *, void *); +static int wsdisplay_emul_match(struct device *, cfdata_t, void *); static void wsdisplay_emul_attach(struct device *, struct device *, void *); -static int wsdisplay_noemul_match(struct device *, struct cfdata *, void *); +static int wsdisplay_noemul_match(struct device *, cfdata_t, void *); static void wsdisplay_noemul_attach(struct device *, struct device *, void *); CFATTACH_DECL(wsdisplay_emul, sizeof (struct wsdisplay_softc), @@ -196,7 +196,7 @@ static int wsdisplayparam(struct tty *, #define WSSCREEN_HAS_TTY(scr) ((scr)->scr_tty != NULL) static void wsdisplay_common_attach(struct wsdisplay_softc *sc, - int console, int kbdmux, const struct wsscreen_list *, + int console, const struct wsscreen_list *, const struct wsdisplay_accessops *accessops, void *accesscookie); @@ -505,22 +505,22 @@ wsdisplay_delscreen(struct wsdisplay_sof * Autoconfiguration functions. */ int -wsdisplay_emul_match(struct device *parent, struct cfdata *match, - void *aux) +wsdisplay_emul_match(struct device *parent, cfdata_t cfdata, void *aux) { struct wsemuldisplaydev_attach_args *ap = aux; + prop_dictionary_t cflocs = cfdata_locators(cfdata); - if (match->wsemuldisplaydevcf_console != - WSEMULDISPLAYDEVCF_CONSOLE_UNK) { + if (locator_defined(cflocs, "console")) { /* * If console-ness of device specified, either match * exactly (at high priority), or fail. */ - if (match->wsemuldisplaydevcf_console != 0 && - ap->console != 0) - return (10); - else + if (locator_match_uint64(cflocs, "console", 0) || + ap->console == 0) { return (0); + } else { + return (10); + } } /* If console-ness unspecified, it wins. */ @@ -538,9 +538,8 @@ wsdisplay_emul_attach(struct device *par if (wsdisplay_console_attached && ap->console) ap->console = 0; - wsdisplay_common_attach(sc, ap->console, - device_cfdata(&sc->sc_dv)->wsemuldisplaydevcf_kbdmux, ap->scrdata, - ap->accessops, ap->accesscookie); + wsdisplay_common_attach(sc, ap->console, ap->scrdata, + ap->accessops, ap->accesscookie); if (ap->console) { int maj; @@ -572,7 +571,7 @@ wsemuldisplaydevprint(void *aux, const c int wsdisplay_noemul_match(struct device *parent, - struct cfdata *match, void *aux) + cfdata_t cfdata, void *aux) { #if 0 /* -Wunused */ struct wsdisplaydev_attach_args *ap = aux; @@ -589,9 +588,7 @@ wsdisplay_noemul_attach(struct device *p struct wsdisplay_softc *sc = (struct wsdisplay_softc *)self; struct wsdisplaydev_attach_args *ap = aux; - wsdisplay_common_attach(sc, 0, - device_cfdata(&sc->sc_dv)->wsemuldisplaydevcf_kbdmux, NULL, - ap->accessops, ap->accesscookie); + wsdisplay_common_attach(sc, 0, NULL, ap->accessops, ap->accesscookie); } /* Print function (for parent devices). */ @@ -609,7 +606,7 @@ wsdisplaydevprint(void *aux, const char } static void -wsdisplay_common_attach(struct wsdisplay_softc *sc, int console, int kbdmux, +wsdisplay_common_attach(struct wsdisplay_softc *sc, int console, const struct wsscreen_list *scrdata, const struct wsdisplay_accessops *accessops, void *accesscookie) @@ -617,14 +614,27 @@ wsdisplay_common_attach(struct wsdisplay static int hookset; int i, start=0; #if NWSKBD > 0 + prop_dictionary_t locs = device_locators(&sc->sc_dv); struct wsevsrc *kme; + uint8_t ukbdmux; + int kbdmux; #if NWSMUX > 0 struct wsmux_softc *mux; +#endif +#endif +#if NWSKBD > 0 + if (prop_dictionary_get_uint8(locs, "kbdmux", &ukbdmux)) + kbdmux = ukbdmux; + else + kbdmux = -1; +#if NWSMUX > 0 if (kbdmux >= 0) mux = wsmux_getmux(kbdmux); - else - mux = wsmux_create("dmux", device_unit(&sc->sc_dv)); + else { + kbdmux = device_unit(&sc->sc_dv); + mux = wsmux_create("wsmux", kbdmux); + } /* XXX panic()ing isn't nice, but attach cannot fail */ if (mux == NULL) panic("wsdisplay_common_attach: no memory"); Index: sys/dev/wscons/wsdisplayvar.h =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wsdisplayvar.h,v retrieving revision 1.42 diff -d -p -u -u -r1.42 wsdisplayvar.h --- sys/dev/wscons/wsdisplayvar.h 4 Mar 2007 06:02:51 -0000 1.42 +++ sys/dev/wscons/wsdisplayvar.h 9 Jul 2007 22:45:30 -0000 @@ -149,13 +149,6 @@ struct wsemuldisplaydev_attach_args { void *accesscookie; /* access cookie */ }; -#include "locators.h" - -#define wsemuldisplaydevcf_console cf_loc[WSEMULDISPLAYDEVCF_CONSOLE] /* spec'd as console? */ -#define WSEMULDISPLAYDEVCF_CONSOLE_UNK (WSEMULDISPLAYDEVCF_CONSOLE_DEFAULT) -#define wsemuldisplaydevcf_kbdmux cf_loc[WSEMULDISPLAYDEVCF_KBDMUX] -#define wsdisplaydevcf_kbdmux cf_loc[WSDISPLAYDEVCF_KBDMUX] - struct wscons_syncops { int (*detach)(void *, int, void (*)(void *, int, int), void *); int (*attach)(void *, int, void (*)(void *, int, int), void *); Index: sys/dev/wscons/wskbd.c =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wskbd.c,v retrieving revision 1.103 diff -d -p -u -u -r1.103 wskbd.c --- sys/dev/wscons/wskbd.c 4 Apr 2007 14:50:21 -0000 1.103 +++ sys/dev/wscons/wskbd.c 9 Jul 2007 22:45:32 -0000 @@ -213,7 +213,7 @@ struct wskbd_softc { dst |= (src & MOD_META_R) ? MOD_META_R : 0; \ } while (0) -static int wskbd_match(struct device *, struct cfdata *, void *); +static int wskbd_match(struct device *, cfdata_t, void *); static void wskbd_attach(struct device *, struct device *, void *); static int wskbd_detach(struct device *, int); static int wskbd_activate(struct device *, enum devact); @@ -358,19 +358,21 @@ wskbddevprint(void *aux, const char *pnp } int -wskbd_match(struct device *parent, struct cfdata *match, void *aux) +wskbd_match(struct device *parent, cfdata_t cfdata, void *aux) { struct wskbddev_attach_args *ap = aux; + prop_dictionary_t cflocs = cfdata_locators(cfdata); - if (match->wskbddevcf_console != WSKBDDEVCF_CONSOLE_UNK) { + if (locator_defined(cflocs, "console")) { /* * If console-ness of device specified, either match * exactly (at high priority), or fail. */ - if (match->wskbddevcf_console != 0 && ap->console != 0) - return (10); - else + if (locator_match_uint64(cflocs, "console", 0) || + ap->console == 0) return (0); + else + return (10); } /* If console-ness unspecified, it wins. */ @@ -383,7 +385,9 @@ wskbd_attach(struct device *parent, stru struct wskbd_softc *sc = (struct wskbd_softc *)self; struct wskbddev_attach_args *ap = aux; #if NWSMUX > 0 + prop_dictionary_t locs = device_locators(self); int mux, error; + uint8_t umux; #endif sc->sc_isconsole = ap->console; @@ -392,7 +396,11 @@ wskbd_attach(struct device *parent, stru sc->sc_base.me_ops = &wskbd_srcops; #endif #if NWSMUX > 0 - mux = device_cfdata(&sc->sc_base.me_dv)->wskbddevcf_mux; + if (prop_dictionary_get_uint8(locs, "mux", &umux)) + mux = umux; + else + mux = -1; + if (ap->console) { /* Ignore mux for console; it always goes to the console mux. */ /* printf(" (mux %d ignored for console)", mux); */ Index: sys/dev/wscons/wskbdvar.h =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wskbdvar.h,v retrieving revision 1.14 diff -d -p -u -u -r1.14 wskbdvar.h --- sys/dev/wscons/wskbdvar.h 4 Mar 2007 06:02:51 -0000 1.14 +++ sys/dev/wscons/wskbdvar.h 9 Jul 2007 22:45:32 -0000 @@ -70,13 +70,6 @@ struct wskbddev_attach_args { void *accesscookie; /* access cookie */ }; -#include "locators.h" - -#define wskbddevcf_console cf_loc[WSKBDDEVCF_CONSOLE] /* spec'd as console? */ -#define WSKBDDEVCF_CONSOLE_UNK (WSKBDDEVCF_CONSOLE_DEFAULT) - -#define wskbddevcf_mux cf_loc[WSKBDDEVCF_MUX] - /* * Autoconfiguration helper functions. */ Index: sys/dev/wscons/wsmouse.c =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wsmouse.c,v retrieving revision 1.51 diff -d -p -u -u -r1.51 wsmouse.c --- sys/dev/wscons/wsmouse.c 4 Mar 2007 06:02:52 -0000 1.51 +++ sys/dev/wscons/wsmouse.c 9 Jul 2007 22:45:33 -0000 @@ -177,7 +177,7 @@ struct wsmouse_softc { unsigned int sc_repeat_delay; }; -static int wsmouse_match(struct device *, struct cfdata *, void *); +static int wsmouse_match(struct device *, cfdata_t, void *); static void wsmouse_attach(struct device *, struct device *, void *); static int wsmouse_detach(struct device *, int); static int wsmouse_activate(struct device *, enum devact); @@ -233,7 +233,7 @@ wsmousedevprint(void *aux, const char *p } int -wsmouse_match(struct device *parent, struct cfdata *match, +wsmouse_match(struct device *parent, cfdata_t cfdata, void *aux) { return (1); @@ -244,9 +244,11 @@ wsmouse_attach(struct device *parent, st { struct wsmouse_softc *sc = (struct wsmouse_softc *)self; struct wsmousedev_attach_args *ap = aux; + prop_dictionary_t locs = device_locators(self); #if NWSMUX > 0 - int mux, error; + int error; #endif + uint8_t umux; sc->sc_accessops = ap->accessops; sc->sc_accesscookie = ap->accesscookie; @@ -257,19 +259,18 @@ wsmouse_attach(struct device *parent, st sc->sc_repeat_delay = 0; callout_init(&sc->sc_repeat_callout); + if (prop_dictionary_get_uint8(locs, "mux", &umux)) { /* { */ #if NWSMUX > 0 - sc->sc_base.me_ops = &wsmouse_srcops; - mux = device_cfdata(&sc->sc_base.me_dv)->wsmousedevcf_mux; - if (mux >= 0) { - error = wsmux_attach_sc(wsmux_getmux(mux), &sc->sc_base); + error = wsmux_attach_sc(wsmux_getmux(umux), &sc->sc_base); if (error) printf(" attach error=%d", error); else - printf(" mux %d", mux); + printf(" mux %d", (int)umux); } + sc->sc_base.me_ops = &wsmouse_srcops; #else - if (device_cfdata(&sc->sc_base.me_dv)->wsmousedevcf_mux >= 0) printf(" (mux ignored)"); + } #endif printf("\n"); Index: sys/dev/wscons/wsmousevar.h =================================================================== RCS file: /cvsroot/src/sys/dev/wscons/wsmousevar.h,v retrieving revision 1.10 diff -d -p -u -u -r1.10 wsmousevar.h --- sys/dev/wscons/wsmousevar.h 4 Mar 2007 06:02:52 -0000 1.10 +++ sys/dev/wscons/wsmousevar.h 9 Jul 2007 22:45:33 -0000 @@ -55,10 +55,6 @@ struct wsmousedev_attach_args { void *accesscookie; /* access cookie */ }; -#include "locators.h" - -#define wsmousedevcf_mux cf_loc[WSMOUSEDEVCF_MUX] - /* * Autoconfiguration helper functions. */ Index: sys/dev/xmi/bi_xmi.c =================================================================== RCS file: /cvsroot/src/sys/dev/xmi/bi_xmi.c,v retrieving revision 1.5 diff -d -p -u -u -r1.5 bi_xmi.c --- sys/dev/xmi/bi_xmi.c 2 Oct 2002 16:53:21 -0000 1.5 +++ sys/dev/xmi/bi_xmi.c 9 Jul 2007 22:45:37 -0000 @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: bi_xmi.c,v 1 #include "locators.h" static int -bi_xmi_match(struct device *parent, struct cfdata *cf, void *aux) +bi_xmi_match(struct device *parent, cfdata_t cf, void *aux) { struct xmi_attach_args *xa = aux; Index: sys/kern/subr_autoconf.c =================================================================== RCS file: /cvsroot/src/sys/kern/subr_autoconf.c,v retrieving revision 1.117 diff -d -p -u -u -r1.117 subr_autoconf.c --- sys/kern/subr_autoconf.c 5 Mar 2007 20:32:45 -0000 1.117 +++ sys/kern/subr_autoconf.c 9 Jul 2007 22:46:49 -0000 @@ -96,6 +96,8 @@ __KERNEL_RCSID(0, "$NetBSD: subr_autocon #include #endif +#include + #ifdef __i386__ #include "opt_splash.h" #if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) @@ -105,27 +107,27 @@ extern struct splash_progress *splash_pr #endif /* - * Autoconfiguration subroutines. + * XXXfreza: this code completely lacks locking -- not an issue during + * initial bootstrap, but potentially dangerous in the presence of LKMs + * or drvctl(8) use. */ /* - * ioconf.c exports exactly two names: cfdata and cfroots. All system - * devices and drivers are found via these tables. + * Externalized plist array of describing all compiled-in drivers and devices. */ -extern struct cfdata cfdata[]; -extern const short cfroots[]; +extern const char *resident_externalized_cfdata; /* ioconf.c */ /* * List of all cfdriver structures. We use this to detect duplicates * when other cfdrivers are loaded. */ struct cfdriverlist allcfdrivers = LIST_HEAD_INITIALIZER(&allcfdrivers); -extern struct cfdriver * const cfdriver_list_initial[]; +extern struct cfdriver * const cfdriver_list_initial[]; /* ioconf.c */ /* * Initial list of cfattach's. */ -extern const struct cfattachinit cfattachinit[]; +extern const struct cfattachinit cfattachinit[]; /* ioconf.c */ /* * List of cfdata tables. We always have one such list -- the one @@ -137,22 +139,32 @@ static struct cftable initcftable; #define ROOT ((device_t)NULL) struct matchinfo { - cfsubmatch_t fn; - struct device *parent; - const int *locs; - void *aux; - struct cfdata *match; - int pri; + /* Arguments to mapply(). */ + void *mti_aux; /* passthru attach args */ + device_t mti_parent; /* parent device */ + cfsubmatch_t mti_submatch; /* submatch function */ + prop_dictionary_t mti_locs; /* locators */ + + /* Results from repetitive mapply() calls. */ + prop_dictionary_t mti_cfdata; /* matched instance */ + int mti_priority; /* match priority */ }; -static char *number(char *, int); -static void mapply(struct matchinfo *, cfdata_t); -static device_t config_devalloc(const device_t, const cfdata_t, const int *); +/* Autoconfiguration helpers. */ +static void mapply(struct matchinfo *, prop_dictionary_t); +static device_t config_devalloc(const device_t, prop_dictionary_t, + prop_dictionary_t); static void config_devdealloc(device_t); static void config_makeroom(int, struct cfdriver *); static void config_devlink(device_t); static void config_devunlink(device_t); +/* Helpers for cfdata dictionary manipulation. */ +static bool cfdata_attribute_equals(prop_dictionary_t, const char *); +static bool cfdata_potential_root(prop_dictionary_t); +static void cfdata_device_clobber(device_t, bool); +static void cfdata_maybe_clobber(prop_dictionary_t, const char *, u_int, bool); + struct deferred_config { TAILQ_ENTRY(deferred_config) dc_queue; device_t dc_dev; @@ -172,6 +184,7 @@ struct finalize_hook { int (*f_func)(device_t); device_t f_dev; }; + static TAILQ_HEAD(, finalize_hook) config_finalize_list; static int config_finalize_done; @@ -179,24 +192,23 @@ static int config_finalize_done; struct devicelist alldevs; volatile int config_pending; /* semaphore for mountroot */ +static int config_initialized; /* config_init() has been called */ +static int config_do_twiddle; /* silent boot, twiddle instead */ #define STREQ(s1, s2) \ (*(s1) == *(s2) && strcmp((s1), (s2)) == 0) -static int config_initialized; /* config_init() has been called. */ - -static int config_do_twiddle; - /* * Initialize the autoconfiguration data structures. Normally this * is done by configure(), but some platforms need to do this very - * early (to e.g. initialize the console). + * early (to e.g. initialize the console). We require that malloc() + * is useable by the time we're called. */ void config_init(void) { - const struct cfattachinit *cfai; - int i, j; + const struct cfattachinit *cfai; + int i, j; if (config_initialized) return; @@ -220,14 +232,17 @@ config_init(void) } TAILQ_INIT(&allcftables); - initcftable.ct_cfdata = cfdata; - TAILQ_INSERT_TAIL(&allcftables, &initcftable, ct_list); - TAILQ_INIT(&deferred_config_queue); TAILQ_INIT(&interrupt_config_queue); TAILQ_INIT(&config_finalize_list); TAILQ_INIT(&alldevs); + initcftable.ct_cfdata = + prop_array_internalize(resident_externalized_cfdata); + if (initcftable.ct_cfdata == NULL) + panic("configure: could not internalize cfdata"); + + TAILQ_INSERT_TAIL(&allcftables, &initcftable, ct_list); config_initialized = 1; } @@ -295,7 +310,7 @@ configure(void) int config_cfdriver_attach(struct cfdriver *cd) { - struct cfdriver *lcd; + struct cfdriver *lcd; /* Make sure this driver isn't already in the system. */ LIST_FOREACH(lcd, &allcfdrivers, cd_list) { @@ -315,7 +330,7 @@ config_cfdriver_attach(struct cfdriver * int config_cfdriver_detach(struct cfdriver *cd) { - int i; + int i; /* Make sure there are no active instances. */ for (i = 0; i < cd->cd_ndevs; i++) { @@ -340,7 +355,7 @@ config_cfdriver_detach(struct cfdriver * struct cfdriver * config_cfdriver_lookup(const char *name) { - struct cfdriver *cd; + struct cfdriver *cd; LIST_FOREACH(cd, &allcfdrivers, cd_list) { if (STREQ(cd->cd_name, name)) @@ -356,8 +371,8 @@ config_cfdriver_lookup(const char *name) int config_cfattach_attach(const char *driver, struct cfattach *ca) { - struct cfattach *lca; - struct cfdriver *cd; + struct cfattach *lca; + struct cfdriver *cd; cd = config_cfdriver_lookup(driver); if (cd == NULL) @@ -370,7 +385,6 @@ config_cfattach_attach(const char *drive } LIST_INSERT_HEAD(&cd->cd_attach, ca, ca_list); - return (0); } @@ -380,9 +394,9 @@ config_cfattach_attach(const char *drive int config_cfattach_detach(const char *driver, struct cfattach *ca) { - struct cfdriver *cd; - device_t dev; - int i; + struct cfdriver *cd; + device_t dev; + int i; cd = config_cfdriver_lookup(driver); if (cd == NULL) @@ -397,17 +411,16 @@ config_cfattach_detach(const char *drive } LIST_REMOVE(ca, ca_list); - return (0); } /* - * Look up a cfattach by name. + * Look up attachment by name. */ static struct cfattach * config_cfattach_lookup_cd(struct cfdriver *cd, const char *atname) { - struct cfattach *ca; + struct cfattach *ca; LIST_FOREACH(ca, &cd->cd_attach, ca_list) { if (STREQ(ca->ca_name, atname)) @@ -418,14 +431,23 @@ config_cfattach_lookup_cd(struct cfdrive } /* - * Look up a cfattach by driver/attachment name. + * Look up attachment by inspecting driver & attachment names in cfdata. */ struct cfattach * -config_cfattach_lookup(const char *name, const char *atname) +config_cfattach_lookup(prop_dictionary_t cfdata) { - struct cfdriver *cd; + struct cfdriver *cd; + const char *driver; + const char *atname; - cd = config_cfdriver_lookup(name); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "driver", &driver)) + panic("config_match: corrupt cfdata, no 'driver'"); + + if (! prop_dictionary_get_cstring_nocopy(cfdata, "attachment", + &atname)) + panic("config_match: corrupt cfdata, no 'attachment'"); + + cd = config_cfdriver_lookup(driver); if (cd == NULL) return (NULL); @@ -433,101 +455,81 @@ config_cfattach_lookup(const char *name, } /* - * Apply the matching function and choose the best. This is used + * Apply the matching function, remember the best match. This is used * a few times and we want to keep the code small. */ static void -mapply(struct matchinfo *m, cfdata_t cf) +mapply(struct matchinfo *m, prop_dictionary_t cfdata) { - int pri; + int pri; - if (m->fn != NULL) { - pri = (*m->fn)(m->parent, cf, m->locs, m->aux); - } else { - pri = config_match(m->parent, cf, m->aux); - } - if (pri > m->pri) { - m->match = cf; - m->pri = pri; - } -} +#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) + /* This provides the highest "clockrate" for progress indicator. */ + if (splash_progress_state) + splash_progress_update(splash_progress_state); +#endif -int -config_stdsubmatch(device_t parent, cfdata_t cf, const int *locs, void *aux) -{ - const struct cfiattrdata *ci; - const struct cflocdesc *cl; - int nlocs, i; + if (m->mti_submatch != NULL) + pri = (*m->mti_submatch)(m->mti_parent, cfdata, m->mti_locs, + m->mti_aux); + else + pri = config_match(m->mti_parent, cfdata, m->mti_aux); - ci = cfiattr_lookup(cf->cf_pspec->cfp_iattr, parent->dv_cfdriver); - KASSERT(ci); - nlocs = ci->ci_loclen; - for (i = 0; i < nlocs; i++) { - cl = &ci->ci_locdesc[i]; - /* !cld_defaultstr means no default value */ - if ((!(cl->cld_defaultstr) - || (cf->cf_loc[i] != cl->cld_default)) - && cf->cf_loc[i] != locs[i]) - return (0); + if (pri > m->mti_priority) { + m->mti_priority = pri; + m->mti_cfdata = cfdata; } - - return (config_match(parent, cf, aux)); } /* - * Helper function: check whether the driver supports the interface attribute - * and return its descriptor structure. + * Verify caller-supplied locators match those in cfdata and call + * potential child's match routine on success. Return strictly + * positive value on match, zero otherwise. */ -static const struct cfiattrdata * -cfdriver_get_iattr(const struct cfdriver *cd, const char *ia) +int +config_stdsubmatch(device_t parent, prop_dictionary_t cfdata, + prop_dictionary_t locs, void *aux) { - const struct cfiattrdata * const *cpp; + prop_dictionary_t cflocs = cfdata_locators(cfdata); - if (cd->cd_attrs == NULL) - return (0); + if (prop_dictionary_subset(cflocs, locs)) + return (config_match(parent, cfdata, aux)); - for (cpp = cd->cd_attrs; *cpp; cpp++) { - if (STREQ((*cpp)->ci_name, ia)) { - /* Match. */ - return (*cpp); - } - } return (0); } /* - * Lookup an interface attribute description by name. - * If the driver is given, consider only its supported attributes. + * Helper function: check whether the driver supports the interface attribute. */ -const struct cfiattrdata * -cfiattr_lookup(const char *name, const struct cfdriver *cd) +static bool +cfdriver_provides_attribute(const struct cfdriver *cd, const char *ifattr) { - const struct cfdriver *d; - const struct cfiattrdata *ia; + const char * const *cpp; - if (cd) - return (cfdriver_get_iattr(cd, name)); + if (cd->cd_attrs == NULL) + return (false); - LIST_FOREACH(d, &allcfdrivers, cd_list) { - ia = cfdriver_get_iattr(d, name); - if (ia) - return (ia); - } - return (0); + for (cpp = cd->cd_attrs; *cpp != NULL; cpp++) + if (STREQ(*cpp, ifattr)) + return (true); + return (false); } /* - * Determine if `parent' is a potential parent for a device spec based - * on `cfp'. + * Determine if 'parent' is a potential parent for a device spec based + * on 'cfdata'. */ -static int -cfparent_match(const device_t parent, const struct cfparent *cfp) +static bool +cfdata_matches_parent(const device_t parent, prop_dictionary_t cfdata) { - struct cfdriver *pcd; + struct cfdriver *pcd; + const char *ifattr; + const char *pardrv; + uint32_t parunit; /* We don't match root nodes here. */ - if (cfp == NULL) - return (0); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "attribute", &ifattr)) + return (false); pcd = parent->dv_cfdriver; KASSERT(pcd != NULL); @@ -536,55 +538,50 @@ cfparent_match(const device_t parent, co * First, ensure this parent has the correct interface * attribute. */ - if (!cfdriver_get_iattr(pcd, cfp->cfp_iattr)) - return (0); + if (! cfdriver_provides_attribute(pcd, ifattr)) + return (false); /* - * If no specific parent device instance was specified (i.e. + * If no specific parent driver name was specified (i.e. * we're attaching to the attribute only), we're done! */ - if (cfp->cfp_parent == NULL) - return (1); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "parent-driver", + &pardrv)) + return (true); - /* - * Check the parent device's name. - */ - if (STREQ(pcd->cd_name, cfp->cfp_parent) == 0) - return (0); /* not the same parent */ + if (! STREQ(pcd->cd_name, pardrv)) + return (false); /* - * Make sure the unit number matches. + * If no specific parent unit was specified (i.e. we're + * attaching to any parent instance), we're done! */ - if (cfp->cfp_unit == DVUNIT_ANY || /* wildcard */ - cfp->cfp_unit == parent->dv_unit) - return (1); + if (! prop_dictionary_get_uint32(cfdata, "parent-unit", &parunit)) + return (true); - /* Unit numbers don't match. */ - return (0); + return (parent->dv_unit == parunit); } +#if 0 /* XXX this is broken for now */ /* * Helper for config_cfdata_attach(): check all devices whether it could be * parent any attachment in the config data table passed, and rescan. */ static void -rescan_with_cfdata(const struct cfdata *cf) +rescan_with_cfdata(prop_dictionary_t cfdata) { device_t d; - const struct cfdata *cf1; /* * "alldevs" is likely longer than an LKM's cfdata, so make it * the outer loop. */ TAILQ_FOREACH(d, &alldevs, dv_list) { - if (!(d->dv_cfattach->ca_rescan)) continue; for (cf1 = cf; cf1->cf_name; cf1++) { - - if (!cfparent_match(d, cf1->cf_pspec)) + if (! cfdata_matches_parent(d, cfdata)) continue; (*d->dv_cfattach->ca_rescan)(d, @@ -663,162 +660,179 @@ again: /* not found -- shouldn't happen */ return (EINVAL); } +#endif /* XXX 0 */ /* * Invoke the "match" routine for a cfdata entry on behalf of * an external caller, usually a "submatch" routine. */ int -config_match(device_t parent, cfdata_t cf, void *aux) +config_match(device_t parent, prop_dictionary_t cfdata, void *aux) { - struct cfattach *ca; + struct cfattach *ca; - ca = config_cfattach_lookup(cf->cf_name, cf->cf_atname); + ca = config_cfattach_lookup(cfdata); if (ca == NULL) { /* No attachment for this entry, oh well. */ return (0); } - return ((*ca->ca_match)(parent, cf, aux)); + return ((*ca->ca_match)(parent, cfdata, aux)); } /* * Iterate over all potential children of some device, calling the given * function (default being the child's match function) for each one. * Nonzero returns are matches; the highest value returned is considered - * the best match. Return the `found child' if we got a match, or NULL - * otherwise. The `aux' pointer is simply passed on through. + * the best match. Return the cfdata of the best match, NULL if we got + * no matches. The 'aux' pointer is simply passed on through. * - * Note that this function is designed so that it can be used to apply - * an arbitrary function to all potential children (its return value - * can be ignored). + * For indirect-config busses, 'fn' probes each configured child and + * on success, attaches it. Direct-config busses will use default + * submatch routine and attach the best-matched instance. */ cfdata_t -config_search_loc(cfsubmatch_t fn, device_t parent, - const char *ifattr, const int *locs, void *aux) +config_search_loc(cfsubmatch_t fn, device_t parent, const char *ifattr, + prop_dictionary_t locs, void *aux) { - struct cftable *ct; - cfdata_t cf; - struct matchinfo m; + struct matchinfo m; + prop_object_iterator_t iter; + prop_dictionary_t cfdata; + struct cftable *ct; KASSERT(config_initialized); - KASSERT(!ifattr || cfdriver_get_iattr(parent->dv_cfdriver, ifattr)); + KASSERT(ifattr == NULL || + cfdriver_provides_attribute(parent->dv_cfdriver, ifattr)); - m.fn = fn; - m.parent = parent; - m.locs = locs; - m.aux = aux; - m.match = NULL; - m.pri = 0; + m.mti_submatch = fn; + m.mti_parent = parent; + m.mti_locs = locs; + m.mti_aux = aux; + m.mti_cfdata = NULL; + m.mti_priority = 0; TAILQ_FOREACH(ct, &allcftables, ct_list) { - for (cf = ct->ct_cfdata; cf->cf_name; cf++) { - - /* We don't match root nodes here. */ - if (!cf->cf_pspec) - continue; + iter = prop_array_iterator(ct->ct_cfdata); + if (iter == NULL) + panic("config_search_loc: couldn't create cftable " + "iterator"); - /* - * Skip cf if no longer eligible, otherwise scan - * through parents for one matching `parent', and - * try match function. - */ - if (cf->cf_fstate == FSTATE_FOUND) - continue; - if (cf->cf_fstate == FSTATE_DNOTFOUND || - cf->cf_fstate == FSTATE_DSTAR) + while ((cfdata = prop_object_iterator_next(iter)) != NULL) { + /* We don't match root nodes or clobbered instances. */ + if (cfdata_potential_root(cfdata) || + prop_dictionary_get(cfdata, "*clobbered*") != NULL) continue; - /* - * If an interface attribute was specified, - * consider only children which attach to - * that attribute. - */ - if (ifattr && !STREQ(ifattr, cf->cf_pspec->cfp_iattr)) + /* Consider only children who require given ifattr. */ + if (ifattr != NULL && + ! cfdata_attribute_equals(cfdata, ifattr)) continue; - if (cfparent_match(parent, cf->cf_pspec)) - mapply(&m, cf); + if (cfdata_matches_parent(parent, cfdata)) + mapply(&m, cfdata); } + + prop_object_iterator_release(iter); } - return (m.match); + + /* + * Found an adept, retain it for the caller so that it doesn't + * disappear from under his hands. + */ + if (m.mti_cfdata != NULL) { + prop_object_retain(m.mti_cfdata); + return (m.mti_cfdata); + } + + /* No suitable cfdata available. */ + return (NULL); } -cfdata_t +prop_dictionary_t config_search_ia(cfsubmatch_t fn, device_t parent, const char *ifattr, void *aux) { - return (config_search_loc(fn, parent, ifattr, NULL, aux)); } /* - * Find the given root device. - * This is much like config_search, but there is no parent. - * Don't bother with multiple cfdata tables; the root node - * must always be in the initial table. + * Lookup root device by name. This is much like config_search, but there + * is no parent. Don't bother with multiple cfdata tables; the root node + * must always be in the initial table. Also, locators and attributes are + * not applicable to root node, so ignore them. */ -cfdata_t +prop_dictionary_t config_rootsearch(cfsubmatch_t fn, const char *rootname, void *aux) { - cfdata_t cf; - const short *p; - struct matchinfo m; + struct matchinfo m; + prop_object_iterator_t iter; + prop_dictionary_t cfdata; + const char *name; - m.fn = fn; - m.parent = ROOT; - m.aux = aux; - m.match = NULL; - m.pri = 0; - m.locs = 0; - /* - * Look at root entries for matching name. We do not bother - * with found-state here since only one root should ever be - * searched (and it must be done first). - */ - for (p = cfroots; *p >= 0; p++) { - cf = &cfdata[*p]; - if (strcmp(cf->cf_name, rootname) == 0) - mapply(&m, cf); + m.mti_submatch = fn; + m.mti_parent = ROOT; + m.mti_aux = aux; + m.mti_cfdata = NULL; + m.mti_priority = 0; + m.mti_locs = NULL; + + iter = prop_array_iterator(initcftable.ct_cfdata); + if (iter == NULL) + panic("config_rootsearch: couldn't create cftable " + "iterator"); + + while ((cfdata = prop_object_iterator_next(iter)) != NULL) { + if (! cfdata_potential_root(cfdata)) + continue; + + if (! prop_dictionary_get_cstring_nocopy(cfdata, "driver", + &name)) + panic("config_rootsearch: corrupt cfdata"); + + if (STREQ(rootname, name)) + mapply(&m, cfdata); } - return (m.match); + + prop_object_iterator_release(iter); + + /* Best match we've seen, NULL if nothing matched. */ + return (m.mti_cfdata); } -static const char * const msgs[3] = { "", " not configured\n", " unsupported\n" }; +static const char * const msgs[3] = { + "", /* QUIET */ + " not configured\n", /* UNCONF */ + " unsupported\n" /* UNSUPP */ +}; /* * The given `aux' argument describes a device that has been found * on the given parent, but not necessarily configured. Locate the * configuration data for that device (using the submatch function - * provided, or using candidates' cd_match configuration driver - * functions) and attach it, and return true. If the device was - * not configured, call the given `print' function and return 0. + * provided, or using candidate's cd_match configuration driver + * functions) and attach. + * + * Return the freshly found device on succes, NULL on failure in which + * case don't forget to call user-supplied 'print' function so that the + * failure is noticed. */ device_t -config_found_sm_loc(device_t parent, - const char *ifattr, const int *locs, void *aux, - cfprint_t print, cfsubmatch_t submatch) +config_found_sm_loc(device_t parent, const char *ifattr, + prop_dictionary_t locs, void *aux, cfprint_t print, cfsubmatch_t submatch) { - cfdata_t cf; + prop_dictionary_t cfdata; -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) - if (splash_progress_state) - splash_progress_update(splash_progress_state); -#endif + cfdata = config_search_loc(submatch, parent, ifattr, locs, aux); + if (cfdata != NULL) + return (config_attach_loc(parent, cfdata, locs, aux, print)); - if ((cf = config_search_loc(submatch, parent, ifattr, locs, aux))) - return(config_attach_loc(parent, cf, locs, aux, print)); - if (print) { + if (print != NULL) { if (config_do_twiddle) twiddle(); + aprint_normal("%s", msgs[(*print)(aux, parent->dv_xname)]); } -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) - if (splash_progress_state) - splash_progress_update(splash_progress_state); -#endif - return (NULL); } @@ -826,14 +840,12 @@ device_t config_found_ia(device_t parent, const char *ifattr, void *aux, cfprint_t print) { - return (config_found_sm_loc(parent, ifattr, NULL, aux, print, NULL)); } device_t config_found(device_t parent, void *aux, cfprint_t print) { - return (config_found_sm_loc(parent, NULL, NULL, aux, print, NULL)); } @@ -843,28 +855,16 @@ config_found(device_t parent, void *aux, device_t config_rootfound(const char *rootname, void *aux) { - cfdata_t cf; + prop_dictionary_t cfdata; + + cfdata = config_rootsearch(NULL, rootname, aux); + if (cfdata != NULL) + return (config_attach(ROOT, cfdata, aux, NULL)); - if ((cf = config_rootsearch((cfsubmatch_t)NULL, rootname, aux)) != NULL) - return (config_attach(ROOT, cf, aux, (cfprint_t)NULL)); aprint_error("root device %s not configured\n", rootname); return (NULL); } -/* just like sprintf(buf, "%d") except that it works from the end */ -static char * -number(char *ep, int n) -{ - - *--ep = 0; - while (n >= 10) { - *--ep = (n % 10) + '0'; - n /= 10; - } - *--ep = n + '0'; - return (ep); -} - /* * Expand the size of the cd_devs array if necessary. */ @@ -941,77 +941,99 @@ config_devunlink(device_t dev) } static device_t -config_devalloc(const device_t parent, const cfdata_t cf, const int *locs) +config_devalloc(const device_t parent, prop_dictionary_t cfdata, + prop_dictionary_t locs) { - struct cfdriver *cd; - struct cfattach *ca; - size_t lname, lunit; - const char *xunit; - int myunit; - char num[10]; - device_t dev; - const struct cfiattrdata *ia; + prop_dictionary_t mylocs; + struct cfdriver *cd; + struct cfattach *ca; + const char *driver; + const char *atname; + device_t dev; + uint32_t cfunit; + boolean_t clonable; + u_int myunit; - cd = config_cfdriver_lookup(cf->cf_name); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "driver", &driver)) + panic("config_devalloc: corrupt cfdata, no 'driver'"); + + if (! prop_dictionary_get_cstring_nocopy(cfdata, "attachment", &atname)) + panic("config_devalloc: corrupt cfdata, no 'attachment'"); + + if (! prop_dictionary_get_bool(cfdata, "clonable", &clonable)) + panic("config_devalloc: corrupt cfdata, no 'clonable'"); + + if (! prop_dictionary_get_uint32(cfdata, "unit", &cfunit)) + panic("config_devalloc: corrupt cfdata, no 'unit'"); + + cd = config_cfdriver_lookup(driver); if (cd == NULL) return (NULL); - ca = config_cfattach_lookup_cd(cd, cf->cf_atname); + ca = config_cfattach_lookup_cd(cd, atname); if (ca == NULL) return (NULL); if (ca->ca_devsize < sizeof(struct device)) - panic("config_devalloc"); + panic("config_devalloc: corrupt cfattach"); -#ifndef __BROKEN_CONFIG_UNIT_USAGE - if (cf->cf_fstate == FSTATE_STAR) { - for (myunit = cf->cf_unit; myunit < cd->cd_ndevs; myunit++) + if (clonable) { + /* Pick the first free unit (above any wired instances). */ + for (myunit = cfunit; myunit < cd->cd_ndevs; myunit++) if (cd->cd_devs[myunit] == NULL) break; - /* - * myunit is now the unit of the first NULL device pointer, - * or max(cd->cd_ndevs,cf->cf_unit). - */ } else { - myunit = cf->cf_unit; + /* Wired instance, fail if slot already occupied. */ + myunit = cfunit; if (myunit < cd->cd_ndevs && cd->cd_devs[myunit] != NULL) return (NULL); } -#else - myunit = cf->cf_unit; -#endif /* ! __BROKEN_CONFIG_UNIT_USAGE */ - /* compute length of name and decimal expansion of unit number */ - lname = strlen(cd->cd_name); - xunit = number(&num[sizeof(num)], myunit); - lunit = &num[sizeof(num)] - xunit; - if (lname + lunit > sizeof(dev->dv_xname)) + /* Allocate our softc, embeds the device structure. */ + dev = malloc(ca->ca_devsize, M_DEVBUF, M_ZERO | + (cold ? M_NOWAIT : M_WAITOK)); + if (!dev) + panic("config_devalloc: could not allocate softc"); + + /* Create our name. */ + if (snprintf(dev->dv_xname, sizeof(dev->dv_xname), "%s%u", + cd->cd_name, myunit) >= sizeof(dev->dv_xname)) panic("config_devalloc: device name too long"); - /* get memory for all device vars */ - dev = (device_t)malloc(ca->ca_devsize, M_DEVBUF, - M_ZERO | (cold ? M_NOWAIT : M_WAITOK)); - if (!dev) - panic("config_devalloc: memory allocation for device softc failed"); + /* Fill in generic device info. */ dev->dv_class = cd->cd_class; - dev->dv_cfdata = cf; dev->dv_cfdriver = cd; dev->dv_cfattach = ca; dev->dv_unit = myunit; - memcpy(dev->dv_xname, cd->cd_name, lname); - memcpy(dev->dv_xname + lname, xunit, lunit); dev->dv_parent = parent; dev->dv_flags = DVF_ACTIVE; /* always initially active */ - if (locs) { - KASSERT(parent); /* no locators at root */ - ia = cfiattr_lookup(cf->cf_pspec->cfp_iattr, - parent->dv_cfdriver); - dev->dv_locators = malloc(ia->ci_loclen * sizeof(int), - M_DEVBUF, cold ? M_NOWAIT : M_WAITOK); - memcpy(dev->dv_locators, locs, ia->ci_loclen * sizeof(int)); - } + + /* Allocate device properties, store locators and cfdata therein. */ dev->dv_properties = prop_dictionary_create(); - KASSERT(dev->dv_properties != NULL); + if (dev->dv_properties == NULL) + panic("config_devalloc: could not create properties"); + + if (! prop_dictionary_set(dev->dv_properties, "cfdata", cfdata)) + panic("config_devalloc: could not store cfdata"); + + /* + * The parent is allowed to use single mutable dictionary for + * all of his children's locators, so get an immutable copy. + */ + if (locs != NULL) + mylocs = prop_dictionary_copy(locs); + else + mylocs = prop_dictionary_create(); + + if (mylocs == NULL) + panic("config_devalloc: couldn't clone locators"); + prop_dictionary_make_immutable(mylocs); + + if (! prop_dictionary_set(dev->dv_properties, "locators", mylocs)) + panic("config_devalloc: could not store locators"); + + /* Release the initial reference, devprop dict now own it. */ + prop_object_release(mylocs); return (dev); } @@ -1023,9 +1045,6 @@ config_devdealloc(device_t dev) KASSERT(dev->dv_properties != NULL); prop_object_release(dev->dv_properties); - if (dev->dv_locators) - free(dev->dv_locators, M_DEVBUF); - free(dev, M_DEVBUF); } @@ -1033,38 +1052,21 @@ config_devdealloc(device_t dev) * Attach a found device. */ device_t -config_attach_loc(device_t parent, cfdata_t cf, - const int *locs, void *aux, cfprint_t print) +config_attach_loc(device_t parent, prop_dictionary_t cfdata, + prop_dictionary_t locs, void *aux, cfprint_t print) { - device_t dev; - struct cftable *ct; - const char *drvname; - -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) - if (splash_progress_state) - splash_progress_update(splash_progress_state); -#endif + device_t dev; - dev = config_devalloc(parent, cf, locs); - if (!dev) + dev = config_devalloc(parent, cfdata, locs); + if (dev == NULL) panic("config_attach: allocation of device softc failed"); - - /* XXX redundant - see below? */ - if (cf->cf_fstate != FSTATE_STAR) { - KASSERT(cf->cf_fstate == FSTATE_NOTFOUND); - cf->cf_fstate = FSTATE_FOUND; - } -#ifdef __BROKEN_CONFIG_UNIT_USAGE - else - cf->cf_unit++; -#endif - config_devlink(dev); if (config_do_twiddle) twiddle(); else aprint_naive("Found "); + /* * We want the next two printfs for normal, verbose, and quiet, * but not silent (in which case, we're twiddling, instead). @@ -1080,49 +1082,33 @@ config_attach_loc(device_t parent, cfdat } /* - * Before attaching, clobber any unfound devices that are - * otherwise identical. - * XXX code above is redundant? + * Before attaching clobber any identical (but unfound) + * wired instances. */ - drvname = dev->dv_cfdriver->cd_name; - TAILQ_FOREACH(ct, &allcftables, ct_list) { - for (cf = ct->ct_cfdata; cf->cf_name; cf++) { - if (STREQ(cf->cf_name, drvname) && - cf->cf_unit == dev->dv_unit) { - if (cf->cf_fstate == FSTATE_NOTFOUND) - cf->cf_fstate = FSTATE_FOUND; -#ifdef __BROKEN_CONFIG_UNIT_USAGE - /* - * Bump the unit number on all starred cfdata - * entries for this device. - */ - if (cf->cf_fstate == FSTATE_STAR) - cf->cf_unit++; -#endif /* __BROKEN_CONFIG_UNIT_USAGE */ - } - } - } + cfdata_device_clobber(dev, true); + #ifdef __HAVE_DEVICE_REGISTER device_register(dev, aux); #endif -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) - if (splash_progress_state) - splash_progress_update(splash_progress_state); -#endif + + /* + * Actually attach the device. This normally initiates search + * for all its children (recursively). This means that after + * the call, this device's subtree has been fully populated + * ("best we can do ATM"), so handle any child's deffered + * processing right after we've attached. + */ (*dev->dv_cfattach->ca_attach)(parent, dev, aux); -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS) - if (splash_progress_state) - splash_progress_update(splash_progress_state); -#endif + config_process_deferred(&deferred_config_queue, dev); return (dev); } device_t -config_attach(device_t parent, cfdata_t cf, void *aux, cfprint_t print) +config_attach(device_t parent, prop_dictionary_t cfdata, void *aux, + cfprint_t print) { - - return (config_attach_loc(parent, cf, NULL, aux, print)); + return (config_attach_loc(parent, cfdata, NULL, aux, print)); } /* @@ -1133,27 +1119,66 @@ config_attach(device_t parent, cfdata_t * Note that because pseudo-devices are attached silently, any information * the attach routine wishes to print should be prefixed with the device * name by the attach routine. + * + * Pseudo device cfdata are fabricated just for the sake of config_devalloc(), + * instance clobbering doesn't apply. */ -device_t -config_attach_pseudo(cfdata_t cf) + +static device_t +config_attach_pseudo_cfdata(cfdata_t cfdata) { - device_t dev; + device_t dev; - dev = config_devalloc(ROOT, cf, NULL); - if (!dev) + dev = config_devalloc(ROOT, cfdata, NULL); + if (dev == NULL) return (NULL); - /* XXX mark busy in cfdata */ - config_devlink(dev); - -#if 0 /* XXXJRT not yet */ -#ifdef __HAVE_DEVICE_REGISTER - device_register(dev, NULL); /* like a root node */ -#endif -#endif (*dev->dv_cfattach->ca_attach)(ROOT, dev, NULL); config_process_deferred(&deferred_config_queue, dev); + + return (dev); +} + +device_t +config_attach_pseudo(const char *driver, const char *attachment, int unit) +{ + prop_dictionary_t cfdata; + device_t dev; + bool cfclone; + u_int cfunit; + + /* Create ephemeral cfdata for this attachment only. */ + cfdata = prop_dictionary_create(); + if (cfdata == NULL) + panic("config_attach_pseudo: could not create cfdata"); + + /* Fill in mandatory members for clonable instance. */ + if (! prop_dictionary_set_cstring_nocopy(cfdata, "driver", driver) || + ! prop_dictionary_set_cstring_nocopy(cfdata, "attachment", + attachment)) + panic("config_attach_pseudo: could not set cfdata"); + + if (unit == WILDUNIT) { + /* Let config_devalloc() pick a free unit number. */ + cfclone = true; + cfunit = 0; + } else { + /* The caller requests wired unit number. */ + cfclone = false; + cfunit = unit; + } + + /* Fill the remaining members that determine our unit number. */ + if (! prop_dictionary_set_uint32(cfdata, "unit", cfunit) || + ! prop_dictionary_set_bool(cfdata, "clonable", cfclone)) + panic("config_attach_pseudo: could not set cfdata"); + + dev = config_attach_pseudo_cfdata(cfdata); + + /* Device properties now own fabricated cfdata. */ + prop_object_release(cfdata); + return (dev); } @@ -1169,21 +1194,13 @@ config_attach_pseudo(cfdata_t cf) int config_detach(device_t dev, int flags) { - struct cftable *ct; - cfdata_t cf; - const struct cfattach *ca; - struct cfdriver *cd; + const struct cfattach *ca; + struct cfdriver *cd; #ifdef DIAGNOSTIC - device_t d; + device_t d; #endif - int rv = 0; + int rv = 0; -#ifdef DIAGNOSTIC - if (dev->dv_cfdata != NULL && - dev->dv_cfdata->cf_fstate != FSTATE_FOUND && - dev->dv_cfdata->cf_fstate != FSTATE_STAR) - panic("config_detach: bad device fstate"); -#endif cd = dev->dv_cfdriver; KASSERT(cd != NULL); @@ -1232,48 +1249,31 @@ config_detach(device_t dev, int flags) for (d = TAILQ_NEXT(dev, dv_list); d != NULL; d = TAILQ_NEXT(d, dv_list)) { if (d->dv_parent == dev) { - printf("config_detach: detached device %s" + panic("config_detach: detached device %s" " has children %s\n", dev->dv_xname, d->dv_xname); - panic("config_detach"); } } #endif - /* notify the parent that the child is gone */ + /* Notify the parent that the child is gone. */ if (dev->dv_parent) { device_t p = dev->dv_parent; if (p->dv_cfattach->ca_childdetached) (*p->dv_cfattach->ca_childdetached)(p, dev); } - - /* - * Mark cfdata to show that the unit can be reused, if possible. - */ - TAILQ_FOREACH(ct, &allcftables, ct_list) { - for (cf = ct->ct_cfdata; cf->cf_name; cf++) { - if (STREQ(cf->cf_name, cd->cd_name)) { - if (cf->cf_fstate == FSTATE_FOUND && - cf->cf_unit == dev->dv_unit) - cf->cf_fstate = FSTATE_NOTFOUND; -#ifdef __BROKEN_CONFIG_UNIT_USAGE - /* - * Note that we can only re-use a starred - * unit number if the unit being detached - * had the last assigned unit number. - */ - if (cf->cf_fstate == FSTATE_STAR && - cf->cf_unit == dev->dv_unit + 1) - cf->cf_unit--; -#endif /* __BROKEN_CONFIG_UNIT_USAGE */ - } - } - } - config_devunlink(dev); - if (dev->dv_cfdata != NULL && (flags & DETACH_QUIET) == 0) + if ((flags & DETACH_QUIET) == 0) aprint_normal("%s detached\n", dev->dv_xname); + /* + * Now that the device is gone, cfdata instances wired at given + * unit number are eligible again (including the one used by + * the device at hand). + */ + cfdata_device_clobber(dev, false); + + /* All traces of our existence are gone, die in silence. */ config_devdealloc(dev); return (0); @@ -1480,114 +1480,222 @@ config_finalize(void) } /* - * device_lookup: - * - * Look up a device instance for a given driver. + * See if cfdata describes given instance of given driver and if so set + * or clear the '*clobbered*' marker depending on 'yesno'. This is only + * ever called by cfdata_device_clobber(). */ -void * -device_lookup(cfdriver_t cd, int unit) +static void +cfdata_maybe_clobber(prop_dictionary_t cfdata, const char *driver, u_int unit, + bool yesno) { + const char *name; + uint32_t cfunit; + boolean_t clonable; - if (unit < 0 || unit >= cd->cd_ndevs) - return (NULL); - - return (cd->cd_devs[unit]); + /* We're only concerned about wired attachments. */ + if (! prop_dictionary_get_bool(cfdata, "clonable", &clonable)) + panic("cfdata_maybe_clobber: corrupt cfdata, no 'clonable'"); + + if (clonable) + return; + + /* See if name matches. */ + if (! prop_dictionary_get_cstring_nocopy(cfdata, "driver", &name)) + panic("cfdata_maybe_clobber: corrupt cfdata, no 'driver'"); + + if (! STREQ(driver, name)) + return; + + /* See if unit number matches. */ + if (! prop_dictionary_get_uint32(cfdata, "unit", &cfunit)) + panic("cfdata_maybe_clobber: corrupt cfdata, no 'unit'"); + + if (unit != cfunit) + return; + + /* Go ahead and clobber/unclobber it. */ + if (yesno) { + if (! prop_dictionary_set_bool(cfdata, "*clobbered*", + true)) + panic("cfdata_maybe_clobber: failed to clobber"); + } else { + prop_dictionary_remove(cfdata, "*clobbered*"); + } } /* - * Accessor functions for the device_t type. + * Walk all cfdata tables looking for any wired entries that are identical + * to some device's cfdata, marking them as eligible (or not, depending on + * 'yesno') for attachments. This is to protect multiple instances of the + * same driver fighting over the same (wired) unit number. */ -devclass_t -device_class(device_t dev) +static void +cfdata_device_clobber(device_t dev, bool yesno) { + prop_object_iterator_t iter; + prop_dictionary_t cfdata; + struct cftable *ct; + const char *drvname; - return (dev->dv_class); -} + cfdata = prop_dictionary_get(device_properties(dev), "cfdata"); + KASSERT(cfdata); -cfdata_t -device_cfdata(device_t dev) -{ + drvname = dev->dv_cfdriver->cd_name; + TAILQ_FOREACH(ct, &allcftables, ct_list) { + iter = prop_array_iterator(ct->ct_cfdata); + if (iter == NULL) + panic("cfdata_clobber_enter: could not create " + "cfdata iterator"); - return (dev->dv_cfdata); + while ((cfdata = prop_object_iterator_next(iter)) != NULL) + cfdata_maybe_clobber(cfdata, drvname, dev->dv_unit, + yesno); + + prop_object_iterator_release(iter); + } } -cfdriver_t -device_cfdriver(device_t dev) +/* + * Check if device instance is a possible root device. We can tell possible + * roots by their lack of 'attribute' key (IOW they "don't attach at anything" + * and hence must be possible roots themselves). XXXfreza pseudo devices? + */ +static bool +cfdata_potential_root(prop_dictionary_t cfdata) { + if (prop_dictionary_get(cfdata, "attribute") == NULL) + return (true); - return (dev->dv_cfdriver); + return (false); } -cfattach_t -device_cfattach(device_t dev) +/* + * Check if device instance described by cfdata dictionary wants to attach + * at given attribute. + */ +static bool +cfdata_attribute_equals(prop_dictionary_t cfdata, const char *ifattr) { + const char *cfattr; - return (dev->dv_cfattach); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "attribute", &cfattr)) + panic("cfdata_attribute_equals: attempted to match root " + "node's ifattr"); + + return (STREQ(ifattr, cfattr)); } -int -device_unit(device_t dev) +/* + * Check if dictionary 'small' forms a subset (not necessarily proper) + * of the dictionary 'big'. We consider a dictionary to be a set of + * pairs. Either dictionary may be NULL in which case we + * consider it empty. + */ +bool +prop_dictionary_subset(prop_dictionary_t small, prop_dictionary_t big) { + prop_dictionary_keysym_t key; + prop_object_iterator_t iter; + prop_object_t sitem, bitem; - return (dev->dv_unit); -} + /* Empty set is a subset of any set. */ + if (small == NULL || prop_dictionary_count(small) == 0) + return (true); -const char * -device_xname(device_t dev) -{ + /* Nonempty set can't be subset of empty set. */ + if (big == NULL || prop_dictionary_count(big) == 0) + return (false); - return (dev->dv_xname); -} + iter = prop_dictionary_iterator(small); + if (iter == NULL) + panic("config_stdsubmatch: could not create locator " + "iterator"); -device_t -device_parent(device_t dev) -{ + /* See if everything in 'small' exists in 'big' with the same value. */ + while ((key = prop_object_iterator_next(iter)) != NULL) { + sitem = prop_dictionary_get_keysym(small, key); + KASSERT(sitem != NULL); - return (dev->dv_parent); + /* Can only use keysym on the dictionary we got it from. */ + bitem = prop_dictionary_get(big, + prop_dictionary_keysym_cstring_nocopy(key)); + + if (bitem == NULL || !prop_object_equals(sitem, bitem)) { + prop_object_iterator_release(iter); + return (false); + } + } + + prop_object_iterator_release(iter); + return (true); } bool -device_is_active(device_t dev) +locator_match_uint64(prop_dictionary_t locs, const char *locname, uint64_t val) { + uint64_t locval; - return ((dev->dv_flags & DVF_ACTIVE) != 0); + /* Empty locators match anything. */ + if (locs == NULL) + return (true); + + /* + * If locator value is missing that means the user didn't care + * and so we succeed. + */ + if (! prop_dictionary_get_uint64(locs, locname, &locval)) + return (true); + + return (val == locval); } -int -device_locator(device_t dev, u_int locnum) +bool +locator_defined(prop_dictionary_t locs, const char *locname) { - - KASSERT(dev->dv_locators != NULL); - return (dev->dv_locators[locnum]); + return (prop_dictionary_get(locs, locname) != NULL); } -void * -device_private(device_t dev) +/* + * Get locators dictionary from configuration data. + */ +prop_dictionary_t +cfdata_locators(prop_dictionary_t cfdata) { + prop_dictionary_t locs; - /* - * For now, at least, "struct device" is the first thing in - * the driver's private data. So, we just return ourselves. - */ - return (dev); + /* This is a mandatory member for any real device. */ + locs = prop_dictionary_get(cfdata, "locators"); + KASSERT(locs); + + return (locs); } -prop_dictionary_t -device_properties(device_t dev) +/* + * Get flags from configuration data, default to zero. + */ +uint64_t +cfdata_flags(prop_dictionary_t cfdata) { + uint64_t flags; - return (dev->dv_properties); + if (prop_dictionary_get_uint64(cfdata, "flags", &flags)) + return (flags); + + return (0); } /* - * device_is_a: - * - * Returns true if the device is an instance of the specified - * driver. + * Get driver name from configuration data. Users of this function + * are mostly abusing autoconf(9). Returned pointer is only valid + * in scope of a function that gets cfdata as argument. */ -bool -device_is_a(device_t dev, const char *dname) +const char * +cfdata_driver(prop_dictionary_t cfdata) { + const char *driver; - return (strcmp(dev->dv_cfdriver->cd_name, dname) == 0); + if (! prop_dictionary_get_cstring_nocopy(cfdata, "driver", &driver)) + panic("cfdata_driver: corrupt cfdata, no 'driver'"); + + return (driver); } Index: sys/kern/subr_device.c =================================================================== RCS file: sys/kern/subr_device.c diff -N sys/kern/subr_device.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sys/kern/subr_device.c 9 Jul 2007 22:46:49 -0000 @@ -0,0 +1,170 @@ +/* $NetBSD$ */ + +/*- + * Copyright (c) 2006 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +/* + * device_lookup: + * + * Look up a device instance for a given driver. + */ +void * +device_lookup(cfdriver_t cd, int unit) +{ + if (unit < 0 || unit >= cd->cd_ndevs) + return (NULL); + + return (cd->cd_devs[unit]); +} + +/* + * Accessor functions for the device_t type. + */ +devclass_t +device_class(device_t dev) +{ + return (dev->dv_class); +} + +prop_dictionary_t +device_cfdata(device_t dev) +{ + prop_dictionary_t cfdata; + + cfdata = prop_dictionary_get(device_properties(dev), "cfdata"); + KASSERT(cfdata != NULL); + KASSERT(prop_object_type(cfdata) == PROP_TYPE_DICTIONARY); + + return (cfdata); +} + +cfdriver_t +device_cfdriver(device_t dev) +{ + return (dev->dv_cfdriver); +} + +cfattach_t +device_cfattach(device_t dev) +{ + return (dev->dv_cfattach); +} + +const char * +device_driver(device_t dev) +{ + return (dev->dv_cfdriver->cd_name); +} + +int +device_unit(device_t dev) +{ + return (dev->dv_unit); +} + +const char * +device_xname(device_t dev) +{ + return (dev->dv_xname); +} + +device_t +device_parent(device_t dev) +{ + return (dev->dv_parent); +} + +bool +device_is_active(device_t dev) +{ + return ((dev->dv_flags & DVF_ACTIVE) != 0); +} + +prop_dictionary_t +device_locators(device_t dev) +{ + prop_dictionary_t locs; + + locs = prop_dictionary_get(device_properties(dev), "locators"); + KASSERT(locs); + KASSERT(prop_object_type(locs) == PROP_TYPE_DICTIONARY); + + return (locs); +} + +uint64_t +device_locator(device_t dev, const char *locname) +{ + prop_dictionary_t locs = device_locators(dev); + uint64_t val; + + if (! prop_dictionary_get_uint64(locs, locname, &val)) + panic("%s: device_locator: no '%s'", device_xname(dev), + locname); + + return (val); +} + +void * +device_private(device_t dev) +{ + /* + * For now, at least, "struct device" is the first thing in + * the driver's private data. So, we just return ourselves. + */ + return (dev); +} + +prop_dictionary_t +device_properties(device_t dev) +{ + KASSERT(dev->dv_properties != NULL); + KASSERT(prop_object_type(dev->dv_properties) == PROP_TYPE_DICTIONARY); + + return (dev->dv_properties); +} + +/* + * device_is_a: + * + * Returns true if the device is an instance of the specified + * driver. + */ +bool +device_is_a(device_t dev, const char *dname) +{ + return (strcmp(dev->dv_cfdriver->cd_name, dname) == 0); +} Index: sys/net/if_etherip.c =================================================================== RCS file: /cvsroot/src/sys/net/if_etherip.c,v retrieving revision 1.8 diff -d -p -u -u -r1.8 if_etherip.c --- sys/net/if_etherip.c 30 May 2007 21:02:03 -0000 1.8 +++ sys/net/if_etherip.c 9 Jul 2007 22:47:22 -0000 @@ -148,7 +148,7 @@ SYSCTL_SETUP_PROTO(sysctl_etherip_setup) void etheripattach(int); -static int etherip_match(struct device *, struct cfdata *, void *); +static int etherip_match(struct device *, cfdata_t, void *); static void etherip_attach(struct device *, struct device *, void *); static int etherip_detach(struct device *, int); @@ -195,7 +195,7 @@ etheripattach(int count) /* Pretty much useless for a pseudo-device */ static int -etherip_match(struct device *self, struct cfdata *cfdata, void *arg) +etherip_match(struct device *self, cfdata_t cfdata, void *arg) { return 1; } @@ -619,9 +619,9 @@ etherip_stop(struct ifnet *ifp, int disa static int etherip_clone_create(struct if_clone *ifc, int unit) { - struct cfdata *cf; + cfdata_tcf; - MALLOC(cf, struct cfdata *, sizeof(struct cfdata), M_DEVBUF, M_WAITOK); + MALLOC(cf, cfdata_t, sizeof(struct cfdata), M_DEVBUF, M_WAITOK); cf->cf_name = etherip_cd.cd_name; cf->cf_atname = etherip_ca.ca_name; cf->cf_unit = unit; @@ -640,7 +640,7 @@ static int etherip_clone_destroy(struct ifnet *ifp) { struct device *dev = (struct device *)ifp->if_softc; - struct cfdata *cf = device_cfdata(dev); + cfdata_tcf = device_cfdata(dev); int error; if ((error = config_detach(dev, 0)) != 0) Index: sys/net/if_tap.c =================================================================== RCS file: /cvsroot/src/sys/net/if_tap.c,v retrieving revision 1.30 diff -d -p -u -u -r1.30 if_tap.c --- sys/net/if_tap.c 30 May 2007 21:02:03 -0000 1.30 +++ sys/net/if_tap.c 9 Jul 2007 22:47:29 -0000 @@ -120,7 +120,7 @@ struct tap_softc { void tapattach(int); -static int tap_match(struct device *, struct cfdata *, void *); +static int tap_match(struct device *, cfdata_t, void *); static void tap_attach(struct device *, struct device *, void *); static int tap_detach(struct device*, int); @@ -241,7 +241,7 @@ tapattach(int n) /* Pretty much useless for a pseudo-device */ static int -tap_match(struct device *self, struct cfdata *cfdata, +tap_match(struct device *self, cfdata_t cfdata, void *arg) { return (1); @@ -597,21 +597,12 @@ tap_clone_create(struct if_clone *ifc, i static struct tap_softc * tap_clone_creator(int unit) { - struct cfdata *cf; + device_t dev; - cf = malloc(sizeof(*cf), M_DEVBUF, M_WAITOK); - cf->cf_name = tap_cd.cd_name; - cf->cf_atname = tap_ca.ca_name; - if (unit == -1) { - /* let autoconf find the first free one */ - cf->cf_unit = 0; - cf->cf_fstate = FSTATE_STAR; - } else { - cf->cf_unit = unit; - cf->cf_fstate = FSTATE_NOTFOUND; - } + /* This does TRT for unit number "-1". */ + dev = config_attach_pseudo(tap_cd.cd_name, tap_ca.ca_name, unit); - return (struct tap_softc *)config_attach_pseudo(cf); + return ((struct tap_softc *)dev); } /* @@ -628,13 +619,11 @@ tap_clone_destroy(struct ifnet *ifp) int tap_clone_destroyer(struct device *dev) { - struct cfdata *cf = device_cfdata(dev); int error; if ((error = config_detach(dev, 0)) != 0) aprint_error("%s: unable to detach instance\n", dev->dv_xname); - free(cf, M_DEVBUF); return (error); } Index: sys/netisdn/i4b_ctl.c =================================================================== RCS file: /cvsroot/src/sys/netisdn/i4b_ctl.c,v retrieving revision 1.18 diff -d -p -u -u -r1.18 i4b_ctl.c --- sys/netisdn/i4b_ctl.c 4 Mar 2007 06:03:30 -0000 1.18 +++ sys/netisdn/i4b_ctl.c 9 Jul 2007 22:48:17 -0000 @@ -179,7 +179,7 @@ SYSINIT(i4bctldev, SI_SUB_DRIVERS,SI_ORD #endif /* BSD > 199306 && defined(__FreeBSD__) */ #ifdef __bsdi__ -int i4bctlmatch(struct device *parent, struct cfdata *cf, void *aux); +int i4bctlmatch(struct device *parent, cfdata_t cf, void *aux); void dummy_i4bctlattach(struct device*, struct device *, void *); #define CDEV_MAJOR 64 @@ -195,7 +195,7 @@ struct devsw i4bctlsw = }; int -i4bctlmatch(struct device *parent, struct cfdata *cf, void *aux) +i4bctlmatch(struct device *parent, cfdata_t cf, void *aux) { printf("i4bctlmatch: aux=0x%x\n", aux); return 1; Index: sys/netisdn/i4b_i4bdrv.c =================================================================== RCS file: /cvsroot/src/sys/netisdn/i4b_i4bdrv.c,v retrieving revision 1.31 diff -d -p -u -u -r1.31 i4b_i4bdrv.c --- sys/netisdn/i4b_i4bdrv.c 4 Mar 2007 06:03:30 -0000 1.31 +++ sys/netisdn/i4b_i4bdrv.c 9 Jul 2007 22:48:17 -0000 @@ -203,7 +203,7 @@ const struct cdevsw isdn_cdevsw = { #ifdef __bsdi__ #include -int i4bmatch(struct device *parent, struct cfdata *cf, void *aux); +int i4bmatch(struct device *parent, cfdata_t cf, void *aux); void dummy_i4battach(struct device*, struct device *, void *); #define CDEV_MAJOR 65 @@ -219,7 +219,7 @@ struct devsw i4bsw = }; int -i4bmatch(struct device *parent, struct cfdata *cf, void *aux) +i4bmatch(struct device *parent, cfdata_t cf, void *aux) { printf("i4bmatch: aux=0x%x\n", aux); return 1; Index: sys/netisdn/i4b_rbch.c =================================================================== RCS file: /cvsroot/src/sys/netisdn/i4b_rbch.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 i4b_rbch.c --- sys/netisdn/i4b_rbch.c 4 Mar 2007 06:03:31 -0000 1.20 +++ sys/netisdn/i4b_rbch.c 9 Jul 2007 22:48:20 -0000 @@ -268,7 +268,7 @@ SYSINIT(isdnbchandev, SI_SUB_DRIVERS, #endif /* BSD > 199306 && defined(__FreeBSD__) */ #ifdef __bsdi__ -int isdnbchanmatch(struct device *parent, struct cfdata *cf, void *aux); +int isdnbchanmatch(struct device *parent, cfdata_t cf, void *aux); void dummy_isdnbchanattach(struct device*, struct device *, void *); #define CDEV_MAJOR 61 @@ -284,7 +284,7 @@ struct devsw isdnbchansw = }; int -isdnbchanmatch(struct device *parent, struct cfdata *cf, void *aux) +isdnbchanmatch(struct device *parent, cfdata_t cf, void *aux) { printf("isdnbchanmatch: aux=0x%x\n", aux); return 1; Index: sys/netisdn/i4b_tel.c =================================================================== RCS file: /cvsroot/src/sys/netisdn/i4b_tel.c,v retrieving revision 1.20 diff -d -p -u -u -r1.20 i4b_tel.c --- sys/netisdn/i4b_tel.c 4 Mar 2007 06:03:31 -0000 1.20 +++ sys/netisdn/i4b_tel.c 9 Jul 2007 22:48:21 -0000 @@ -274,7 +274,7 @@ SYSINIT(i4bteldev, SI_SUB_DRIVERS, #ifdef __bsdi__ int i4btelsel(dev_t dev, int rw, struct lwp *l); -int i4btelmatch(struct device *parent, struct cfdata *cf, void *aux); +int i4btelmatch(struct device *parent, cfdata_t cf, void *aux); void dummy_i4btelattach(struct device*, struct device *, void *); #define CDEV_MAJOR 62 @@ -290,7 +290,7 @@ struct devsw i4btelsw = }; int -i4btelmatch(struct device *parent, struct cfdata *cf, void *aux) +i4btelmatch(struct device *parent, cfdata_t cf, void *aux) { NDBGL4(L4_TELDBG, "aux=0x%x", aux); return 1; Index: sys/sys/device.h =================================================================== RCS file: /cvsroot/src/sys/sys/device.h,v retrieving revision 1.94 diff -d -p -u -u -r1.94 device.h --- sys/sys/device.h 5 Mar 2007 20:32:43 -0000 1.94 +++ sys/sys/device.h 9 Jul 2007 22:48:45 -0000 @@ -103,24 +103,21 @@ typedef enum devact { DVACT_DEACTIVATE /* deactivate the device */ } devact_t; -typedef struct cfdata *cfdata_t; typedef struct cfdriver *cfdriver_t; typedef struct cfattach *cfattach_t; typedef struct device *device_t; +typedef prop_dictionary_t cfdata_t; struct device { devclass_t dv_class; /* this device's classification */ TAILQ_ENTRY(device) dv_list; /* entry on list of all devices */ - cfdata_t dv_cfdata; /* config data that found us - (NULL if pseudo-device) */ cfdriver_t dv_cfdriver; /* our cfdriver */ - cfattach_t dv_cfattach; /* our cfattach */ - int dv_unit; /* device unit number */ - char dv_xname[16]; /* external name (name + unit) */ + cfattach_t dv_cfattach; /* our cfattach */ + u_int dv_unit; /* device unit number */ + char dv_xname[16]; /* external name (name + unit) */ device_t dv_parent; /* pointer to parent device (NULL if pesudo- or root node) */ int dv_flags; /* misc. flags; see below */ - int *dv_locators; /* our actual locators (optional) */ prop_dictionary_t dv_properties;/* properties dictionary */ }; @@ -130,70 +127,16 @@ struct device { TAILQ_HEAD(devicelist, device); /* - * Description of a locator, as part of interface attribute definitions. - */ -struct cflocdesc { - const char *cld_name; - const char *cld_defaultstr; /* NULL if no default */ - int cld_default; -}; - -/* - * Description of an interface attribute, provided by potential - * parent device drivers, referred to by child device configuration data. - */ -struct cfiattrdata { - const char *ci_name; - int ci_loclen; - const struct cflocdesc ci_locdesc[ -#if defined(__GNUC__) && __GNUC__ <= 2 - 0 -#endif - ]; -}; - -/* - * Description of a configuration parent. Each device attachment attaches - * to an "interface attribute", which is given in this structure. The parent - * *must* carry this attribute. Optionally, an individual device instance - * may also specify a specific parent device instance. - */ -struct cfparent { - const char *cfp_iattr; /* interface attribute */ - const char *cfp_parent; /* optional specific parent */ - int cfp_unit; /* optional specific unit - (-1 to wildcard) */ -}; - -/* - * Configuration data (i.e., data placed in ioconf.c). - */ -struct cfdata { - const char *cf_name; /* driver name */ - const char *cf_atname; /* attachment name */ - short cf_unit; /* unit number */ - short cf_fstate; /* finding state (below) */ - int *cf_loc; /* locators (machine dependent) */ - int cf_flags; /* flags from config */ - const struct cfparent *cf_pspec;/* parent specification */ -}; -#define FSTATE_NOTFOUND 0 /* has not been found */ -#define FSTATE_FOUND 1 /* has been found */ -#define FSTATE_STAR 2 /* duplicable */ -#define FSTATE_DSTAR 3 /* has not been found, and disabled */ -#define FSTATE_DNOTFOUND 4 /* duplicate, and disabled */ - -/* * Multiple configuration data tables may be maintained. This structure * provides the linkage. */ struct cftable { - cfdata_t ct_cfdata; /* pointer to cfdata table */ - TAILQ_ENTRY(cftable) ct_list; /* list linkage */ + prop_array_t ct_cfdata; /* cfdata table */ + TAILQ_ENTRY(cftable) ct_list; /* list linkage */ }; TAILQ_HEAD(cftablelist, cftable); -typedef int (*cfsubmatch_t)(device_t, cfdata_t, const int *, void *); +typedef int (*cfsubmatch_t)(device_t, cfdata_t, prop_dictionary_t, void *); /* * `configuration' attachment and driver (what the machine-independent @@ -214,13 +157,13 @@ struct cfattach { const char *ca_name; /* name of attachment */ LIST_ENTRY(cfattach) ca_list; /* link on cfdriver's list */ size_t ca_devsize; /* size of dev data (for malloc) */ - int (*ca_match)(device_t, cfdata_t, void *); + int (*ca_match)(device_t, prop_dictionary_t, void *); void (*ca_attach)(device_t, device_t, void *); int (*ca_detach)(device_t, int); int (*ca_activate)(device_t, devact_t); /* technically, the next 2 belong into "struct cfdriver" */ int (*ca_rescan)(device_t, const char *, - const int *); /* scan for new children */ + prop_dictionary_t); /* scan for new children */ void (*ca_childdetached)(device_t, device_t); }; LIST_HEAD(cfattachlist, cfattach); @@ -241,6 +184,9 @@ struct cfattach __CONCAT(name,_ca) = { #define DETACH_FORCE 0x01 /* force detachment; hardware gone */ #define DETACH_QUIET 0x02 /* don't print a notice */ +/* Magic unit number for config_attach_pseudo(), "no particular unit". */ +#define WILDUNIT (-1) + struct cfdriver { LIST_ENTRY(cfdriver) cd_list; /* link on allcfdrivers */ struct cfattachlist cd_attach; /* list of all attachments */ @@ -248,7 +194,7 @@ struct cfdriver { const char *cd_name; /* device name */ enum devclass cd_class; /* device classification */ int cd_ndevs; /* size of cd_devs array */ - const struct cfiattrdata * const *cd_attrs; /* attributes provided */ + const char * const *cd_attrs; /* attributes provided */ }; LIST_HEAD(cfdriverlist, cfdriver); @@ -265,6 +211,7 @@ struct cfattachinit { const char *cfai_name; /* driver name */ struct cfattach * const *cfai_list;/* list of attachments */ }; + /* * the same, but with a non-constant list so it can be modified * for LKM bookkeeping @@ -316,29 +263,31 @@ int config_cfdriver_detach(struct cfdriv int config_cfattach_attach(const char *, struct cfattach *); int config_cfattach_detach(const char *, struct cfattach *); -int config_cfdata_attach(cfdata_t, int); -int config_cfdata_detach(cfdata_t); +#if 0 /* XXXfreza */ +int config_cfdata_attach(prop_dictionary_t, int); +int config_cfdata_detach(prop_dictionary_t); +#endif struct cfdriver *config_cfdriver_lookup(const char *); -struct cfattach *config_cfattach_lookup(const char *, const char *); -const struct cfiattrdata *cfiattr_lookup(const char *, const struct cfdriver *); +struct cfattach *config_cfattach_lookup(prop_dictionary_t); -int config_stdsubmatch(device_t, cfdata_t, const int *, void *); -cfdata_t config_search_loc(cfsubmatch_t, device_t, - const char *, const int *, void *); -cfdata_t config_search_ia(cfsubmatch_t, device_t, - const char *, void *); -cfdata_t config_rootsearch(cfsubmatch_t, const char *, void *); -device_t config_found_sm_loc(device_t, const char *, const int *, +int config_stdsubmatch(device_t, prop_dictionary_t, prop_dictionary_t, + void *); +cfdata_t config_search_loc(cfsubmatch_t, device_t, const char *, + prop_dictionary_t, void *); +cfdata_t config_search_ia(cfsubmatch_t, device_t, const char *, void *); +prop_dictionary_t config_rootsearch(cfsubmatch_t, const char *, void *); +device_t config_found_sm_loc(device_t, const char *, prop_dictionary_t, void *, cfprint_t, cfsubmatch_t); device_t config_found_ia(device_t, const char *, void *, cfprint_t); device_t config_found(device_t, void *, cfprint_t); device_t config_rootfound(const char *, void *); -device_t config_attach_loc(device_t, cfdata_t, const int *, void *, cfprint_t); +device_t config_attach_loc(device_t, cfdata_t, prop_dictionary_t, + void *, cfprint_t); device_t config_attach(device_t, cfdata_t, void *, cfprint_t); int config_match(device_t, cfdata_t, void *); -device_t config_attach_pseudo(cfdata_t); +device_t config_attach_pseudo(const char *, const char *, int); int config_detach(device_t, int); int config_activate(device_t); @@ -356,20 +305,33 @@ void *device_lookup(cfdriver_t, int); void device_register(device_t, void *); #endif +/* Device accessors and predicates, kern/subr_device.c */ devclass_t device_class(device_t); -cfdata_t device_cfdata(device_t); cfdriver_t device_cfdriver(device_t); cfattach_t device_cfattach(device_t); +cfdata_t device_cfdata(device_t); +const char *device_driver(device_t); int device_unit(device_t); const char *device_xname(device_t); device_t device_parent(device_t); bool device_is_active(device_t); -int device_locator(device_t, u_int); +uint64_t device_locator(device_t, const char *); void *device_private(device_t); prop_dictionary_t device_properties(device_t); +prop_dictionary_t device_locators(device_t); bool device_is_a(device_t, const char *); +/* Locator dictionary predicates, kern/subr_autoconf.c */ +bool locator_match_uint64(prop_dictionary_t, const char *, uint64_t); +bool locator_defined(prop_dictionary_t, const char *); +bool prop_dictionary_subset(prop_dictionary_t, prop_dictionary_t); /* XXX */ + +/* Configuration data (cfdata) accessors, kern/subr_autoconf.c */ +prop_dictionary_t cfdata_locators(cfdata_t); +const char *cfdata_driver(cfdata_t); +uint64_t cfdata_flags(cfdata_t); + #endif /* _KERNEL */ #endif /* !_SYS_DEVICE_H_ */