Skip to content

Commit

Permalink
IB/ehca: Define array to store SMI/GSI QPs
Browse files Browse the repository at this point in the history
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Hoang-Nam Nguyen authored and Roland Dreier committed Jan 25, 2008
1 parent 0c86e28 commit b8b50e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/ehca/ehca_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct ehca_sma_attr {

struct ehca_sport {
struct ib_cq *ibcq_aqp1;
struct ib_qp *ibqp_aqp1;
struct ib_qp *ibqp_sqp[2];
enum ib_port_state port_state;
struct ehca_sma_attr saved_attr;
};
Expand Down
6 changes: 3 additions & 3 deletions drivers/infiniband/hw/ehca/ehca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
}
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.");
ret = -EPERM;
goto create_aqp1;
Expand All @@ -537,7 +537,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
ret = PTR_ERR(ibqp);
goto create_aqp1;
}
sport->ibqp_aqp1 = ibqp;
sport->ibqp_sqp[IB_QPT_GSI] = ibqp;

return 0;

Expand All @@ -550,7 +550,7 @@ static int ehca_destroy_aqp1(struct ehca_sport *sport)
{
int ret;

ret = ib_destroy_qp(sport->ibqp_aqp1);
ret = ib_destroy_qp(sport->ibqp_sqp[IB_QPT_GSI]);
if (ret) {
ehca_gen_err("Cannot destroy AQP1 QP. ret=%i", ret);
return ret;
Expand Down

0 comments on commit b8b50e3

Please sign in to comment.