diff --git a/sys/arch/i386/pci/ncr.c b/sys/arch/i386/pci/ncr.c index c820c5a5fb0b..7312bd736edd 100644 --- a/sys/arch/i386/pci/ncr.c +++ b/sys/arch/i386/pci/ncr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr.c,v 1.5 1994/10/27 04:21:32 cgd Exp $ */ +/* $NetBSD: ncr.c,v 1.6 1994/11/03 22:15:19 mycroft Exp $ */ /************************************************************************** ** @@ -1222,7 +1222,7 @@ static void ncr_usercmd (ncb_p np); static void ncr_wakeup (ncb_p np, u_long code); #ifdef __NetBSD__ -static int ncr_probe (struct device *, struct device *, void *); +static int ncr_probe (struct device *, void *, void *); static void ncr_attach (struct device *, struct device *, void *); static int ncr_intr (ncb_p np); #else @@ -1327,7 +1327,7 @@ static u_long getirr (void) static char ident[] = - "\n$NetBSD: ncr.c,v 1.5 1994/10/27 04:21:32 cgd Exp $\n"; + "\n$NetBSD: ncr.c,v 1.6 1994/11/03 22:15:19 mycroft Exp $\n"; u_long ncr_version = NCR_VERSION + (u_long) sizeof (struct ncb) @@ -3228,11 +3228,11 @@ U_INT32 ncr_info (int unit) #ifdef __NetBSD__ int -ncr_probe(parent, self, aux) - struct device *parent, *self; - void *aux; +ncr_probe(parent, match, aux) + struct device *parent; + void *match, *aux; { - struct cfdata *cf = self->dv_cfdata; + struct cfdata *cf = match; struct pci_attach_args *pa = aux; if (!pci_targmatch(cf, pa)) @@ -3434,7 +3434,7 @@ static int ncr_attach (pcici_t config_id) ncr_name (np)); DELAY (1000000); #endif - printf ("%s scanning for targets 0..%d ($Revision: 1.5 $)\n", + printf ("%s scanning for targets 0..%d ($Revision: 1.6 $)\n", ncr_name (np), MAX_TARGET-1); /* diff --git a/sys/arch/i386/pci/pci.c b/sys/arch/i386/pci/pci.c index a4c62ce04614..488caccfe21d 100644 --- a/sys/arch/i386/pci/pci.c +++ b/sys/arch/i386/pci/pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.3 1994/10/27 04:21:38 cgd Exp $ */ +/* $NetBSD: pci.c,v 1.4 1994/11/03 22:15:25 mycroft Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -40,22 +40,17 @@ #include #include -#if defined(i386) && !defined(NEWCONFIG) -#include -#endif - -int pciprobe(); -void pciattach(); +int pciprobe __P((struct device *, void *, void *)); +void pciattach __P((struct device *, struct device *, void *)); struct cfdriver pcicd = { NULL, "pci", pciprobe, pciattach, DV_DULL, sizeof(struct device) }; int -pciprobe(parent, cf, aux) +pciprobe(parent, match, aux) struct device *parent; - struct cfdata *cf; - void *aux; + void *match, *aux; { #ifdef i386 @@ -135,23 +130,10 @@ pci_targmatch(cf, pa) struct cfdata *cf; struct pci_attach_args *pa; { -#if !defined(i386) || defined(NEWCONFIG) -#define cf_bus cf_loc[0] -#define cf_device cf_loc[1] - if (cf->cf_bus != -1 && cf->cf_bus != pa->pa_bus) + if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != pa->pa_bus) return 0; - if (cf->cf_device != -1 && cf->cf_device != pa->pa_device) + if (cf->cf_loc[1] != -1 && cf->cf_loc[1] != pa->pa_device) return 0; -#undef cf_device -#undef cf_bus -#else - struct isa_device *id = (void *)cf->cf_loc; - - if (id->id_physid != -1 && - id->id_physid != (pa->pa_bus << 5) | pa->pa_device) - return 0; -#endif - return 1; } diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c index c820c5a5fb0b..7312bd736edd 100644 --- a/sys/dev/pci/ncr.c +++ b/sys/dev/pci/ncr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr.c,v 1.5 1994/10/27 04:21:32 cgd Exp $ */ +/* $NetBSD: ncr.c,v 1.6 1994/11/03 22:15:19 mycroft Exp $ */ /************************************************************************** ** @@ -1222,7 +1222,7 @@ static void ncr_usercmd (ncb_p np); static void ncr_wakeup (ncb_p np, u_long code); #ifdef __NetBSD__ -static int ncr_probe (struct device *, struct device *, void *); +static int ncr_probe (struct device *, void *, void *); static void ncr_attach (struct device *, struct device *, void *); static int ncr_intr (ncb_p np); #else @@ -1327,7 +1327,7 @@ static u_long getirr (void) static char ident[] = - "\n$NetBSD: ncr.c,v 1.5 1994/10/27 04:21:32 cgd Exp $\n"; + "\n$NetBSD: ncr.c,v 1.6 1994/11/03 22:15:19 mycroft Exp $\n"; u_long ncr_version = NCR_VERSION + (u_long) sizeof (struct ncb) @@ -3228,11 +3228,11 @@ U_INT32 ncr_info (int unit) #ifdef __NetBSD__ int -ncr_probe(parent, self, aux) - struct device *parent, *self; - void *aux; +ncr_probe(parent, match, aux) + struct device *parent; + void *match, *aux; { - struct cfdata *cf = self->dv_cfdata; + struct cfdata *cf = match; struct pci_attach_args *pa = aux; if (!pci_targmatch(cf, pa)) @@ -3434,7 +3434,7 @@ static int ncr_attach (pcici_t config_id) ncr_name (np)); DELAY (1000000); #endif - printf ("%s scanning for targets 0..%d ($Revision: 1.5 $)\n", + printf ("%s scanning for targets 0..%d ($Revision: 1.6 $)\n", ncr_name (np), MAX_TARGET-1); /* diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index a4c62ce04614..488caccfe21d 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.3 1994/10/27 04:21:38 cgd Exp $ */ +/* $NetBSD: pci.c,v 1.4 1994/11/03 22:15:25 mycroft Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -40,22 +40,17 @@ #include #include -#if defined(i386) && !defined(NEWCONFIG) -#include -#endif - -int pciprobe(); -void pciattach(); +int pciprobe __P((struct device *, void *, void *)); +void pciattach __P((struct device *, struct device *, void *)); struct cfdriver pcicd = { NULL, "pci", pciprobe, pciattach, DV_DULL, sizeof(struct device) }; int -pciprobe(parent, cf, aux) +pciprobe(parent, match, aux) struct device *parent; - struct cfdata *cf; - void *aux; + void *match, *aux; { #ifdef i386 @@ -135,23 +130,10 @@ pci_targmatch(cf, pa) struct cfdata *cf; struct pci_attach_args *pa; { -#if !defined(i386) || defined(NEWCONFIG) -#define cf_bus cf_loc[0] -#define cf_device cf_loc[1] - if (cf->cf_bus != -1 && cf->cf_bus != pa->pa_bus) + if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != pa->pa_bus) return 0; - if (cf->cf_device != -1 && cf->cf_device != pa->pa_device) + if (cf->cf_loc[1] != -1 && cf->cf_loc[1] != pa->pa_device) return 0; -#undef cf_device -#undef cf_bus -#else - struct isa_device *id = (void *)cf->cf_loc; - - if (id->id_physid != -1 && - id->id_physid != (pa->pa_bus << 5) | pa->pa_device) - return 0; -#endif - return 1; } diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 6c20f8fc9126..46873e602216 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.3 1994/10/27 04:21:38 cgd Exp $ */ +/* $NetBSD: pci_subr.c,v 1.4 1994/11/03 22:15:25 mycroft Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -40,22 +40,17 @@ #include #include -#if defined(i386) && !defined(NEWCONFIG) -#include -#endif - -int pciprobe(); -void pciattach(); +int pciprobe __P((struct device *, void *, void *)); +void pciattach __P((struct device *, struct device *, void *)); struct cfdriver pcicd = { NULL, "pci", pciprobe, pciattach, DV_DULL, sizeof(struct device) }; int -pciprobe(parent, cf, aux) +pciprobe(parent, match, aux) struct device *parent; - struct cfdata *cf; - void *aux; + void *match, *aux; { #ifdef i386 @@ -135,23 +130,10 @@ pci_targmatch(cf, pa) struct cfdata *cf; struct pci_attach_args *pa; { -#if !defined(i386) || defined(NEWCONFIG) -#define cf_bus cf_loc[0] -#define cf_device cf_loc[1] - if (cf->cf_bus != -1 && cf->cf_bus != pa->pa_bus) + if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != pa->pa_bus) return 0; - if (cf->cf_device != -1 && cf->cf_device != pa->pa_device) + if (cf->cf_loc[1] != -1 && cf->cf_loc[1] != pa->pa_device) return 0; -#undef cf_device -#undef cf_bus -#else - struct isa_device *id = (void *)cf->cf_loc; - - if (id->id_physid != -1 && - id->id_physid != (pa->pa_bus << 5) | pa->pa_device) - return 0; -#endif - return 1; }