Skip to contentSkip to conversation

intel: legacy: Partially revert of field get conversion

PATCH In review Sasha Neftin 2 participants 2 messages Feb 18, 2024 – Feb 28, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel: legacy: Partially revert of field get conversion

Refactoring of the field gets conversion introduced a regression in the legacy Wake On Lan from a magic packet with i219 devices. Rx address copied not correctly from MAC to PHY with FIELD_GET macro.

Fixes b9a452545075 ("intel: legacy: field get conversion")
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -1
index a2788fd5f8bb..bdf32222344c 100644
@@ -2559,7 +2559,8 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
 		hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
 					   (u16)(mac_reg & 0xFFFF));
 		hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
-					   FIELD_GET(E1000_RAH_AV, mac_reg));
+					   (u16)((mac_reg & E1000_RAH_AV)
+					   >> 16));
 	}
 
 	e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
Signature · 1 line
2.30.2
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · Sasha Neftin

Refactoring of the field gets conversion introduced a regression in the legacy Wake On Lan from a magic packet with i219 devices. Rx address copied not correctly from MAC to PHY with FIELD_GET macro.

Fixes b9a452545075 ("intel: legacy: field get conversion")
---
  drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)