From: Wei Lin Guay Date: Mon, 31 Oct 2016 20:25:26 +0000 (+0100) Subject: sif: rq: do not flush rq if it is an srq X-Git-Tag: v4.1.12-92~36^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=46faa0ff8252d90b32112c3ab8e59b8723947d9c;p=users%2Fjedix%2Flinux-maple.git sif: rq: do not flush rq if it is an srq sifdrv needs to flush a regular rq (non-srq) once it detects that a qp is transitioned into ERR state. Nevertheless, if a qp is created with srq and with no event handler, the srq might be accidentally flushed once the qp is transitioned into ERR sate. Orabug: 25071205 Signed-off-by: Wei Lin Guay Reviewed-by: HÃ¥kon Bugge --- diff --git a/drivers/infiniband/hw/sif/sif_eq.c b/drivers/infiniband/hw/sif/sif_eq.c index 4af42e225b88..f452d5e9b6dc 100644 --- a/drivers/infiniband/hw/sif/sif_eq.c +++ b/drivers/infiniband/hw/sif/sif_eq.c @@ -682,7 +682,7 @@ static void handle_event_work(struct work_struct *work) .element.qp = &qp->ibqp }; ibqp->event_handler(&ibe, ibqp->qp_context); - } else { + } else if (!rq->is_srq) { /* WA #622: if reqular RQ, flush */ if (sif_flush_rq_wq(sdev, rq, qp, atomic_read(&rq_sw->length))) sif_log(sdev, SIF_INFO, "failed to flush RQ %d",