]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
intel: legacy: Partial revert of field get conversion
authorSasha Neftin <sasha.neftin@intel.com>
Sun, 18 Feb 2024 07:42:21 +0000 (09:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:40 +0000 (11:11 +0200)
commit ba54b1a276a6b69d80649942fe5334d19851443e upstream.

Refactoring of the field get 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")
Suggested-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Florian Larysch <fl@n621.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/e1000e/ich8lan.c

index 4d83c9a0c023a764882db119746d4fcb4457640f..f9e94be36e97f20b5aeeccf43dfe580bf7c01847 100644 (file)
@@ -2573,7 +2573,7 @@ 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);