]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
IB/hfi1: Reset QSFP on every run through channel tuning
authorEaswar Hariharan <easwar.hariharan@intel.com>
Mon, 25 Jul 2016 20:40:03 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:09:29 +0000 (10:09 +0200)
commit b5e710195492f682d93097cddac13e594d39a946 upstream.

Active QSFP cables were reset only every alternate iteration of the
channel tuning algorithm instead of every iteration due to incorrect
reset of the flag that controlled QSFP reset, resulting in using stale
QSFP status in the channel tuning algorithm.

Fixes: 8ebd4cf1852a ("Add active and optical cable support")
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/hfi1/platform.c

index 03df9322f862984af68e82fca84295ad143ebed1..1d09f767b680742d2fe1689b439c26c7d6399039 100644 (file)
@@ -638,9 +638,13 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset,
        if (ret)
                return ret;
 
+       /*
+        * We'll change the QSFP memory contents from here on out, thus we set a
+        * flag here to remind ourselves to reset the QSFP module. This prevents
+        * reuse of stale settings established in our previous pass through.
+        */
        if (ppd->qsfp_info.reset_needed) {
                reset_qsfp(ppd);
-               ppd->qsfp_info.reset_needed = 0;
                refresh_qsfp_cache(ppd, &ppd->qsfp_info);
        } else {
                ppd->qsfp_info.reset_needed = 1;