iw_cxgb4: only clear the ARMED bit if a notification is needed
In __flush_qp(), the CQ ARMED bit was being cleared regardless of
whether any notification is actually needed. This resulted in the iser
termination logic getting stuck in ib_drain_sq() because the CQ was not
marked ARMED and thus the drain CQE notification wasn't triggered.
This new bug was exposed when this commit was merged:
commit cbb40fadd3
("iw_cxgb4: only call the cq comp_handler when the
cq is armed")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
d0e312fe3d
commit
335ebf6fa3
@@ -1285,21 +1285,21 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
|
|||||||
spin_unlock_irqrestore(&rchp->lock, flag);
|
spin_unlock_irqrestore(&rchp->lock, flag);
|
||||||
|
|
||||||
if (schp == rchp) {
|
if (schp == rchp) {
|
||||||
if (t4_clear_cq_armed(&rchp->cq) &&
|
if ((rq_flushed || sq_flushed) &&
|
||||||
(rq_flushed || sq_flushed)) {
|
t4_clear_cq_armed(&rchp->cq)) {
|
||||||
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
|
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
|
||||||
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
|
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
|
||||||
rchp->ibcq.cq_context);
|
rchp->ibcq.cq_context);
|
||||||
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
|
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t4_clear_cq_armed(&rchp->cq) && rq_flushed) {
|
if (rq_flushed && t4_clear_cq_armed(&rchp->cq)) {
|
||||||
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
|
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
|
||||||
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
|
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
|
||||||
rchp->ibcq.cq_context);
|
rchp->ibcq.cq_context);
|
||||||
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
|
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
|
||||||
}
|
}
|
||||||
if (t4_clear_cq_armed(&schp->cq) && sq_flushed) {
|
if (sq_flushed && t4_clear_cq_armed(&schp->cq)) {
|
||||||
spin_lock_irqsave(&schp->comp_handler_lock, flag);
|
spin_lock_irqsave(&schp->comp_handler_lock, flag);
|
||||||
(*schp->ibcq.comp_handler)(&schp->ibcq,
|
(*schp->ibcq.comp_handler)(&schp->ibcq,
|
||||||
schp->ibcq.cq_context);
|
schp->ibcq.cq_context);
|
||||||
|
Reference in New Issue
Block a user