]> err.no Git - linux-2.6/commitdiff
IB/ehca: Fix static rate regression
authorJoachim Fenkes <fenkes@de.ibm.com>
Thu, 22 Nov 2007 10:26:26 +0000 (12:26 +0200)
committerRoland Dreier <rolandd@cisco.com>
Sat, 24 Nov 2007 21:47:59 +0000 (13:47 -0800)
Wrong choice of port number caused modify_qp() to fail -- fixed.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_qp.c

index 2e3e6547cb784318859da7efa40059a689a0e266..dd126681fed095dc7dd58eb674c6dd08e0f80c94 100644 (file)
@@ -1203,7 +1203,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
                mqpcb->service_level = attr->ah_attr.sl;
                update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1);
 
-               if (ehca_calc_ipd(shca, my_qp->init_attr.port_num,
+               if (ehca_calc_ipd(shca, mqpcb->prim_phys_port,
                                  attr->ah_attr.static_rate,
                                  &mqpcb->max_static_rate)) {
                        ret = -EINVAL;
@@ -1302,7 +1302,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
                mqpcb->source_path_bits_al = attr->alt_ah_attr.src_path_bits;
                mqpcb->service_level_al = attr->alt_ah_attr.sl;
 
-               if (ehca_calc_ipd(shca, my_qp->init_attr.port_num,
+               if (ehca_calc_ipd(shca, mqpcb->alt_phys_port,
                                  attr->alt_ah_attr.static_rate,
                                  &mqpcb->max_static_rate_al)) {
                        ret = -EINVAL;