Skip to content

Commit d9c23ff

Browse files
etantilovJeff Kirsher
authored andcommitted
ixgbe: fix incorrect status check
Check for ret_val instead of !ret_val to allow the rest of the code to execute and configure the speed properly. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 3ce5cb7 commit d9c23ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,14 +1750,14 @@ ixgbe_setup_mac_link_sfp_n(struct ixgbe_hw *hw, ixgbe_link_speed speed,
17501750
if (ret_val == IXGBE_ERR_SFP_NOT_PRESENT)
17511751
return 0;
17521752

1753-
if (!ret_val)
1753+
if (ret_val)
17541754
return ret_val;
17551755

17561756
/* Configure internal PHY for native SFI based on module type */
17571757
ret_val = hw->mac.ops.read_iosf_sb_reg(hw,
17581758
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
17591759
IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_phy_int);
1760-
if (!ret_val)
1760+
if (ret_val)
17611761
return ret_val;
17621762

17631763
reg_phy_int &= IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_DA;
@@ -1767,7 +1767,7 @@ ixgbe_setup_mac_link_sfp_n(struct ixgbe_hw *hw, ixgbe_link_speed speed,
17671767
ret_val = hw->mac.ops.write_iosf_sb_reg(hw,
17681768
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
17691769
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_phy_int);
1770-
if (!ret_val)
1770+
if (ret_val)
17711771
return ret_val;
17721772

17731773
/* Setup SFI internal link. */
@@ -1798,7 +1798,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
17981798
if (ret_val == IXGBE_ERR_SFP_NOT_PRESENT)
17991799
return 0;
18001800

1801-
if (!ret_val)
1801+
if (ret_val)
18021802
return ret_val;
18031803

18041804
/* Configure internal PHY for KR/KX. */

0 commit comments

Comments
 (0)