summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3/iwch_provider.h
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2008-08-04 11:05:43 -0700
committerRoland Dreier <rolandd@cisco.com>2008-08-04 11:05:43 -0700
commit1c355a6e80fd08e623416138631e240f431385f2 (patch)
tree923c13058b6c21836d8f4990f050c7511bc06ec9 /drivers/infiniband/hw/cxgb3/iwch_provider.h
parent5f0f66b022ba607db0a083bf5cc13e4a4336e366 (diff)
downloadtalos-obmc-linux-1c355a6e80fd08e623416138631e240f431385f2.tar.gz
talos-obmc-linux-1c355a6e80fd08e623416138631e240f431385f2.zip
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.h7
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)
return (acc & IB_ACCESS_REMOTE_WRITE ? TPT_REMOTE_WRITE : 0) |
(acc & IB_ACCESS_REMOTE_READ ? TPT_REMOTE_READ : 0) |
(acc & IB_ACCESS_LOCAL_WRITE ? TPT_LOCAL_WRITE : 0) |
+ (acc & IB_ACCESS_MW_BIND ? TPT_MW_BIND : 0) |
TPT_LOCAL_READ;
}
+static inline u32 iwch_ib_to_tpt_bind_access(int acc)
+{
+ return (acc & IB_ACCESS_REMOTE_WRITE ? TPT_REMOTE_WRITE : 0) |
+ (acc & IB_ACCESS_REMOTE_READ ? TPT_REMOTE_READ : 0);
+}
+
enum iwch_mmid_state {
IWCH_STAG_STATE_VALID,
IWCH_STAG_STATE_INVALID
OpenPOWER on IntegriCloud