From: Wei Lin Guay Date: Thu, 23 Jun 2016 19:39:43 +0000 (+0200) Subject: sif: BZ 4150: Flush retry reset at 1 when QP is modified to ERROR X-Git-Tag: v4.1.12-92~129^2~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a2c54bcfcfa9b7cbfa67b2715f5ef927424e44be;p=users%2Fjedix%2Flinux-maple.git sif: BZ 4150: Flush retry reset at 1 when QP is modified to ERROR Orabug: 23607042 The workaround is to disallow the polling of CQ before the QP is modified to ERROR. By doing so, the CQ will be updated to the correct sq_seq during post_wa4074. Signed-off-by: Wei Lin Guay Reviewed-by: Knut Omang --- diff --git a/drivers/infiniband/hw/sif/sif_r3.c b/drivers/infiniband/hw/sif/sif_r3.c index 9ede4fc32abd..08e54b2e9ff0 100644 --- a/drivers/infiniband/hw/sif/sif_r3.c +++ b/drivers/infiniband/hw/sif/sif_r3.c @@ -490,6 +490,8 @@ int pre_process_wa4074(struct sif_dev *sdev, struct sif_qp *qp) struct psif_sq_entry *sqe; u16 head; int len; + struct sif_cq *cq = (sq && sq->cq_idx >= 0) ? get_sif_cq(sdev, sq->cq_idx) : NULL; + struct sif_cq_sw *cq_sw = cq ? get_sif_cq_sw(sdev, cq->index) : NULL; if (qp->flags & SIF_QPF_NO_EVICT) return 0; /* do-not-evict QPs don't have any SQs */ @@ -510,6 +512,9 @@ int pre_process_wa4074(struct sif_dev *sdev, struct sif_qp *qp) set_psif_wr__checksum(&sqe->wr, 0); len--; } + if (cq) + set_bit(CQ_POLLING_NOT_ALLOWED, &cq_sw->flags); + return 0; }