]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/mthca: Allow the QP state transition RESET->RESET
authorDotan Barak <dotanb@dev.mellanox.co.il>
Tue, 9 Jan 2007 09:53:07 +0000 (11:53 +0200)
committerRoland Dreier <rolandd@cisco.com>
Fri, 16 Feb 2007 21:57:32 +0000 (13:57 -0800)
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>
drivers/infiniband/hw/mthca/mthca_qp.c

index 224c93dd29eb7ecd9c56e8df0044aaa5c6609277..71dc84bd425498cd968a33cfa6e005804861474f 100644 (file)
@@ -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",