aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_qp.c
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2008-04-23 11:55:45 -0700
committerRoland Dreier <rolandd@cisco.com>2008-04-23 11:55:45 -0700
commit863fb09fbf1eb74f56ea02184a62165056aa29cb (patch)
tree7fb54dd86320f2fba3a6276f5b2fa0e09efed7a3 /drivers/infiniband/hw/ehca/ehca_qp.c
parentIPoIB: Handle 4K IB MTU for UD (datagram) mode (diff)
downloadlinux-dev-863fb09fbf1eb74f56ea02184a62165056aa29cb.tar.xz
linux-dev-863fb09fbf1eb74f56ea02184a62165056aa29cb.zip
IB/ehca: Prevent posting of SQ WQEs if QP not in RTS
...as required by IB Spec, C10-29. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_qp.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index 3eb14a52cbf2..5a653d75fd2e 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -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);