[openib-general] [PATCH] mthca: mthca_modify_qp should allow any to reset QP state transition

Hal Rosenstock halr at voltaire.com
Mon Oct 11 12:01:01 PDT 2004


mthca: mthca_modify_qp should validate attr->qp_state < 0 rather than
<=0 so any to reset QP state transition is allowed


Index: mthca_qp.c
===================================================================
--- mthca_qp.c  (revision 965)
+++ mthca_qp.c  (working copy)
@@ -495,7 +495,7 @@
        spin_unlock_irq(&qp->lock);
  
        if (attr_mask & IB_QP_STATE) {
-               if (attr->qp_state <= 0 || attr->qp_state > IB_QPS_ERR)
+               if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR)
                        return -EINVAL;
                new_state = attr->qp_state;
        } else





More information about the general mailing list