RDMA/cm: Remove setting local write as part of QP access flags
authorDotan Barak <dotanb@mellanox.co.il>
Tue, 24 Oct 2006 20:35:27 +0000 (13:35 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 29 Nov 2006 23:33:06 +0000 (15:33 -0800)
The qp_access_flags are for remote access permissions only, so
IB_ACCESS_LOCAL_WRITE is an invalid value.  Remove it from the values
set by cm_init_qp_init_attr() and cma_init_ib_qp().

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/cm.c
drivers/infiniband/core/cma.c

index 82bc83baceaf6e27019efb01baa1c905071611f8..78d9c0c3314854b968bee2087fd68c8514d03ff3 100644 (file)
@@ -3172,8 +3172,7 @@ static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,
        case IB_CM_ESTABLISHED:
                *qp_attr_mask = IB_QP_STATE | IB_QP_ACCESS_FLAGS |
                                IB_QP_PKEY_INDEX | IB_QP_PORT;
-               qp_attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE |
-                                          IB_ACCESS_REMOTE_WRITE;
+               qp_attr->qp_access_flags = IB_ACCESS_REMOTE_WRITE;
                if (cm_id_priv->responder_resources)
                        qp_attr->qp_access_flags |= IB_ACCESS_REMOTE_READ |
                                                    IB_ACCESS_REMOTE_ATOMIC;
index b449e26b84d22b964f4cf34663a4a26304f33913..cf48f269743449b6a4797a2727e84148fe1bf176 100644 (file)
@@ -344,7 +344,7 @@ static int cma_init_ib_qp(struct rdma_id_private *id_priv, struct ib_qp *qp)
                return ret;
 
        qp_attr.qp_state = IB_QPS_INIT;
-       qp_attr.qp_access_flags = IB_ACCESS_LOCAL_WRITE;
+       qp_attr.qp_access_flags = 0;
        qp_attr.port_num = id_priv->id.port_num;
        return ib_modify_qp(qp, &qp_attr, IB_QP_STATE | IB_QP_ACCESS_FLAGS |
                                          IB_QP_PKEY_INDEX | IB_QP_PORT);