]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: Fix regressions in supporting fw from release 0.1.0.4 and earlier
authorKnut Omang <knut.omang@oracle.com>
Mon, 30 May 2016 12:12:39 +0000 (14:12 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:01:37 +0000 (16:01 +0200)
Orabug: 23497496

This commit fixes two separate regressions in handling the old fw:

1) Teardown of the dne_qp happens only with older FWs because the newer
   firmwares implements the dne_qp handling in fw, so
   driver does not invoke the teardown code. This teardown code
   uses generic calls that has been implicitly amended
   to by the WA for Bug #4074, which also assumed that all QPs
   subject to that call has a valid send queue. The DNE QPs don't
   and this causes a null pointer exception, which is triggered
   both during driver unload and as a side effect of lid changes.
2) EPSC support for SL to TSL mapping was introduced in EPSC API v.0.56
   but was broken - this causes the driver to set wrong values
   which leads to modify_qp errors. The fix is just to avoid putting
   the map to use unless epsc version is >= 0.57.

Signed-off-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_hwi.c
drivers/infiniband/hw/sif/sif_r3.c

index 0c07b45e9ce106952fc5d4c831a4364f0cc3fd41..2a299a5085df0f6a6885a46644d352f192aecf70 100644 (file)
@@ -287,7 +287,7 @@ static void setup_sl2tsl_map(struct sif_dev *sdev)
                        for (qosl = QOSL_HIGH_BANDWIDTH; qosl <= QOSL_LOW_LATENCY; ++qosl)
                                sdev->sl2tsl[sl][port][qosl] = port ? TSL_DATA_1 : TSL_DATA;
 
-       if (eps_fw_version_lt(&sdev->es[sdev->mbox_epsc], 0, 56)) {
+       if (eps_fw_version_lt(&sdev->es[sdev->mbox_epsc], 0, 57)) {
                sif_log(sdev, SIF_INFO, "Setting up TSL per port (0.50 <= fw <= 0.56)");
                return;
        }
index 0dcd7118b1f6dbe14f3ba35d99c2017f795daedb..5dce50c28ddf324fe265fc31d51f88822e6d8126 100644 (file)
@@ -470,6 +470,9 @@ int pre_process_wa4074(struct sif_dev *sdev, struct sif_qp *qp)
        u16 head;
        int len;
 
+       if (qp->flags & SIF_QPF_NO_EVICT)
+               return 0; /* do-not-evict QPs don't have any SQs */
+
        len = outstanding_wqes(sdev, qp, &head);
        if (len <= 0)
                return -1;