diff options
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5ee7fe433136..355e288ec969 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
| @@ -1285,21 +1285,21 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp, | |||
| 1285 | spin_unlock_irqrestore(&rchp->lock, flag); | 1285 | spin_unlock_irqrestore(&rchp->lock, flag); |
| 1286 | 1286 | ||
| 1287 | if (schp == rchp) { | 1287 | if (schp == rchp) { |
| 1288 | if (t4_clear_cq_armed(&rchp->cq) && | 1288 | if ((rq_flushed || sq_flushed) && |
| 1289 | (rq_flushed || sq_flushed)) { | 1289 | t4_clear_cq_armed(&rchp->cq)) { |
| 1290 | spin_lock_irqsave(&rchp->comp_handler_lock, flag); | 1290 | spin_lock_irqsave(&rchp->comp_handler_lock, flag); |
| 1291 | (*rchp->ibcq.comp_handler)(&rchp->ibcq, | 1291 | (*rchp->ibcq.comp_handler)(&rchp->ibcq, |
| 1292 | rchp->ibcq.cq_context); | 1292 | rchp->ibcq.cq_context); |
| 1293 | spin_unlock_irqrestore(&rchp->comp_handler_lock, flag); | 1293 | spin_unlock_irqrestore(&rchp->comp_handler_lock, flag); |
| 1294 | } | 1294 | } |
| 1295 | } else { | 1295 | } else { |
| 1296 | if (t4_clear_cq_armed(&rchp->cq) && rq_flushed) { | 1296 | if (rq_flushed && t4_clear_cq_armed(&rchp->cq)) { |
| 1297 | spin_lock_irqsave(&rchp->comp_handler_lock, flag); | 1297 | spin_lock_irqsave(&rchp->comp_handler_lock, flag); |
| 1298 | (*rchp->ibcq.comp_handler)(&rchp->ibcq, | 1298 | (*rchp->ibcq.comp_handler)(&rchp->ibcq, |
| 1299 | rchp->ibcq.cq_context); | 1299 | rchp->ibcq.cq_context); |
| 1300 | spin_unlock_irqrestore(&rchp->comp_handler_lock, flag); | 1300 | spin_unlock_irqrestore(&rchp->comp_handler_lock, flag); |
| 1301 | } | 1301 | } |
| 1302 | if (t4_clear_cq_armed(&schp->cq) && sq_flushed) { | 1302 | if (sq_flushed && t4_clear_cq_armed(&schp->cq)) { |
| 1303 | spin_lock_irqsave(&schp->comp_handler_lock, flag); | 1303 | spin_lock_irqsave(&schp->comp_handler_lock, flag); |
| 1304 | (*schp->ibcq.comp_handler)(&schp->ibcq, | 1304 | (*schp->ibcq.comp_handler)(&schp->ibcq, |
| 1305 | schp->ibcq.cq_context); | 1305 | schp->ibcq.cq_context); |
