Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225013
b: refs/heads/master
c: 664dc87
h: refs/heads/master
i:
  225011: dce5ca3
v: v3
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Dec 11, 2010
1 parent 4879b69 commit 633d02f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 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: ce54afd16d874ac07378a8bb55d26f7f5b613c0e
refs/heads/master: 664dc878ed6f0476b875547547a49e06f7a4e73b
16 changes: 11 additions & 5 deletions trunk/drivers/net/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,17 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
}

phy->id = e1000_phy_unknown;
ret_val = e1000e_get_phy_id(hw);
if (ret_val)
goto out;
if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) {
switch (hw->mac.type) {
default:
ret_val = e1000e_get_phy_id(hw);
if (ret_val)
goto out;
if ((phy->id != 0) && (phy->id != PHY_REVISION_MASK))
break;
/* fall-through */
case e1000_pch2lan:
/*
* In case the PHY needs to be in mdio slow mode (eg. 82577),
* In case the PHY needs to be in mdio slow mode,
* set slow mode and try to get the PHY id again.
*/
ret_val = e1000_set_mdio_slow_mode_hv(hw);
Expand All @@ -352,6 +357,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
ret_val = e1000e_get_phy_id(hw);
if (ret_val)
goto out;
break;
}
phy->type = e1000e_get_phy_type_from_id(phy->id);

Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/e1000e/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
}
*data = (u16) mdic;

/*
* Allow some time after each MDIC transaction to avoid
* reading duplicate data in the next MDIC transaction.
*/
if (hw->mac.type == e1000_pch2lan)
udelay(100);

return 0;
}

Expand Down Expand Up @@ -279,6 +286,13 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
return -E1000_ERR_PHY;
}

/*
* Allow some time after each MDIC transaction to avoid
* reading duplicate data in the next MDIC transaction.
*/
if (hw->mac.type == e1000_pch2lan)
udelay(100);

return 0;
}

Expand Down

0 comments on commit 633d02f

Please sign in to comment.