]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: BZ 4150: Flush retry reset at 1 when QP is modified to ERROR
authorWei Lin Guay <wei.lin.guay@oracle.com>
Thu, 23 Jun 2016 19:39:43 +0000 (21:39 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:44:11 +0000 (16:44 +0200)
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 <wei.lin.guay@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_r3.c

index 9ede4fc32abdcf0447c6b5038a39fcb2e429355c..08e54b2e9ff0d698fe19fcd823728209ed111f4d 100644 (file)
@@ -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;
 }