From: Sasha Neftin <sasha.nef...@intel.com> i225 specification recommends minus 1 microsecond from a value calculated for a LTR. Fix the calculation to match spec.
Signed-off-by: Sasha Neftin <sasha.nef...@intel.com> Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com> --- drivers/net/intel/e1000/base/e1000_i225.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/intel/e1000/base/e1000_i225.c b/drivers/net/intel/e1000/base/e1000_i225.c index 999fa03a3d..0b029c0ac2 100644 --- a/drivers/net/intel/e1000/base/e1000_i225.c +++ b/drivers/net/intel/e1000/base/e1000_i225.c @@ -982,7 +982,9 @@ static s32 e1000_set_ltr_i225(struct e1000_hw *hw, bool link) scale_max = (ltr_max / 1024) < 1024 ? E1000_LTRMAXV_SCALE_1024 : E1000_LTRMAXV_SCALE_32768; ltr_min /= scale_min == E1000_LTRMINV_SCALE_1024 ? 1024 : 32768; + ltr_min -= 1; ltr_max /= scale_max == E1000_LTRMAXV_SCALE_1024 ? 1024 : 32768; + ltr_max -= 1; /* Only write the LTR thresholds if they differ from before. */ ltrv = E1000_READ_REG(hw, E1000_LTRMINV); -- 2.43.5