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 exter