(In mthca_arbel_fmr_unmap(), the high bits of the key are masked off.
This gets rid of the effect of adjust_key(), which makes sure that
bits 3 and 23 of the key are equal when the Sinai throughput
optimization is enabled, and so it may happen that an FMR will end up
with bits 3 and 23 in the key being different. This causes data
corruption, because when enabling the throughput optimization, the
driver promises the HCA firmware that bits 3 and 23 of all memory keys
will always be equal.
Fix by re-applying adjust_key() after masking the key.
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1277
ad392aa1-c5ef-ae45-8dd8-
e69d62a5ef86
key = arbel_key_to_hw_index(fmr->ibfmr.lkey);
key &= dev->limits.num_mpts - 1;
+ key = adjust_key(dev, key);
fmr->ibfmr.lkey = fmr->ibfmr.rkey = arbel_hw_index_to_key(key);
fmr->maps = 0;