Commit b8b50e35 authored by Hoang-Nam Nguyen's avatar Hoang-Nam Nguyen Committed by Roland Dreier

IB/ehca: Define array to store SMI/GSI QPs

Signed-off-by: default avatarHoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 0c86e280
...@@ -94,7 +94,7 @@ struct ehca_sma_attr { ...@@ -94,7 +94,7 @@ struct ehca_sma_attr {
struct ehca_sport { struct ehca_sport {
struct ib_cq *ibcq_aqp1; struct ib_cq *ibcq_aqp1;
struct ib_qp *ibqp_aqp1; struct ib_qp *ibqp_sqp[2];
enum ib_port_state port_state; enum ib_port_state port_state;
struct ehca_sma_attr saved_attr; struct ehca_sma_attr saved_attr;
}; };
......
...@@ -511,7 +511,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port) ...@@ -511,7 +511,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
} }
sport->ibcq_aqp1 = ibcq; sport->ibcq_aqp1 = ibcq;
if (sport->ibqp_aqp1) { if (sport->ibqp_sqp[IB_QPT_GSI]) {
ehca_err(&shca->ib_device, "AQP1 QP is already created."); ehca_err(&shca->ib_device, "AQP1 QP is already created.");
ret = -EPERM; ret = -EPERM;
goto create_aqp1; goto create_aqp1;
...@@ -537,7 +537,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port) ...@@ -537,7 +537,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
ret = PTR_ERR(ibqp); ret = PTR_ERR(ibqp);
goto create_aqp1; goto create_aqp1;
} }
sport->ibqp_aqp1 = ibqp; sport->ibqp_sqp[IB_QPT_GSI] = ibqp;
return 0; return 0;
...@@ -550,7 +550,7 @@ static int ehca_destroy_aqp1(struct ehca_sport *sport) ...@@ -550,7 +550,7 @@ static int ehca_destroy_aqp1(struct ehca_sport *sport)
{ {
int ret; int ret;
ret = ib_destroy_qp(sport->ibqp_aqp1); ret = ib_destroy_qp(sport->ibqp_sqp[IB_QPT_GSI]);
if (ret) { if (ret) {
ehca_gen_err("Cannot destroy AQP1 QP. ret=%i", ret); ehca_gen_err("Cannot destroy AQP1 QP. ret=%i", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment