igc: Fix typo in i225 LTR functions
Subsystems (2)
PATCH 1/1 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.
Suggested-by Dima Ruinskiy <[email protected]>
Signed-off-by Sasha Neftin <[email protected]>
--- drivers/net/ethernet/intel/igc/igc_i225.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_i225.c +1 -1
@@ -636,7 +636,7 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link) ltrv =rd32 (IGC_LTRMAXV );if (ltr_max != (ltrv &IGC_LTRMAXV_LTRV_MASK )) { ltrv =IGC_LTRMAXV_LSNP_REQ | ltr_max | - (scale_min <<IGC_LTRMAXV_SCALE_SHIFT ); + (scale_max <<IGC_LTRMAXV_SCALE_SHIFT );wr32 (IGC_LTRMAXV , ltrv); } }
Signature · 1 line
2.25.1
Kraus
PATCH 1/1 igc: Fix typo in i225 LTR functions
Quoted 16 lines · Sasha Neftin
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.
Suggested-by Dima Ruinskiy <[email protected]>Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/igc/igc_i225.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igc/igc_i225.c +0
-0
drivers/net/ethernet/intel/igc/igc_i225.c s32 igc_set_ltr_i225(struct igc_hw *hw, bool link) · line 642
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_i225.c +1
-1@@ -636,7 +636,7 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link) ltrv =rd32 (IGC_LTRMAXV );if (ltr_max != (ltrv &IGC_LTRMAXV_LTRV_MASK )) { ltrv =IGC_LTRMAXV_LSNP_REQ | ltr_max | - (scale_min <<IGC_LTRMAXV_SCALE_SHIFT ); + (scale_max <<IGC_LTRMAXV_SCALE_SHIFT );wr32 (IGC_LTRMAXV , ltrv); } }
Tested-by Nechama Kraus <[email protected]>