* [dpdk-stable] [DPDK 18/19] net/igc/base: fix LTR algorithm for i225 device
[not found] <20200702052314.41828-1-guinanx.sun@intel.com>
@ 2020-07-02 5:23 ` Guinan Sun
0 siblings, 0 replies; only message in thread
From: Guinan Sun @ 2020-07-02 5:23 UTC (permalink / raw)
To: qabuild; +Cc: Guinan Sun, stable, Sasha Neftin
i225 specification recommended minus 1 microsecond from
a value calculated for a LTR. The scale is not changed.
Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
drivers/net/igc/base/igc_i225.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c
index 34d190c70..bbd783ae4 100644
--- a/drivers/net/igc/base/igc_i225.c
+++ b/drivers/net/igc/base/igc_i225.c
@@ -1072,7 +1072,9 @@ static s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
scale_max = (ltr_max / 1024) < 1024 ? IGC_LTRMAXV_SCALE_1024 :
IGC_LTRMAXV_SCALE_32768;
ltr_min /= scale_min == IGC_LTRMINV_SCALE_1024 ? 1024 : 32768;
+ ltr_min -= 1;
ltr_max /= scale_max == IGC_LTRMAXV_SCALE_1024 ? 1024 : 32768;
+ ltr_max -= 1;
/* Only write the LTR thresholds if they differ from before. */
ltrv = IGC_READ_REG(hw, IGC_LTRMINV);
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-02 5:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200702052314.41828-1-guinanx.sun@intel.com>
2020-07-02 5:23 ` [dpdk-stable] [DPDK 18/19] net/igc/base: fix LTR algorithm for i225 device Guinan Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).