Commit 0182d1f3 authored by Sasha Neftin's avatar Sasha Neftin Committed by Tony Nguyen
Browse files

igc: Fix typo in i225 LTR functions



The LTR maximum value was incorrectly written using the scale from
the LTR minimum value. This would cause incorrect values to be sent,
in cases where the initial calculation lead to different min/max scales.

Fixes: 707abf06 ("igc: Add initial LTR support")
Suggested-by: default avatarDima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
Tested-by: default avatarNechama Kraus <nechamax.kraus@linux.intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent b6d335a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -636,7 +636,7 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
		ltrv = rd32(IGC_LTRMAXV);
		ltrv = rd32(IGC_LTRMAXV);
		if (ltr_max != (ltrv & IGC_LTRMAXV_LTRV_MASK)) {
		if (ltr_max != (ltrv & IGC_LTRMAXV_LTRV_MASK)) {
			ltrv = IGC_LTRMAXV_LSNP_REQ | ltr_max |
			ltrv = IGC_LTRMAXV_LSNP_REQ | ltr_max |
			       (scale_min << IGC_LTRMAXV_SCALE_SHIFT);
			       (scale_max << IGC_LTRMAXV_SCALE_SHIFT);
			wr32(IGC_LTRMAXV, ltrv);
			wr32(IGC_LTRMAXV, ltrv);
		}
		}
	}
	}