summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-03-02 21:46:31 +0000
committerjmallett <jmallett@FreeBSD.org>2012-03-02 21:46:31 +0000
commit85b7bc5919cc1a7927b566cc2c3f632ed1af7656 (patch)
tree9a5db181666ae1e7a478d688aec7a486413d2246 /sys/mips/cavium
parent99e7ee266b8fae0c9dcb40f3f8abf5a0ac2b114b (diff)
downloadFreeBSD-src-85b7bc5919cc1a7927b566cc2c3f632ed1af7656.zip
FreeBSD-src-85b7bc5919cc1a7927b566cc2c3f632ed1af7656.tar.gz
When creating a handle for a subregion, be sure to actually math out the new
handle address, where we're using handles as raw addresses. This fixes devices with subregions on Octeon PCI specifically, and likely also on MIPS more generally, where there isn't another bus_space in use that was doing the math already.
Diffstat (limited to 'sys/mips/cavium')
-rw-r--r--sys/mips/cavium/octopci_bus_space.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/mips/cavium/octopci_bus_space.c b/sys/mips/cavium/octopci_bus_space.c
index 870fe32..05ff904 100644
--- a/sys/mips/cavium/octopci_bus_space.c
+++ b/sys/mips/cavium/octopci_bus_space.c
@@ -230,13 +230,12 @@ octopci_bs_unmap(void *t __unused, bus_space_handle_t bh __unused,
}
int
-octopci_bs_subregion(void *t __unused, bus_space_handle_t handle __unused,
- bus_size_t offset __unused, bus_size_t size __unused,
- bus_space_handle_t *nhandle __unused)
+octopci_bs_subregion(void *t __unused, bus_space_handle_t handle,
+ bus_size_t offset, bus_size_t size __unused,
+ bus_space_handle_t *bshp)
{
- printf("SUBREGION?!?!?!\n");
- /* Do nothing */
+ *bshp = handle + offset;
return (0);
}
OpenPOWER on IntegriCloud