[PATCH 2/2] RDMA/core: Initialize port_num in qp_attr
From: Mustafa Ismail
Date: Thu Jul 13 2017 - 15:38:00 EST
Initialize the port_num for iWARP in rdma_init_qp_attr.
Signed-off-by: Mustafa Ismail <mustafa.ismail@xxxxxxxxx>
---
drivers/infiniband/core/cma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 31bb82d..d65a093 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1044,6 +1044,8 @@ int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr,
} else
ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr,
qp_attr_mask);
+ qp_attr->port_num = id_priv->id.port_num;
+ *qp_attr_mask |= IB_QP_PORT;
} else
ret = -ENOSYS;
--
2.7.4