Date: Fri, 2 Mar 2012 21:46:32 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232410 - in head/sys/mips: cavium mips Message-ID: <201203022146.q22LkWU8048831@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmallett Date: Fri Mar 2 21:46:31 2012 New Revision: 232410 URL: http://svn.freebsd.org/changeset/base/232410 Log: 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. Modified: head/sys/mips/cavium/octopci_bus_space.c head/sys/mips/mips/bus_space_generic.c Modified: head/sys/mips/cavium/octopci_bus_space.c ============================================================================== --- head/sys/mips/cavium/octopci_bus_space.c Fri Mar 2 21:44:39 2012 (r232409) +++ head/sys/mips/cavium/octopci_bus_space.c Fri Mar 2 21:46:31 2012 (r232410) @@ -230,13 +230,12 @@ octopci_bs_unmap(void *t __unused, bus_s } 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); } Modified: head/sys/mips/mips/bus_space_generic.c ============================================================================== --- head/sys/mips/mips/bus_space_generic.c Fri Mar 2 21:44:39 2012 (r232409) +++ head/sys/mips/mips/bus_space_generic.c Fri Mar 2 21:46:31 2012 (r232410) @@ -245,13 +245,12 @@ generic_bs_unmap(void *t __unused, bus_s } int -generic_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) +generic_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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203022146.q22LkWU8048831>