Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/igc/igc_phy.c
Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Lines | static s32 igc_phy_setup_autoneg(struct igc_hw *hw) | ||||
if (phy->autoneg_mask & ADVERTISE_1000_FULL) { | if (phy->autoneg_mask & ADVERTISE_1000_FULL) { | ||||
/* Read the MII 1000Base-T Control Register (Address 9). */ | /* Read the MII 1000Base-T Control Register (Address 9). */ | ||||
ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, | ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, | ||||
&mii_1000t_ctrl_reg); | &mii_1000t_ctrl_reg); | ||||
if (ret_val) | if (ret_val) | ||||
return ret_val; | return ret_val; | ||||
} | } | ||||
if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && | if (phy->autoneg_mask & ADVERTISE_2500_FULL) { | ||||
hw->phy.id == I225_I_PHY_ID) { | |||||
/* Read the MULTI GBT AN Control Register - reg 7.32 */ | /* Read the MULTI GBT AN Control Register - reg 7.32 */ | ||||
ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << | ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << | ||||
MMD_DEVADDR_SHIFT) | | MMD_DEVADDR_SHIFT) | | ||||
ANEG_MULTIGBT_AN_CTRL, | ANEG_MULTIGBT_AN_CTRL, | ||||
&aneg_multigbt_an_ctrl); | &aneg_multigbt_an_ctrl); | ||||
if (ret_val) | if (ret_val) | ||||
return ret_val; | return ret_val; | ||||
▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | if (ret_val) | ||||
return ret_val; | return ret_val; | ||||
DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); | DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); | ||||
if (phy->autoneg_mask & ADVERTISE_1000_FULL) | if (phy->autoneg_mask & ADVERTISE_1000_FULL) | ||||
ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, | ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, | ||||
mii_1000t_ctrl_reg); | mii_1000t_ctrl_reg); | ||||
if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && | if (phy->autoneg_mask & ADVERTISE_2500_FULL) | ||||
hw->phy.id == I225_I_PHY_ID) | |||||
ret_val = phy->ops.write_reg(hw, | ret_val = phy->ops.write_reg(hw, | ||||
(STANDARD_AN_REG_MASK << | (STANDARD_AN_REG_MASK << | ||||
MMD_DEVADDR_SHIFT) | | MMD_DEVADDR_SHIFT) | | ||||
ANEG_MULTIGBT_AN_CTRL, | ANEG_MULTIGBT_AN_CTRL, | ||||
aneg_multigbt_an_ctrl); | aneg_multigbt_an_ctrl); | ||||
return ret_val; | return ret_val; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 613 Lines • Show Last 20 Lines |