Skip to content

Commit ae3cb8c

Browse files
mdrustaddavem330
authored andcommitted
ixgbe: Eliminate useless message and improve logic
Remove a useless log message and improve the logic for setting a PHY address from the contents of the MNG_IF_SEL register. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 792438e commit ae3cb8c

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,18 +2394,12 @@ static void ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw)
23942394
/* If X552 (X550EM_a) and MDIO is connected to external PHY, then set
23952395
* PHY address. This register field was has only been used for X552.
23962396
*/
2397-
if (!hw->phy.nw_mng_if_sel) {
2398-
if (hw->mac.type == ixgbe_mac_x550em_a) {
2399-
struct ixgbe_adapter *adapter = hw->back;
2400-
2401-
e_warn(drv, "nw_mng_if_sel not set\n");
2402-
}
2403-
return;
2397+
if (hw->mac.type == ixgbe_mac_x550em_a &&
2398+
hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_MDIO_ACT) {
2399+
hw->phy.mdio.prtad = (hw->phy.nw_mng_if_sel &
2400+
IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD) >>
2401+
IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT;
24042402
}
2405-
2406-
hw->phy.mdio.prtad = (hw->phy.nw_mng_if_sel &
2407-
IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD) >>
2408-
IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT;
24092403
}
24102404

24112405
/** ixgbe_init_phy_ops_X550em - PHY/SFP specific init

0 commit comments

Comments
 (0)