[v1,06/24] net/igc/base: fix LTR for i225
Checks
Commit Message
From: Sasha Neftin <sasha.neftin@intel.com>
i225 specification recommends minus 1 microsecond from a value
calculated for a LTR. Fix the calculation to match spec.
Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/intel/igc/base/igc_i225.c | 2 ++
1 file changed, 2 insertions(+)
@@ -1071,7 +1071,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);