浏览代码

RDMA/cxgb4: Add missing peer2peer check in MPAv2 code

Don't worry about p2p_type if peer2peer itself is not requested in the
first place.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Kumar Sanghvi 13 年之前
父节点
当前提交
91018f8632
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/infiniband/hw/cxgb4/cm.c

+ 1 - 1
drivers/infiniband/hw/cxgb4/cm.c

@@ -1114,7 +1114,7 @@ static void process_mpa_reply(struct c4iw_ep *ep, struct sk_buff *skb)
 	 * generated when moving QP to RTS state.
 	 * A TERM message will be sent after QP has moved to RTS state
 	 */
-	if ((ep->mpa_attr.version == 2) &&
+	if ((ep->mpa_attr.version == 2) && peer2peer &&
 			(ep->mpa_attr.p2p_type != p2p_type)) {
 		ep->mpa_attr.p2p_type = FW_RI_INIT_P2PTYPE_DISABLED;
 		rtr_mismatch = 1;