]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
authorRoland Dreier <rolandd@cisco.com>
Fri, 15 Dec 2006 22:01:49 +0000 (14:01 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 15 Dec 2006 22:01:49 +0000 (14:01 -0800)
commit59320e9f025f3c897543009d40729fe2275ee585
treec29aff97085d9426dffe1e648e09d4aca0ead024
parent92c6ab2f956ea8e65c930949d28a5a09920ba492
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>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h