don't expect/provide pci_decompose_tag to be a MI, public function. It

wasn't intended to be to begin with, and uses of it (e.g. the one in the
'de' driver) are quite likely to be incorrect.
This commit is contained in:
cgd 1997-07-19 09:49:39 +00:00
parent c89683a7a5
commit 429a941288
10 changed files with 38 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: apecs_pci.c,v 1.14 1997/05/31 05:46:03 cgd Exp $ */
/* $NetBSD: apecs_pci.c,v 1.15 1997/07/19 09:49:48 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.14 1997/05/31 05:46:03 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.15 1997/07/19 09:49:48 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -122,7 +122,7 @@ apecs_conf_read(cpv, tag, offset)
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
/* secondary if bus # != 0 */
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
alpha_pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
if (secondary) {
s = splhigh();
old_haxr2 = REGVAL(EPIC_HAXR2);
@ -171,7 +171,7 @@ apecs_conf_write(cpv, tag, offset, data)
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
/* secondary if bus # != 0 */
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
alpha_pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
if (secondary) {
s = splhigh();
old_haxr2 = REGVAL(EPIC_HAXR2);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lca_pci.c,v 1.11 1997/05/31 05:46:05 cgd Exp $ */
/* $NetBSD: lca_pci.c,v 1.12 1997/07/19 09:49:51 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.11 1997/05/31 05:46:05 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.12 1997/07/19 09:49:51 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -123,7 +123,7 @@ lca_conf_read(cpv, tag, offset)
s = 0; /* XXX gcc -Wuninitialized */
/* secondary if bus # != 0 */
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
alpha_pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
if (secondary) {
s = splhigh();
alpha_mb();
@ -177,7 +177,7 @@ lca_conf_write(cpv, tag, offset, data)
s = 0; /* XXX gcc -Wuninitialized */
/* secondary if bus # != 0 */
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
alpha_pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
if (secondary) {
s = splhigh();
alpha_mb();

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_2100_a50.c,v 1.15 1997/05/31 05:46:06 cgd Exp $ */
/* $NetBSD: pci_2100_a50.c,v 1.16 1997/07/19 09:49:52 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.15 1997/05/31 05:46:06 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.16 1997/07/19 09:49:52 cgd Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -122,7 +122,7 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
return 1;
}
pci_decompose_tag(pc, bustag, NULL, &device, NULL);
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
switch (device) {
case 6: /* NCR SCSI */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_axppci_33.c,v 1.13 1997/05/31 05:46:07 cgd Exp $ */
/* $NetBSD: pci_axppci_33.c,v 1.14 1997/07/19 09:49:53 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.13 1997/05/31 05:46:07 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.14 1997/07/19 09:49:53 cgd Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -122,7 +122,7 @@ dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
return 1;
}
pci_decompose_tag(pc, bustag, NULL, &device, NULL);
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
switch (device) {
case 6: /* NCR SCSI */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_eb164.c,v 1.7 1997/05/31 05:46:08 cgd Exp $ */
/* $NetBSD: pci_eb164.c,v 1.8 1997/07/19 09:49:55 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.7 1997/05/31 05:46:08 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.8 1997/07/19 09:49:55 cgd Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -144,7 +144,7 @@ dec_eb164_intr_map(ccv, bustag, buspin, line, ihp)
return 1;
}
pci_decompose_tag(pc, bustag, NULL, &device, NULL);
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
switch (device) {
#if 0 /* THIS CODE SHOULD NEVER BE CALLED FOR THE SIO */
case 8: /* SIO */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn20aa.c,v 1.23 1997/04/07 23:40:43 cgd Exp $ */
/* $NetBSD: pci_kn20aa.c,v 1.24 1997/07/19 09:49:57 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_kn20aa.c,v 1.23 1997/04/07 23:40:43 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_kn20aa.c,v 1.24 1997/07/19 09:49:57 cgd Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -137,7 +137,7 @@ dec_kn20aa_intr_map(ccv, bustag, buspin, line, ihp)
* The DEC engineers who did this hardware obviously engaged
* in random drug testing.
*/
pci_decompose_tag(pc, bustag, NULL, &device, NULL);
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
switch (device) {
case 11:
case 12:

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn8ae.c,v 1.5 1997/06/24 18:08:59 mjacob Exp $ */
/* $NetBSD: pci_kn8ae.c,v 1.6 1997/07/19 09:50:00 cgd Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@ -33,7 +33,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_kn8ae.c,v 1.5 1997/06/24 18:08:59 mjacob Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_kn8ae.c,v 1.6 1997/07/19 09:50:00 cgd Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -140,7 +140,7 @@ dec_kn8ae_intr_map(ccv, bustag, buspin, line, ihp)
printf("pci_map_int: bad interrupt pin %d\n", buspin);
return 1;
}
pci_decompose_tag(pc, bustag, NULL, &device, NULL);
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
ionode = ccp->cc_sc->dwlpx_node - 4;
hose = ccp->cc_sc->dwlpx_hosenum;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.h,v 1.7 1997/04/07 02:00:06 cgd Exp $ */
/* $NetBSD: pci_machdep.h,v 1.8 1997/07/19 09:50:02 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -48,8 +48,6 @@ struct alpha_pci_chipset {
struct device *, struct pcibus_attach_args *));
int (*pc_bus_maxdevs) __P((void *, int));
pcitag_t (*pc_make_tag) __P((void *, int, int, int));
void (*pc_decompose_tag) __P((void *, pcitag_t, int *,
int *, int *));
pcireg_t (*pc_conf_read) __P((void *, pcitag_t, int));
void (*pc_conf_write) __P((void *, pcitag_t, int, pcireg_t));
@ -60,6 +58,10 @@ struct alpha_pci_chipset {
void *(*pc_intr_establish) __P((void *, pci_intr_handle_t,
int, int (*)(void *), void *));
void (*pc_intr_disestablish) __P((void *, void *));
/* alpha-specific */
void (*pc_decompose_tag) __P((void *, pcitag_t, int *,
int *, int *));
};
/*
@ -71,8 +73,6 @@ struct alpha_pci_chipset {
(*(c)->pc_bus_maxdevs)((c)->pc_conf_v, (b))
#define pci_make_tag(c, b, d, f) \
(*(c)->pc_make_tag)((c)->pc_conf_v, (b), (d), (f))
#define pci_decompose_tag(c, t, bp, dp, fp) \
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))
#define pci_conf_read(c, t, r) \
(*(c)->pc_conf_read)((c)->pc_conf_v, (t), (r))
#define pci_conf_write(c, t, r, v) \
@ -92,3 +92,5 @@ struct alpha_pci_chipset {
*/
void pci_display_console __P((bus_space_tag_t, bus_space_tag_t,
pci_chipset_tag_t, int, int, int));
#define alpha_pci_decompose_tag(c, t, bp, dp, fp) \
(*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp))

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */
/* $NetBSD: if_de.c,v 1.46 1997/07/19 09:49:39 cgd Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -4799,10 +4799,8 @@ tulip_pci_attach(
#define PCI_CONF_WRITE(r, v) pci_conf_write(pa->pa_pc, pa->pa_tag, (r), (v))
#define PCI_CONF_READ(r) pci_conf_read(pa->pa_pc, pa->pa_tag, (r))
#define PCI_GETBUSDEVINFO(sc) do { \
int busno, devno, funcno; \
pci_decompose_tag(pa->pa_pc, pa->pa_tag, &busno, &devno, &funcno); \
(sc)->tulip_pci_busno = busno; \
(sc)->tulip_pci_devno = devno; \
(sc)->tulip_pci_busno = parent; \
(sc)->tulip_pci_devno = pa->pa_device; \
} while (0)
#endif /* __NetBSD__ */
int retval, idx;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_devar.h,v 1.13 1997/06/08 18:46:36 thorpej Exp $ */
/* $NetBSD: if_devar.h,v 1.14 1997/07/19 09:49:45 cgd Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -620,7 +620,11 @@ struct _tulip_softc_t {
u_int32_t tulip_setupdata[192/sizeof(u_int32_t)];
char tulip_boardid[16]; /* buffer for board ID */
u_int8_t tulip_rombuf[128];
#ifndef __NetBSD__
u_int8_t tulip_pci_busno; /* needed for multiport boards */
#else
struct device *tulip_pci_busno; /* in NetBSD each pci bus is a dev */
#endif
u_int8_t tulip_pci_devno; /* needed for multiport boards */
u_int8_t tulip_connidx;
tulip_srom_connection_t tulip_conntype;