]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ehca/ehca_qp.c
IB/ehca: Prevent posting of SQ WQEs if QP not in RTS
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ehca / ehca_qp.c
index 3eb14a52cbf2bc4ebb5a2a46c129861a05ebdb28..5a653d75fd2e33e7090fdf6d0cf95c6e02f5e4dc 100644 (file)
@@ -550,6 +550,7 @@ static struct ehca_qp *internal_create_qp(
        spin_lock_init(&my_qp->spinlock_r);
        my_qp->qp_type = qp_type;
        my_qp->ext_type = parms.ext_type;
+       my_qp->state = IB_QPS_RESET;
 
        if (init_attr->recv_cq)
                my_qp->recv_cq =
@@ -1508,6 +1509,8 @@ static int internal_modify_qp(struct ib_qp *ibqp,
        if (attr_mask & IB_QP_QKEY)
                my_qp->qkey = attr->qkey;
 
+       my_qp->state = qp_new_state;
+
 modify_qp_exit2:
        if (squeue_locked) { /* this means: sqe -> rts */
                spin_unlock_irqrestore(&my_qp->spinlock_s, flags);