summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/cxgb4/qp.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-10-12 05:30:16 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-10-12 05:30:16 -0700
commitbbaf766c22fc4745fbf4494037a62a21ad7c5ecc (patch)
treea0cac8263692d7aba4fad5feae5ad4ab195bdd95 /drivers/infiniband/hw/cxgb4/qp.c
parent51abefff9fb42c8834acb643d6aa70d855e0cf43 (diff)
parent1065e41df3d0060f67ea0b2432b252dc9acca341 (diff)
Merge "Merge android-4.4.159 (624c095) into msm-4.4"
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/qp.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 53aa7515f542..04206c600098 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1183,6 +1183,12 @@ static void flush_qp(struct c4iw_qp *qhp)
t4_set_wq_in_error(&qhp->wq);
if (qhp->ibqp.uobject) {
+
+ /* for user qps, qhp->wq.flushed is protected by qhp->mutex */
+ if (qhp->wq.flushed)
+ return;
+
+ qhp->wq.flushed = 1;
t4_set_cq_in_error(&rchp->cq);
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
(*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);