diff options
author | jmallett <jmallett@FreeBSD.org> | 2012-03-02 21:46:31 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2012-03-02 21:46:31 +0000 |
commit | 85b7bc5919cc1a7927b566cc2c3f632ed1af7656 (patch) | |
tree | 9a5db181666ae1e7a478d688aec7a486413d2246 /sys/mips/cavium | |
parent | 99e7ee266b8fae0c9dcb40f3f8abf5a0ac2b114b (diff) | |
download | FreeBSD-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.c | 9 |
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); } |