diff options
author | Steve Wise <swise@opengridcomputing.com> | 2008-08-04 14:05:43 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-08-04 14:05:43 -0400 |
commit | 1c355a6e80fd08e623416138631e240f431385f2 (patch) | |
tree | 923c13058b6c21836d8f4990f050c7511bc06ec9 /drivers/infiniband/hw/cxgb3/iwch_provider.h | |
parent | 5f0f66b022ba607db0a083bf5cc13e4a4336e366 (diff) |
RDMA/cxgb3: Fix up MW access rights
- MWs don't have local read/write permissions.
- Set the MW_BIND enabled bit if a MR has MW_BIND access.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_provider.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.h b/drivers/infiniband/hw/cxgb3/iwch_provider.h index f5ceca05c435..a237d49bdcc9 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.h +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.h | |||
@@ -293,9 +293,16 @@ static inline u32 iwch_ib_to_tpt_access(int acc) | |||
293 | return (acc & IB_ACCESS_REMOTE_WRITE ? TPT_REMOTE_WRITE : 0) | | 293 | return (acc & IB_ACCESS_REMOTE_WRITE ? TPT_REMOTE_WRITE : 0) | |
294 | (acc & IB_ACCESS_REMOTE_READ ? TPT_REMOTE_READ : 0) | | 294 | (acc & IB_ACCESS_REMOTE_READ ? TPT_REMOTE_READ : 0) | |
295 | (acc & IB_ACCESS_LOCAL_WRITE ? TPT_LOCAL_WRITE : 0) | | 295 | (acc & IB_ACCESS_LOCAL_WRITE ? TPT_LOCAL_WRITE : 0) | |
296 | (acc & IB_ACCESS_MW_BIND ? TPT_MW_BIND : 0) | | ||
296 | TPT_LOCAL_READ; | 297 | TPT_LOCAL_READ; |
297 | } | 298 | } |
298 | 299 | ||
300 | static inline u32 iwch_ib_to_tpt_bind_access(int acc) | ||
301 | { | ||
302 | return (acc & IB_ACCESS_REMOTE_WRITE ? TPT_REMOTE_WRITE : 0) | | ||
303 | (acc & IB_ACCESS_REMOTE_READ ? TPT_REMOTE_READ : 0); | ||
304 | } | ||
305 | |||
299 | enum iwch_mmid_state { | 306 | enum iwch_mmid_state { |
300 | IWCH_STAG_STATE_VALID, | 307 | IWCH_STAG_STATE_VALID, |
301 | IWCH_STAG_STATE_INVALID | 308 | IWCH_STAG_STATE_INVALID |