Commit 4634b794 authored by Mitko Haralanov's avatar Mitko Haralanov Committed by Roland Dreier

IB/qib: Set default LE2 value for active cables to 0

For active and far-EQ cables use an LE2 value of 0 for improved SI.
Signed-off-by: default avatarMitko Haralanov <mitko@qlogic.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent cc7fb059
...@@ -5582,9 +5582,16 @@ static void qsfp_7322_event(struct work_struct *work) ...@@ -5582,9 +5582,16 @@ static void qsfp_7322_event(struct work_struct *work)
* even on failure to read cable information. We don't * even on failure to read cable information. We don't
* get here for QME, so IS_QME check not needed here. * get here for QME, so IS_QME check not needed here.
*/ */
le2 = (!ret && qd->cache.atten[1] >= qib_long_atten && if (!ret && !ppd->dd->cspec->r1) {
!ppd->dd->cspec->r1 && QSFP_IS_CU(qd->cache.tech)) ? if (QSFP_IS_ACTIVE_FAR(qd->cache.tech))
LE2_5m : LE2_DEFAULT; le2 = LE2_QME;
else if (qd->cache.atten[1] >= qib_long_atten &&
QSFP_IS_CU(qd->cache.tech))
le2 = LE2_5m;
else
le2 = LE2_DEFAULT;
} else
le2 = LE2_DEFAULT;
ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7)); ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7));
init_txdds_table(ppd, 0); init_txdds_table(ppd, 0);
} }
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
extern const char *const qib_qsfp_devtech[16]; extern const char *const qib_qsfp_devtech[16];
/* Active Equalization includes fiber, copper full EQ, and copper near Eq */ /* Active Equalization includes fiber, copper full EQ, and copper near Eq */
#define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1) #define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1)
/* Active Equalization includes fiber, copper full EQ, and copper far Eq */
#define QSFP_IS_ACTIVE_FAR(tech) ((0x32FF >> ((tech) >> 4)) & 1)
/* Attenuation should be valid for copper other than full/near Eq */ /* Attenuation should be valid for copper other than full/near Eq */
#define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1) #define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1)
/* Length is only valid if technology is "copper" */ /* Length is only valid if technology is "copper" */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment