IB/ehca: Define array to store SMI/GSI QPs
authorHoang-Nam Nguyen <hnguyen at de.ibm.com>
Thu, 17 Jan 2008 14:04:32 +0000 (15:04 +0100)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:44 +0000 (14:15 -0800)
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_main.c

index 74d2b72a11d833851f72da709b328eafe6373272..936580d86ad3f6d603aeb83ecc8aab52cca8c4d8 100644 (file)
@@ -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;
 };
index 173d3e9f9268ddabfb4f3877a32f76cfb71f6340..0a34083dac8ab13620b3526d0ebd05ca5c65fe58 100644 (file)
@@ -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;
@@ -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;
 
@@ -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;