diff options
author | Mitko Haralanov <mitko@qlogic.com> | 2011-02-28 08:39:49 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-03-14 15:10:34 -0400 |
commit | 4634b7945cf0d6a66036ad10c3d658ae4eb39fa0 (patch) | |
tree | 55e10d1d51b6c40d5dff669bde13832c55e8a977 /drivers/infiniband | |
parent | cc7fb05946fb1cd2fd0582f9e39f759e20dfeefa (diff) |
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: Mitko Haralanov <mitko@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 13 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_qsfp.h | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index b01809a82cb0..4a2d21e15a70 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -5582,9 +5582,16 @@ static void qsfp_7322_event(struct work_struct *work) | |||
5582 | * even on failure to read cable information. We don't | 5582 | * even on failure to read cable information. We don't |
5583 | * get here for QME, so IS_QME check not needed here. | 5583 | * get here for QME, so IS_QME check not needed here. |
5584 | */ | 5584 | */ |
5585 | le2 = (!ret && qd->cache.atten[1] >= qib_long_atten && | 5585 | if (!ret && !ppd->dd->cspec->r1) { |
5586 | !ppd->dd->cspec->r1 && QSFP_IS_CU(qd->cache.tech)) ? | 5586 | if (QSFP_IS_ACTIVE_FAR(qd->cache.tech)) |
5587 | LE2_5m : LE2_DEFAULT; | 5587 | le2 = LE2_QME; |
5588 | else if (qd->cache.atten[1] >= qib_long_atten && | ||
5589 | QSFP_IS_CU(qd->cache.tech)) | ||
5590 | le2 = LE2_5m; | ||
5591 | else | ||
5592 | le2 = LE2_DEFAULT; | ||
5593 | } else | ||
5594 | le2 = LE2_DEFAULT; | ||
5588 | ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7)); | 5595 | ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7)); |
5589 | init_txdds_table(ppd, 0); | 5596 | init_txdds_table(ppd, 0); |
5590 | } | 5597 | } |
diff --git a/drivers/infiniband/hw/qib/qib_qsfp.h b/drivers/infiniband/hw/qib/qib_qsfp.h index 19b527bafd57..c109bbdc90ac 100644 --- a/drivers/infiniband/hw/qib/qib_qsfp.h +++ b/drivers/infiniband/hw/qib/qib_qsfp.h | |||
@@ -79,6 +79,8 @@ | |||
79 | extern const char *const qib_qsfp_devtech[16]; | 79 | extern const char *const qib_qsfp_devtech[16]; |
80 | /* Active Equalization includes fiber, copper full EQ, and copper near Eq */ | 80 | /* Active Equalization includes fiber, copper full EQ, and copper near Eq */ |
81 | #define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1) | 81 | #define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1) |
82 | /* Active Equalization includes fiber, copper full EQ, and copper far Eq */ | ||
83 | #define QSFP_IS_ACTIVE_FAR(tech) ((0x32FF >> ((tech) >> 4)) & 1) | ||
82 | /* Attenuation should be valid for copper other than full/near Eq */ | 84 | /* Attenuation should be valid for copper other than full/near Eq */ |
83 | #define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1) | 85 | #define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1) |
84 | /* Length is only valid if technology is "copper" */ | 86 | /* Length is only valid if technology is "copper" */ |