IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
commite7aaff7bdaa8ba73645c2329a811450764302e58
authorRoland Dreier <rdreier@cisco.com>
Sat, 16 Dec 2006 04:58:14 +0000 (15 20:58 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Feb 2007 23:49:51 +0000 (23 15:49 -0800)
tree639b637ab9b30b801d996ad7a7d87bdb11c889b9
parentd797d17f1561af73e3bd30bc433271ff695bfeb4
IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G

struct srp_device.fmr_page_mask was unsigned long, which means that
the top part of addresses above 4G was being chopped off on 32-bit
architectures.  Of course nothing good happens when data from SRP
targets is DMAed to the wrong place.

Fix this by changing fmr_page_mask to u64, to match the addresses
actually used by IB devices.

Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen
<davem@systemfabricworks.com> for help diagnosing the bug and testing
the fix.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h