From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Convert REP SRQ field. Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- drivers/infiniband/core/cm.c | 6 +++--- drivers/infiniband/core/cm_msgs.h | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 78d595c1d39b..035617f3b16c 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -2077,10 +2077,10 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg, rep_msg->initiator_depth = param->initiator_depth; CM_SET(REP_END_TO_END_FLOW_CONTROL, rep_msg, param->flow_control); - cm_rep_set_srq(rep_msg, param->srq); + CM_SET(REP_SRQ, rep_msg, param->srq); CM_SET(REP_LOCAL_QPN, rep_msg, param->qp_num); } else { - cm_rep_set_srq(rep_msg, 1); + CM_SET(REP_SRQ, rep_msg, 1); CM_SET(REP_LOCAL_EE_CONTEXT_NUMBER, rep_msg, param->qp_num); } @@ -2227,7 +2227,7 @@ static void cm_format_rep_event(struct cm_work *work, enum ib_qp_type qp_type) param->failover_accepted = CM_GET(REP_FAILOVER_ACCEPTED, rep_msg); param->flow_control = CM_GET(REP_END_TO_END_FLOW_CONTROL, rep_msg); param->rnr_retry_count = CM_GET(REP_RNR_RETRY_COUNT, rep_msg); - param->srq = cm_rep_get_srq(rep_msg); + param->srq = CM_GET(REP_SRQ, rep_msg); work->cm_event.private_data = &rep_msg->private_data; work->cm_event.private_data_len = CM_REP_PRIVATE_DATA_SIZE; } diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h index c02bba29a27d..dfda88462818 100644 --- a/drivers/infiniband/core/cm_msgs.h +++ b/drivers/infiniband/core/cm_msgs.h @@ -462,17 +462,6 @@ struct cm_rep_msg { } __packed; -static inline u8 cm_rep_get_srq(struct cm_rep_msg *rep_msg) -{ - return (u8) ((rep_msg->offset27 >> 4) & 0x1); -} - -static inline void cm_rep_set_srq(struct cm_rep_msg *rep_msg, u8 srq) -{ - rep_msg->offset27 = (u8) ((rep_msg->offset27 & 0xEF) | - ((srq & 0x1) << 4)); -} - struct cm_rtu_msg { struct ib_mad_hdr hdr; -- 2.20.1