Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
This commit is contained in:
commit
48e316bc2e
11 changed files with 66 additions and 67 deletions
|
@ -820,7 +820,7 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
|
|||
e1000_initialize_hw_bits_80003es2lan(hw);
|
||||
|
||||
/* Initialize identification LED */
|
||||
ret_val = e1000e_id_led_init(hw);
|
||||
ret_val = mac->ops.id_led_init(hw);
|
||||
if (ret_val)
|
||||
e_dbg("Error initializing identification LED\n");
|
||||
/* This is not fatal and we should not stop init due to this */
|
||||
|
@ -838,7 +838,7 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
|
|||
E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
|
||||
|
||||
/* Setup link and flow control */
|
||||
ret_val = e1000e_setup_link(hw);
|
||||
ret_val = mac->ops.setup_link(hw);
|
||||
|
||||
/* Disable IBIST slave mode (far-end loopback) */
|
||||
e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
|
||||
|
@ -1056,7 +1056,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
|
|||
* firmware will have already initialized them. We only initialize
|
||||
* them if the HW is not in IAMT mode.
|
||||
*/
|
||||
if (!e1000e_check_mng_mode(hw)) {
|
||||
if (!hw->mac.ops.check_mng_mode(hw)) {
|
||||
/* Enable Electrical Idle on the PHY */
|
||||
data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE;
|
||||
ret_val = e1e_wphy(hw, GG82563_PHY_PWR_MGMT_CTRL, data);
|
||||
|
@ -1413,7 +1413,7 @@ static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw)
|
|||
|
||||
static const struct e1000_mac_operations es2_mac_ops = {
|
||||
.read_mac_addr = e1000_read_mac_addr_80003es2lan,
|
||||
.id_led_init = e1000e_id_led_init,
|
||||
.id_led_init = e1000e_id_led_init_generic,
|
||||
.blink_led = e1000e_blink_led_generic,
|
||||
.check_mng_mode = e1000e_check_mng_mode_generic,
|
||||
/* check_for_link dependent on media type */
|
||||
|
@ -1429,9 +1429,10 @@ static const struct e1000_mac_operations es2_mac_ops = {
|
|||
.clear_vfta = e1000_clear_vfta_generic,
|
||||
.reset_hw = e1000_reset_hw_80003es2lan,
|
||||
.init_hw = e1000_init_hw_80003es2lan,
|
||||
.setup_link = e1000e_setup_link,
|
||||
.setup_link = e1000e_setup_link_generic,
|
||||
/* setup_physical_interface dependent on media type */
|
||||
.setup_led = e1000e_setup_led_generic,
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
};
|
||||
|
||||
static const struct e1000_phy_operations es2_phy_ops = {
|
||||
|
@ -1456,6 +1457,7 @@ static const struct e1000_nvm_operations es2_nvm_ops = {
|
|||
.acquire = e1000_acquire_nvm_80003es2lan,
|
||||
.read = e1000e_read_nvm_eerd,
|
||||
.release = e1000_release_nvm_80003es2lan,
|
||||
.reload = e1000e_reload_nvm_generic,
|
||||
.update = e1000e_update_nvm_checksum_generic,
|
||||
.valid_led_default = e1000e_valid_led_default,
|
||||
.validate = e1000e_validate_nvm_checksum_generic,
|
||||
|
|
|
@ -1118,7 +1118,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
|
|||
e1000_initialize_hw_bits_82571(hw);
|
||||
|
||||
/* Initialize identification LED */
|
||||
ret_val = e1000e_id_led_init(hw);
|
||||
ret_val = mac->ops.id_led_init(hw);
|
||||
if (ret_val)
|
||||
e_dbg("Error initializing identification LED\n");
|
||||
/* This is not fatal and we should not stop init due to this */
|
||||
|
@ -1143,7 +1143,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
|
|||
E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
|
||||
|
||||
/* Setup link and flow control */
|
||||
ret_val = e1000_setup_link_82571(hw);
|
||||
ret_val = mac->ops.setup_link(hw);
|
||||
|
||||
/* Set the transmit descriptor write-back policy */
|
||||
reg_data = er32(TXDCTL(0));
|
||||
|
@ -1455,7 +1455,7 @@ static s32 e1000_setup_link_82571(struct e1000_hw *hw)
|
|||
break;
|
||||
}
|
||||
|
||||
return e1000e_setup_link(hw);
|
||||
return e1000e_setup_link_generic(hw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1911,7 +1911,7 @@ static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
|
|||
static const struct e1000_mac_operations e82571_mac_ops = {
|
||||
/* .check_mng_mode: mac type dependent */
|
||||
/* .check_for_link: media type dependent */
|
||||
.id_led_init = e1000e_id_led_init,
|
||||
.id_led_init = e1000e_id_led_init_generic,
|
||||
.cleanup_led = e1000e_cleanup_led_generic,
|
||||
.clear_hw_cntrs = e1000_clear_hw_cntrs_82571,
|
||||
.get_bus_info = e1000e_get_bus_info_pcie,
|
||||
|
@ -1927,6 +1927,7 @@ static const struct e1000_mac_operations e82571_mac_ops = {
|
|||
.setup_link = e1000_setup_link_82571,
|
||||
/* .setup_physical_interface: media type dependent */
|
||||
.setup_led = e1000e_setup_led_generic,
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
.read_mac_addr = e1000_read_mac_addr_82571,
|
||||
};
|
||||
|
||||
|
@ -1988,6 +1989,7 @@ static const struct e1000_nvm_operations e82571_nvm_ops = {
|
|||
.acquire = e1000_acquire_nvm_82571,
|
||||
.read = e1000e_read_nvm_eerd,
|
||||
.release = e1000_release_nvm_82571,
|
||||
.reload = e1000e_reload_nvm_generic,
|
||||
.update = e1000_update_nvm_checksum_82571,
|
||||
.valid_led_default = e1000_valid_led_default_82571,
|
||||
.validate = e1000_validate_nvm_checksum_82571,
|
||||
|
|
|
@ -559,12 +559,12 @@ extern s32 e1000e_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, u
|
|||
extern s32 e1000e_get_speed_and_duplex_fiber_serdes(struct e1000_hw *hw, u16 *speed, u16 *duplex);
|
||||
extern s32 e1000e_disable_pcie_master(struct e1000_hw *hw);
|
||||
extern s32 e1000e_get_auto_rd_done(struct e1000_hw *hw);
|
||||
extern s32 e1000e_id_led_init(struct e1000_hw *hw);
|
||||
extern s32 e1000e_id_led_init_generic(struct e1000_hw *hw);
|
||||
extern void e1000e_clear_hw_cntrs_base(struct e1000_hw *hw);
|
||||
extern s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw);
|
||||
extern s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw);
|
||||
extern s32 e1000e_copper_link_setup_igp(struct e1000_hw *hw);
|
||||
extern s32 e1000e_setup_link(struct e1000_hw *hw);
|
||||
extern s32 e1000e_setup_link_generic(struct e1000_hw *hw);
|
||||
extern void e1000_clear_vfta_generic(struct e1000_hw *hw);
|
||||
extern void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);
|
||||
extern void e1000e_update_mc_addr_list_generic(struct e1000_hw *hw,
|
||||
|
@ -575,7 +575,7 @@ extern s32 e1000e_set_fc_watermarks(struct e1000_hw *hw);
|
|||
extern void e1000e_set_pcie_no_snoop(struct e1000_hw *hw, u32 no_snoop);
|
||||
extern s32 e1000e_get_hw_semaphore(struct e1000_hw *hw);
|
||||
extern s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data);
|
||||
extern void e1000e_config_collision_dist(struct e1000_hw *hw);
|
||||
extern void e1000e_config_collision_dist_generic(struct e1000_hw *hw);
|
||||
extern s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw);
|
||||
extern s32 e1000e_force_mac_fc(struct e1000_hw *hw);
|
||||
extern s32 e1000e_blink_led_generic(struct e1000_hw *hw);
|
||||
|
@ -662,11 +662,6 @@ static inline s32 e1000_phy_hw_reset(struct e1000_hw *hw)
|
|||
return hw->phy.ops.reset(hw);
|
||||
}
|
||||
|
||||
static inline s32 e1000_check_reset_block(struct e1000_hw *hw)
|
||||
{
|
||||
return hw->phy.ops.check_reset_block(hw);
|
||||
}
|
||||
|
||||
static inline s32 e1e_rphy(struct e1000_hw *hw, u32 offset, u16 *data)
|
||||
{
|
||||
return hw->phy.ops.read_reg(hw, offset, data);
|
||||
|
@ -689,7 +684,7 @@ extern s32 e1000e_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg);
|
|||
extern s32 e1000e_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
|
||||
extern s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw);
|
||||
extern void e1000e_release_nvm(struct e1000_hw *hw);
|
||||
extern void e1000e_reload_nvm(struct e1000_hw *hw);
|
||||
extern void e1000e_reload_nvm_generic(struct e1000_hw *hw);
|
||||
extern s32 e1000_read_mac_addr_generic(struct e1000_hw *hw);
|
||||
|
||||
static inline s32 e1000e_read_mac_addr(struct e1000_hw *hw)
|
||||
|
@ -725,11 +720,6 @@ static inline s32 e1000_get_phy_info(struct e1000_hw *hw)
|
|||
return hw->phy.ops.get_info(hw);
|
||||
}
|
||||
|
||||
static inline s32 e1000e_check_mng_mode(struct e1000_hw *hw)
|
||||
{
|
||||
return hw->mac.ops.check_mng_mode(hw);
|
||||
}
|
||||
|
||||
extern bool e1000e_check_mng_mode_generic(struct e1000_hw *hw);
|
||||
extern bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw);
|
||||
extern s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length);
|
||||
|
|
|
@ -258,7 +258,7 @@ static int e1000_set_settings(struct net_device *netdev,
|
|||
* When SoL/IDER sessions are active, autoneg/speed/duplex
|
||||
* cannot be changed
|
||||
*/
|
||||
if (e1000_check_reset_block(hw)) {
|
||||
if (hw->phy.ops.check_reset_block(hw)) {
|
||||
e_err("Cannot change link characteristics when SoL/IDER is "
|
||||
"active.\n");
|
||||
return -EINVAL;
|
||||
|
@ -1598,11 +1598,13 @@ static int e1000_run_loopback_test(struct e1000_adapter *adapter)
|
|||
|
||||
static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data)
|
||||
{
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
|
||||
/*
|
||||
* PHY loopback cannot be performed if SoL/IDER
|
||||
* sessions are active
|
||||
*/
|
||||
if (e1000_check_reset_block(&adapter->hw)) {
|
||||
if (hw->phy.ops.check_reset_block(hw)) {
|
||||
e_err("Cannot do PHY loopback test when SoL/IDER is active.\n");
|
||||
*data = 0;
|
||||
goto out;
|
||||
|
|
|
@ -781,6 +781,7 @@ struct e1000_mac_operations {
|
|||
s32 (*setup_physical_interface)(struct e1000_hw *);
|
||||
s32 (*setup_led)(struct e1000_hw *);
|
||||
void (*write_vfta)(struct e1000_hw *, u32, u32);
|
||||
void (*config_collision_dist)(struct e1000_hw *);
|
||||
s32 (*read_mac_addr)(struct e1000_hw *);
|
||||
};
|
||||
|
||||
|
@ -829,6 +830,7 @@ struct e1000_nvm_operations {
|
|||
s32 (*acquire)(struct e1000_hw *);
|
||||
s32 (*read)(struct e1000_hw *, u16, u16, u16 *);
|
||||
void (*release)(struct e1000_hw *);
|
||||
void (*reload)(struct e1000_hw *);
|
||||
s32 (*update)(struct e1000_hw *);
|
||||
s32 (*valid_led_default)(struct e1000_hw *, u16 *);
|
||||
s32 (*validate)(struct e1000_hw *);
|
||||
|
|
|
@ -324,7 +324,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
|
|||
phy->ops.power_down = e1000_power_down_phy_copper_ich8lan;
|
||||
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
|
||||
|
||||
if (!e1000_check_reset_block(hw)) {
|
||||
if (!hw->phy.ops.check_reset_block(hw)) {
|
||||
u32 fwsm = er32(FWSM);
|
||||
|
||||
/*
|
||||
|
@ -580,7 +580,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
|
|||
/* check management mode */
|
||||
mac->ops.check_mng_mode = e1000_check_mng_mode_ich8lan;
|
||||
/* ID LED init */
|
||||
mac->ops.id_led_init = e1000e_id_led_init;
|
||||
mac->ops.id_led_init = e1000e_id_led_init_generic;
|
||||
/* blink LED */
|
||||
mac->ops.blink_led = e1000e_blink_led_generic;
|
||||
/* setup LED */
|
||||
|
@ -746,7 +746,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
|
|||
* of MAC speed/duplex configuration. So we only need to
|
||||
* configure Collision Distance in the MAC.
|
||||
*/
|
||||
e1000e_config_collision_dist(hw);
|
||||
mac->ops.config_collision_dist(hw);
|
||||
|
||||
/*
|
||||
* Configure Flow Control now that Auto-Neg has completed.
|
||||
|
@ -1314,7 +1314,7 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
|
|||
oem_reg |= HV_OEM_BITS_LPLU;
|
||||
|
||||
/* Set Restart auto-neg to activate the bits */
|
||||
if (!e1000_check_reset_block(hw))
|
||||
if (!hw->phy.ops.check_reset_block(hw))
|
||||
oem_reg |= HV_OEM_BITS_RESTART_AN;
|
||||
} else {
|
||||
if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE |
|
||||
|
@ -1788,7 +1788,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
|
|||
s32 ret_val = 0;
|
||||
u16 reg;
|
||||
|
||||
if (e1000_check_reset_block(hw))
|
||||
if (hw->phy.ops.check_reset_block(hw))
|
||||
return 0;
|
||||
|
||||
/* Allow time for h/w to get to quiescent state after reset */
|
||||
|
@ -1897,7 +1897,7 @@ static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active)
|
|||
else
|
||||
oem_reg &= ~HV_OEM_BITS_LPLU;
|
||||
|
||||
if (!e1000_check_reset_block(hw))
|
||||
if (!hw->phy.ops.check_reset_block(hw))
|
||||
oem_reg |= HV_OEM_BITS_RESTART_AN;
|
||||
|
||||
return e1e_wphy(hw, HV_OEM_BITS, oem_reg);
|
||||
|
@ -2609,7 +2609,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
|
|||
* until after the next adapter reset.
|
||||
*/
|
||||
if (!ret_val) {
|
||||
e1000e_reload_nvm(hw);
|
||||
nvm->ops.reload(hw);
|
||||
usleep_range(10000, 20000);
|
||||
}
|
||||
|
||||
|
@ -2962,7 +2962,7 @@ static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data)
|
|||
*
|
||||
* PCH also does not have an "always on" or "always off" mode which
|
||||
* complicates the ID feature. Instead of using the "on" mode to indicate
|
||||
* in ledctl_mode2 the LEDs to use for ID (see e1000e_id_led_init()),
|
||||
* in ledctl_mode2 the LEDs to use for ID (see e1000e_id_led_init_generic()),
|
||||
* use "link_up" mode. The LEDs will still ID on request if there is no
|
||||
* link based on logic in e1000_led_[on|off]_pchlan().
|
||||
**/
|
||||
|
@ -3109,7 +3109,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
|
|||
|
||||
ctrl = er32(CTRL);
|
||||
|
||||
if (!e1000_check_reset_block(hw)) {
|
||||
if (!hw->phy.ops.check_reset_block(hw)) {
|
||||
/*
|
||||
* Full-chip reset requires MAC and PHY reset at the same
|
||||
* time to make sure the interface between MAC and the
|
||||
|
@ -3212,7 +3212,7 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/* Setup link and flow control */
|
||||
ret_val = e1000_setup_link_ich8lan(hw);
|
||||
ret_val = mac->ops.setup_link(hw);
|
||||
|
||||
/* Set the transmit descriptor write-back policy for both queues */
|
||||
txdctl = er32(TXDCTL(0));
|
||||
|
@ -3327,7 +3327,7 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw)
|
|||
{
|
||||
s32 ret_val;
|
||||
|
||||
if (e1000_check_reset_block(hw))
|
||||
if (hw->phy.ops.check_reset_block(hw))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
@ -3353,7 +3353,7 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw)
|
|||
hw->fc.current_mode);
|
||||
|
||||
/* Continue to configure the copper link. */
|
||||
ret_val = e1000_setup_copper_link_ich8lan(hw);
|
||||
ret_val = hw->mac.ops.setup_physical_interface(hw);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
|
@ -3555,7 +3555,7 @@ static s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000_set_kmrn_lock_loss_workaround_ich8lan - Set Kumeran workaround state
|
||||
* e1000e_set_kmrn_lock_loss_workaround_ich8lan - Set Kumeran workaround state
|
||||
* @hw: pointer to the HW structure
|
||||
* @state: boolean value used to set the current Kumeran workaround state
|
||||
*
|
||||
|
@ -3707,7 +3707,8 @@ void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
|
|||
u16 phy_id1, phy_id2;
|
||||
s32 ret_val;
|
||||
|
||||
if ((hw->mac.type != e1000_pch2lan) || e1000_check_reset_block(hw))
|
||||
if ((hw->mac.type != e1000_pch2lan) ||
|
||||
hw->phy.ops.check_reset_block(hw))
|
||||
return;
|
||||
|
||||
ret_val = hw->phy.ops.acquire(hw);
|
||||
|
@ -4006,7 +4007,6 @@ static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
static const struct e1000_mac_operations ich8_mac_ops = {
|
||||
.id_led_init = e1000e_id_led_init,
|
||||
/* check_mng_mode dependent on mac type */
|
||||
.check_for_link = e1000_check_for_copper_link_ich8lan,
|
||||
/* cleanup_led dependent on mac type */
|
||||
|
@ -4022,6 +4022,7 @@ static const struct e1000_mac_operations ich8_mac_ops = {
|
|||
.setup_link = e1000_setup_link_ich8lan,
|
||||
.setup_physical_interface= e1000_setup_copper_link_ich8lan,
|
||||
/* id_led_init dependent on mac type */
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
};
|
||||
|
||||
static const struct e1000_phy_operations ich8_phy_ops = {
|
||||
|
@ -4042,6 +4043,7 @@ static const struct e1000_nvm_operations ich8_nvm_ops = {
|
|||
.acquire = e1000_acquire_nvm_ich8lan,
|
||||
.read = e1000_read_nvm_ich8lan,
|
||||
.release = e1000_release_nvm_ich8lan,
|
||||
.reload = e1000e_reload_nvm_generic,
|
||||
.update = e1000_update_nvm_checksum_ich8lan,
|
||||
.valid_led_default = e1000_valid_led_default_ich8lan,
|
||||
.validate = e1000_validate_nvm_checksum_ich8lan,
|
||||
|
|
|
@ -263,8 +263,7 @@ void e1000e_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
|
|||
* @mc_addr: pointer to a multicast address
|
||||
*
|
||||
* Generates a multicast address hash value which is used to determine
|
||||
* the multicast filter table array address and new table value. See
|
||||
* e1000_mta_set_generic()
|
||||
* the multicast filter table array address and new table value.
|
||||
**/
|
||||
static u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
|
||||
{
|
||||
|
@ -465,7 +464,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
|
|||
* of MAC speed/duplex configuration. So we only need to
|
||||
* configure Collision Distance in the MAC.
|
||||
*/
|
||||
e1000e_config_collision_dist(hw);
|
||||
mac->ops.config_collision_dist(hw);
|
||||
|
||||
/*
|
||||
* Configure Flow Control now that Auto-Neg has completed.
|
||||
|
@ -693,7 +692,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000e_setup_link - Setup flow control and link settings
|
||||
* e1000e_setup_link_generic - Setup flow control and link settings
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
* Determines which flow control settings to use, then configures flow
|
||||
|
@ -702,16 +701,15 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
|
|||
* should be established. Assumes the hardware has previously been reset
|
||||
* and the transmitter and receiver are not enabled.
|
||||
**/
|
||||
s32 e1000e_setup_link(struct e1000_hw *hw)
|
||||
s32 e1000e_setup_link_generic(struct e1000_hw *hw)
|
||||
{
|
||||
struct e1000_mac_info *mac = &hw->mac;
|
||||
s32 ret_val;
|
||||
|
||||
/*
|
||||
* In the case of the phy reset being blocked, we already have a link.
|
||||
* We do not need to set it up again.
|
||||
*/
|
||||
if (e1000_check_reset_block(hw))
|
||||
if (hw->phy.ops.check_reset_block(hw))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
@ -733,7 +731,7 @@ s32 e1000e_setup_link(struct e1000_hw *hw)
|
|||
e_dbg("After fix-ups FlowControl is now = %x\n", hw->fc.current_mode);
|
||||
|
||||
/* Call the necessary media_type subroutine to configure the link. */
|
||||
ret_val = mac->ops.setup_physical_interface(hw);
|
||||
ret_val = hw->mac.ops.setup_physical_interface(hw);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
|
@ -890,7 +888,7 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw)
|
|||
/* Take the link out of reset */
|
||||
ctrl &= ~E1000_CTRL_LRST;
|
||||
|
||||
e1000e_config_collision_dist(hw);
|
||||
hw->mac.ops.config_collision_dist(hw);
|
||||
|
||||
ret_val = e1000_commit_fc_settings_generic(hw);
|
||||
if (ret_val)
|
||||
|
@ -925,14 +923,13 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000e_config_collision_dist - Configure collision distance
|
||||
* e1000e_config_collision_dist_generic - Configure collision distance
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
* Configures the collision distance to the default value and is used
|
||||
* during link setup. Currently no func pointer exists and all
|
||||
* implementations are handled in the generic version of this function.
|
||||
* during link setup.
|
||||
**/
|
||||
void e1000e_config_collision_dist(struct e1000_hw *hw)
|
||||
void e1000e_config_collision_dist_generic(struct e1000_hw *hw)
|
||||
{
|
||||
u32 tctl;
|
||||
|
||||
|
@ -971,7 +968,9 @@ s32 e1000e_set_fc_watermarks(struct e1000_hw *hw)
|
|||
* XON frames.
|
||||
*/
|
||||
fcrtl = hw->fc.low_water;
|
||||
fcrtl |= E1000_FCRTL_XONE;
|
||||
if (hw->fc.send_xon)
|
||||
fcrtl |= E1000_FCRTL_XONE;
|
||||
|
||||
fcrth = hw->fc.high_water;
|
||||
}
|
||||
ew32(FCRTL, fcrtl);
|
||||
|
@ -1399,11 +1398,11 @@ s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000e_id_led_init -
|
||||
* e1000e_id_led_init_generic -
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
**/
|
||||
s32 e1000e_id_led_init(struct e1000_hw *hw)
|
||||
s32 e1000e_id_led_init_generic(struct e1000_hw *hw)
|
||||
{
|
||||
struct e1000_mac_info *mac = &hw->mac;
|
||||
s32 ret_val;
|
||||
|
|
|
@ -106,7 +106,7 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000e_check_mng_mode_generic - check management mode
|
||||
* e1000e_check_mng_mode_generic - Generic check management mode
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
* Reads the firmware semaphore register and returns true (>0) if
|
||||
|
@ -138,7 +138,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
|
|||
hw->mac.tx_pkt_filtering = true;
|
||||
|
||||
/* No manageability, no filtering */
|
||||
if (!e1000e_check_mng_mode(hw)) {
|
||||
if (!hw->mac.ops.check_mng_mode(hw)) {
|
||||
hw->mac.tx_pkt_filtering = false;
|
||||
return hw->mac.tx_pkt_filtering;
|
||||
}
|
||||
|
|
|
@ -2855,7 +2855,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
|
|||
/* enable Report Status bit */
|
||||
adapter->txd_cmd |= E1000_TXD_CMD_RS;
|
||||
|
||||
e1000e_config_collision_dist(hw);
|
||||
hw->mac.ops.config_collision_dist(hw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3464,7 +3464,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
|
|||
fc->pause_time = 0xFFFF;
|
||||
else
|
||||
fc->pause_time = E1000_FC_PAUSE_TIME;
|
||||
fc->send_xon = 1;
|
||||
fc->send_xon = true;
|
||||
fc->current_mode = fc->requested_mode;
|
||||
|
||||
switch (hw->mac.type) {
|
||||
|
@ -6236,7 +6236,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
|||
adapter->hw.phy.ms_type = e1000_ms_hw_default;
|
||||
}
|
||||
|
||||
if (e1000_check_reset_block(&adapter->hw))
|
||||
if (hw->phy.ops.check_reset_block(hw))
|
||||
e_info("PHY reset is blocked due to SOL/IDER session.\n");
|
||||
|
||||
/* Set initial default active device features */
|
||||
|
@ -6403,7 +6403,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
|||
if (!(adapter->flags & FLAG_HAS_AMT))
|
||||
e1000e_release_hw_control(adapter);
|
||||
err_eeprom:
|
||||
if (!e1000_check_reset_block(&adapter->hw))
|
||||
if (!hw->phy.ops.check_reset_block(hw))
|
||||
e1000_phy_hw_reset(&adapter->hw);
|
||||
err_hw_init:
|
||||
kfree(adapter->tx_ring);
|
||||
|
|
|
@ -625,13 +625,13 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
|
|||
}
|
||||
|
||||
/**
|
||||
* e1000e_reload_nvm - Reloads EEPROM
|
||||
* e1000e_reload_nvm_generic - Reloads EEPROM
|
||||
* @hw: pointer to the HW structure
|
||||
*
|
||||
* Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the
|
||||
* extended control register.
|
||||
**/
|
||||
void e1000e_reload_nvm(struct e1000_hw *hw)
|
||||
void e1000e_reload_nvm_generic(struct e1000_hw *hw)
|
||||
{
|
||||
u32 ctrl_ext;
|
||||
|
||||
|
|
|
@ -1181,7 +1181,7 @@ s32 e1000e_setup_copper_link(struct e1000_hw *hw)
|
|||
|
||||
if (link) {
|
||||
e_dbg("Valid link established!!!\n");
|
||||
e1000e_config_collision_dist(hw);
|
||||
hw->mac.ops.config_collision_dist(hw);
|
||||
ret_val = e1000e_config_fc_after_link_up(hw);
|
||||
} else {
|
||||
e_dbg("Unable to establish link!!!\n");
|
||||
|
@ -1489,7 +1489,7 @@ void e1000e_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl)
|
|||
e_dbg("Forcing 10mb\n");
|
||||
}
|
||||
|
||||
e1000e_config_collision_dist(hw);
|
||||
hw->mac.ops.config_collision_dist(hw);
|
||||
|
||||
ew32(CTRL, ctrl);
|
||||
}
|
||||
|
@ -2133,7 +2133,7 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
|
|||
s32 ret_val;
|
||||
u32 ctrl;
|
||||
|
||||
ret_val = e1000_check_reset_block(hw);
|
||||
ret_val = phy->ops.check_reset_block(hw);
|
||||
if (ret_val)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue