summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc/pci/mpcpcibr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvmeppc/pci/mpcpcibr.c')
-rw-r--r--sys/arch/mvmeppc/pci/mpcpcibr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/mvmeppc/pci/mpcpcibr.c b/sys/arch/mvmeppc/pci/mpcpcibr.c
index a2056593b8f..8461a5390f3 100644
--- a/sys/arch/mvmeppc/pci/mpcpcibr.c
+++ b/sys/arch/mvmeppc/pci/mpcpcibr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibr.c,v 1.20 2009/08/22 02:54:50 mk Exp $ */
+/* $OpenBSD: mpcpcibr.c,v 1.21 2010/12/04 17:06:31 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
@@ -65,6 +65,7 @@ void mpc_attach_hook(struct device *, struct device *,
int mpc_bus_maxdevs(void *, int);
pcitag_t mpc_make_tag(void *, int, int, int);
void mpc_decompose_tag(void *, pcitag_t, int *, int *, int *);
+int mpc_conf_size(void *, pcitag_t);
pcireg_t mpc_conf_read(void *, pcitag_t, int);
void mpc_conf_write(void *, pcitag_t, int, pcireg_t);
@@ -210,6 +211,7 @@ mpcpcibrattach(parent, self, aux)
lcp->lc_pc.pc_bus_maxdevs = mpc_bus_maxdevs;
lcp->lc_pc.pc_make_tag = mpc_make_tag;
lcp->lc_pc.pc_decompose_tag = mpc_decompose_tag;
+ lcp->lc_pc.pc_conf_size = mpc_conf_size;
lcp->lc_pc.pc_conf_read = mpc_conf_read;
lcp->lc_pc.pc_conf_write = mpc_conf_write;
lcp->lc_pc.pc_ether_hw_addr = mpc_ether_hw_addr;
@@ -381,6 +383,12 @@ mpc_gen_config_reg(cpv, tag, offset)
return reg;
}
+int
+mpc_conf_size(void *cpv, pcitag_t tag)
+{
+ return PCI_CONFIG_SPACE_SIZE;
+}
+
/*#define DEBUG_CONFIG */
pcireg_t
mpc_conf_read(cpv, tag, offset)
@@ -396,7 +404,8 @@ mpc_conf_read(cpv, tag, offset)
faultbuf env;
void *oldh;
- if (offset & 3 || offset < 0 || offset >= 0x100) {
+ if (offset & 3 ||
+ offset < 0 || offset >= PCI_CONFIG_SPACE_SIZE) {
#ifdef DEBUG_CONFIG
printf ("pci_conf_read: bad reg %x\n", offset);
#endif