Skip to content

Commit 9bf1e20

Browse files
pgreenwaJeff Kirsher
authored andcommitted
ixgbe: fix read-modify-write in x550 phy setup
Replaced an assignment operation with an OR operation. The variable assignment was overwriting the value read from the PHY register. The OR operation sets only the intended register bits. The bits that were being overwritten are reserved, so the assignment had no functional impact. Reported by: Shannon Nelson <[email protected]> Signed-off-by: Paul Greenwalt <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 1aa3784 commit 9bf1e20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,9 +1847,9 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
18471847
(IXGBE_CS4227_EDC_MODE_SR << 1));
18481848

18491849
if (setup_linear)
1850-
reg_phy_ext = (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 1;
1850+
reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 1;
18511851
else
1852-
reg_phy_ext = (IXGBE_CS4227_EDC_MODE_SR << 1) | 1;
1852+
reg_phy_ext |= (IXGBE_CS4227_EDC_MODE_SR << 1) | 1;
18531853

18541854
ret_val = hw->phy.ops.write_reg(hw, reg_slice,
18551855
IXGBE_MDIO_ZERO_DEV_TYPE, reg_phy_ext);

0 commit comments

Comments
 (0)