Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_ich8lan.c
Show First 20 Lines • Show All 1,490 Lines • ▼ Show 20 Lines | if (ret_val) | ||||
goto release; | goto release; | ||||
phy_reg |= HV_PM_CTRL_K1_ENABLE; | phy_reg |= HV_PM_CTRL_K1_ENABLE; | ||||
e1000_write_phy_reg_hv_locked(hw, HV_PM_CTRL, phy_reg); | e1000_write_phy_reg_hv_locked(hw, HV_PM_CTRL, phy_reg); | ||||
/* Clear ULP enabled configuration */ | /* Clear ULP enabled configuration */ | ||||
ret_val = e1000_read_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, &phy_reg); | ret_val = e1000_read_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, &phy_reg); | ||||
if (ret_val) | if (ret_val) | ||||
goto release; | goto release; | ||||
phy_reg &= ~(I218_ULP_CONFIG1_IND | | phy_reg &= ~(I218_ULP_CONFIG1_IND | | ||||
I218_ULP_CONFIG1_STICKY_ULP | | I218_ULP_CONFIG1_STICKY_ULP | | ||||
I218_ULP_CONFIG1_RESET_TO_SMBUS | | I218_ULP_CONFIG1_RESET_TO_SMBUS | | ||||
I218_ULP_CONFIG1_WOL_HOST | | I218_ULP_CONFIG1_WOL_HOST | | ||||
I218_ULP_CONFIG1_INBAND_EXIT | | I218_ULP_CONFIG1_INBAND_EXIT | | ||||
I218_ULP_CONFIG1_EN_ULP_LANPHYPC | | I218_ULP_CONFIG1_EN_ULP_LANPHYPC | | ||||
I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST | | I218_ULP_CONFIG1_DIS_CLR_STICKY_ON_PERST | | ||||
I218_ULP_CONFIG1_DISABLE_SMB_PERST); | I218_ULP_CONFIG1_DISABLE_SMB_PERST); | ||||
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); | e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); | ||||
/* Commit ULP changes by starting auto ULP configuration */ | /* Commit ULP changes by starting auto ULP configuration */ | ||||
phy_reg |= I218_ULP_CONFIG1_START; | phy_reg |= I218_ULP_CONFIG1_START; | ||||
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); | e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg); | ||||
/* Clear Disable SMBus Release on PERST# in MAC */ | /* Clear Disable SMBus Release on PERST# in MAC */ | ||||
mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM7); | mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM7); | ||||
mac_reg &= ~E1000_FEXTNVM7_DISABLE_SMB_PERST; | mac_reg &= ~E1000_FEXTNVM7_DISABLE_SMB_PERST; | ||||
E1000_WRITE_REG(hw, E1000_FEXTNVM7, mac_reg); | E1000_WRITE_REG(hw, E1000_FEXTNVM7, mac_reg); | ||||
release: | release: | ||||
hw->phy.ops.release(hw); | hw->phy.ops.release(hw); | ||||
if (force) { | if (force) { | ||||
hw->phy.ops.reset(hw); | hw->phy.ops.reset(hw); | ||||
msec_delay(50); | msec_delay(50); | ||||
} | } | ||||
out: | out: | ||||
Show All 26 Lines | static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) | ||||
/* We only want to go out to the PHY registers to see if Auto-Neg | /* We only want to go out to the PHY registers to see if Auto-Neg | ||||
* has completed and/or if our link status has changed. The | * has completed and/or if our link status has changed. The | ||||
* get_link_status flag is set upon receiving a Link Status | * get_link_status flag is set upon receiving a Link Status | ||||
* Change or Rx Sequence Error interrupt. | * Change or Rx Sequence Error interrupt. | ||||
*/ | */ | ||||
if (!mac->get_link_status) | if (!mac->get_link_status) | ||||
return E1000_SUCCESS; | return E1000_SUCCESS; | ||||
/* First we want to see if the MII Status Register reports | /* First we want to see if the MII Status Register reports | ||||
* link. If so, then we want to get the current speed/duplex | * link. If so, then we want to get the current speed/duplex | ||||
* of the PHY. | * of the PHY. | ||||
*/ | */ | ||||
ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); | ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); | ||||
if (ret_val) | if (ret_val) | ||||
return ret_val; | return ret_val; | ||||
if (hw->mac.type == e1000_pchlan) { | if (hw->mac.type == e1000_pchlan) { | ||||
ret_val = e1000_k1_gig_workaround_hv(hw, link); | ret_val = e1000_k1_gig_workaround_hv(hw, link); | ||||
if (ret_val) | if (ret_val) | ||||
return ret_val; | return ret_val; | ||||
} | } | ||||
/* When connected at 10Mbps half-duplex, some parts are excessively | /* When connected at 10Mbps half-duplex, some parts are excessively | ||||
▲ Show 20 Lines • Show All 4,537 Lines • Show Last 20 Lines |