Skip to content

Commit

Permalink
IB/mthca: Allow the QP state transition RESET->RESET
Browse files Browse the repository at this point in the history
RESET->RESET is an allowed QP state transition, so mthca should handle
it correctly, by just returning success without involving the firmware.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Dotan Barak authored and Roland Dreier committed Feb 16, 2007
1 parent 8a03d9a commit fc89afc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
goto out;
}

if (cur_state == new_state && cur_state == IB_QPS_RESET) {
err = 0;
goto out;
}

if ((attr_mask & IB_QP_PKEY_INDEX) &&
attr->pkey_index >= dev->limits.pkey_table_len) {
mthca_dbg(dev, "P_Key index (%u) too large. max is %d\n",
Expand Down

0 comments on commit fc89afc

Please sign in to comment.