Commit e2261bcc authored by Don Skidmore's avatar Don Skidmore Committed by Jeff Kirsher

ixgbe: fix X550 devices init flow

Reviewing the X550 copper init flow with the Si team resulted in a
new simplified flow.  We no longer wait for the PHY FW initialization
complete bit to be set as this bit is only set once by the PHY at power
on and then cleared on the first read. So only the first instance of
running SW (or possibly MAC FW) needs to initialize the PHY.

The PHY initialization has been simplified and now only requires that
the PHY FW be un-stalled
low-power mode or enabled the transceiver
Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Tested-by: default avatarKrishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e87ce1cd
...@@ -1516,15 +1516,6 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) ...@@ -1516,15 +1516,6 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
{ {
s32 status; s32 status;
u16 reg; u16 reg;
u32 retries = 2;
do {
/* decrement retries counter and exit if we hit 0 */
if (retries < 1) {
hw_dbg(hw, "External PHY not yet finished resetting.");
return IXGBE_ERR_PHY;
}
retries--;
status = hw->phy.ops.read_reg(hw, status = hw->phy.ops.read_reg(hw,
IXGBE_MDIO_TX_VENDOR_ALARMS_3, IXGBE_MDIO_TX_VENDOR_ALARMS_3,
...@@ -1533,35 +1524,10 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) ...@@ -1533,35 +1524,10 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
if (status) if (status)
return status; return status;
/* Verify PHY FW reset has completed */ /* If PHY FW reset completed bit is set then this is the first
} while ((reg & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK) != 1); * SW instance after a power on so the PHY FW must be un-stalled.
*/
/* Set port to low power mode */ if (reg & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK) {
status = hw->phy.ops.read_reg(hw,
IXGBE_MDIO_VENDOR_SPECIFIC_1_CONTROL,
IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
&reg);
if (status)
return status;
/* Enable the transmitter */
status = hw->phy.ops.read_reg(hw,
IXGBE_MDIO_PMD_STD_TX_DISABLE_CNTR,
IXGBE_MDIO_PMA_PMD_DEV_TYPE,
&reg);
if (status)
return status;
reg &= ~IXGBE_MDIO_PMD_GLOBAL_TX_DISABLE;
status = hw->phy.ops.write_reg(hw,
IXGBE_MDIO_PMD_STD_TX_DISABLE_CNTR,
IXGBE_MDIO_PMA_PMD_DEV_TYPE,
reg);
if (status)
return status;
/* Un-stall the PHY FW */
status = hw->phy.ops.read_reg(hw, status = hw->phy.ops.read_reg(hw,
IXGBE_MDIO_GLOBAL_RES_PR_10, IXGBE_MDIO_GLOBAL_RES_PR_10,
IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
...@@ -1575,6 +1541,10 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) ...@@ -1575,6 +1541,10 @@ static s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
IXGBE_MDIO_GLOBAL_RES_PR_10, IXGBE_MDIO_GLOBAL_RES_PR_10,
IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
reg); reg);
if (status)
return status;
}
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment