提交 7564a888 编写于 作者: M Mark Rustad 提交者: Jeff Kirsher

ixgbe: Use MDIO_PRTAD_NONE consistently

The value MDIO_PRTAD_NONE should be used to indicate no PHY address.
Not 0, not 0xFFFF. Use the MDIO_PRTAD_NONE value consistently.
Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 14b22cd9
...@@ -346,8 +346,8 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw) ...@@ -346,8 +346,8 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
return 0; return 0;
} }
} }
/* clear value if nothing found */ /* indicate no PHY found */
hw->phy.mdio.prtad = 0; hw->phy.mdio.prtad = MDIO_PRTAD_NONE;
return IXGBE_ERR_PHY_ADDR_INVALID; return IXGBE_ERR_PHY_ADDR_INVALID;
} }
return 0; return 0;
......
...@@ -1459,7 +1459,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed, ...@@ -1459,7 +1459,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
/* Configure internal PHY for KR/KX. */ /* Configure internal PHY for KR/KX. */
ixgbe_setup_kr_speed_x550em(hw, speed); ixgbe_setup_kr_speed_x550em(hw, speed);
if (!hw->phy.mdio.prtad || hw->phy.mdio.prtad == 0xFFFF) if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE)
return IXGBE_ERR_PHY_ADDR_INVALID; return IXGBE_ERR_PHY_ADDR_INVALID;
/* Get external PHY device id */ /* Get external PHY device id */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册