Skip to content

Commit

Permalink
IB/ehca: Fix static rate regression
Browse files Browse the repository at this point in the history
Wrong choice of port number caused modify_qp() to fail -- fixed.

Signed-off-by: Joachim Fenkes <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
fenkes-ibm authored and Roland Dreier committed Nov 24, 2007
1 parent 9ed87fd commit 3fe2ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/ehca/ehca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3fe2ed3

Please sign in to comment.