[dpdk-stable] [DPDK 18/19] net/igc/base: fix LTR algorithm for i225 device

Guinan Sun guinanx.sun at intel.com
Thu Jul 2 07:23:13 CEST 2020


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 at dpdk.org

Signed-off-by: Sasha Neftin <sasha.neftin at intel.com>
Signed-off-by: Guinan Sun <guinanx.sun at 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



More information about the stable mailing list