Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351705
b: refs/heads/master
c: 6b598e1
h: refs/heads/master
i:
  351703: 3eb006c
v: v3
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Jan 28, 2013
1 parent b04b0a7 commit aa0dd54
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dde3a5745cd27167653feb2e7e9fa0e3631e91ce
refs/heads/master: 6b598e1eac68b07ebb831258e0667f5ba2834822
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/intel/e1000e/80003es2lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
return ret_val;

/* SW Reset the PHY so all changes take effect */
ret_val = e1000e_commit_phy(hw);
ret_val = hw->phy.ops.commit(hw);
if (ret_val) {
e_dbg("Error Resetting the PHY\n");
return ret_val;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/ethernet/intel/e1000e/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,6 @@ extern const struct e1000_info e1000_es2_info;
extern s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
u32 pba_num_size);

extern s32 e1000e_commit_phy(struct e1000_hw *hw);

extern bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw);

extern bool e1000e_get_laa_state_82571(struct e1000_hw *hw);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/ethernet/intel/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
phy_reg |= 0x006;
e1e_wphy(hw, PHY_REG(2, 21), phy_reg);
/* Assert SW reset for above settings to take effect */
e1000e_commit_phy(hw);
hw->phy.ops.commit(hw);
mdelay(1);
/* Force Full Duplex */
e1e_rphy(hw, PHY_REG(769, 16), &phy_reg);
Expand Down Expand Up @@ -1542,7 +1542,8 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter)
if (phy_reg & MII_CR_LOOPBACK) {
phy_reg &= ~MII_CR_LOOPBACK;
e1e_wphy(hw, PHY_CONTROL, phy_reg);
e1000e_commit_phy(hw);
if (hw->phy.ops.commit)
hw->phy.ops.commit(hw);
}
break;
}
Expand Down
35 changes: 12 additions & 23 deletions trunk/drivers/net/ethernet/intel/e1000e/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw)
if (ret_val)
return ret_val;
/* Commit the changes. */
ret_val = e1000e_commit_phy(hw);
ret_val = phy->ops.commit(hw);
if (ret_val) {
e_dbg("Error committing the PHY changes\n");
return ret_val;
Expand Down Expand Up @@ -844,10 +844,12 @@ s32 e1000e_copper_link_setup_m88(struct e1000_hw *hw)
}

/* Commit the changes. */
ret_val = e1000e_commit_phy(hw);
if (ret_val) {
e_dbg("Error committing the PHY changes\n");
return ret_val;
if (phy->ops.commit) {
ret_val = phy->ops.commit(hw);
if (ret_val) {
e_dbg("Error committing the PHY changes\n");
return ret_val;
}
}

if (phy->type == e1000_phy_82578) {
Expand Down Expand Up @@ -1324,9 +1326,11 @@ s32 e1000e_phy_force_speed_duplex_m88(struct e1000_hw *hw)
return ret_val;

/* Reset the phy to commit changes. */
ret_val = e1000e_commit_phy(hw);
if (ret_val)
return ret_val;
if (hw->phy.ops.commit) {
ret_val = hw->phy.ops.commit(hw);
if (ret_val)
return ret_val;
}

if (phy->autoneg_wait_to_complete) {
e_dbg("Waiting for forced speed/duplex link on M88 phy.\n");
Expand Down Expand Up @@ -2771,21 +2775,6 @@ void e1000_power_down_phy_copper(struct e1000_hw *hw)
usleep_range(1000, 2000);
}

/**
* e1000e_commit_phy - Soft PHY reset
* @hw: pointer to the HW structure
*
* Performs a soft PHY reset on those that apply. This is a function pointer
* entry point called by drivers.
**/
s32 e1000e_commit_phy(struct e1000_hw *hw)
{
if (hw->phy.ops.commit)
return hw->phy.ops.commit(hw);

return 0;
}

/**
* __e1000_read_phy_reg_hv - Read HV PHY register
* @hw: pointer to the HW structure
Expand Down

0 comments on commit aa0dd54

Please sign in to comment.