aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen at de.ibm.com>2008-01-17 09:04:32 -0500
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:44 -0500
commitb8b50e353b85bc3c791dd2b99370ac300ebcd186 (patch)
tree80b6706a9601b3ce61c1d9caa049eb06520ed87a
parent0c86e280fe8a08d4ae30b77e46a1e7da28d756c9 (diff)
IB/ehca: Define array to store SMI/GSI QPs
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/ehca/ehca_classes.h2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
index 74d2b72a11d8..936580d86ad3 100644
--- a/drivers/infiniband/hw/ehca/ehca_classes.h
+++ b/drivers/infiniband/hw/ehca/ehca_classes.h
@@ -94,7 +94,7 @@ struct ehca_sma_attr {
94 94
95struct ehca_sport { 95struct ehca_sport {
96 struct ib_cq *ibcq_aqp1; 96 struct ib_cq *ibcq_aqp1;
97 struct ib_qp *ibqp_aqp1; 97 struct ib_qp *ibqp_sqp[2];
98 enum ib_port_state port_state; 98 enum ib_port_state port_state;
99 struct ehca_sma_attr saved_attr; 99 struct ehca_sma_attr saved_attr;
100}; 100};
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 173d3e9f9268..0a34083dac8a 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -511,7 +511,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
511 } 511 }
512 sport->ibcq_aqp1 = ibcq; 512 sport->ibcq_aqp1 = ibcq;
513 513
514 if (sport->ibqp_aqp1) { 514 if (sport->ibqp_sqp[IB_QPT_GSI]) {
515 ehca_err(&shca->ib_device, "AQP1 QP is already created."); 515 ehca_err(&shca->ib_device, "AQP1 QP is already created.");
516 ret = -EPERM; 516 ret = -EPERM;
517 goto create_aqp1; 517 goto create_aqp1;
@@ -537,7 +537,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
537 ret = PTR_ERR(ibqp); 537 ret = PTR_ERR(ibqp);
538 goto create_aqp1; 538 goto create_aqp1;
539 } 539 }
540 sport->ibqp_aqp1 = ibqp; 540 sport->ibqp_sqp[IB_QPT_GSI] = ibqp;
541 541
542 return 0; 542 return 0;
543 543
@@ -550,7 +550,7 @@ static int ehca_destroy_aqp1(struct ehca_sport *sport)
550{ 550{
551 int ret; 551 int ret;
552 552
553 ret = ib_destroy_qp(sport->ibqp_aqp1); 553 ret = ib_destroy_qp(sport->ibqp_sqp[IB_QPT_GSI]);
554 if (ret) { 554 if (ret) {
555 ehca_gen_err("Cannot destroy AQP1 QP. ret=%i", ret); 555 ehca_gen_err("Cannot destroy AQP1 QP. ret=%i", ret);
556 return ret; 556 return ret;