diff options
| author | David S. Miller <davem@davemloft.net> | 2012-07-17 02:18:47 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-07-17 02:19:26 -0400 |
| commit | 5dcaba7ed5be7fcedde7732111f31692e2e39ef9 (patch) | |
| tree | 8fd80363f3c4cb7d00e69043599060d0f597b3ab | |
| parent | 96f80d123eff05c3cd4701463786b87952a6c3ac (diff) | |
| parent | a52359b56c29f55aaadf1dab80a0e1043b982676 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net
Jeff Kirsher says:
====================
This series contains fixes to e1000e.
...
Bruce Allan (1):
e1000e: fix test for PHY being accessible on 82577/8/9 and I217
Tushar Dave (1):
e1000e: Correct link check logic for 82571 serdes
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 42 |
2 files changed, 35 insertions, 10 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 36db4df09aed..1f063dcd8f85 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
| @@ -1572,6 +1572,9 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) | |||
| 1572 | ctrl = er32(CTRL); | 1572 | ctrl = er32(CTRL); |
| 1573 | status = er32(STATUS); | 1573 | status = er32(STATUS); |
| 1574 | rxcw = er32(RXCW); | 1574 | rxcw = er32(RXCW); |
| 1575 | /* SYNCH bit and IV bit are sticky */ | ||
| 1576 | udelay(10); | ||
| 1577 | rxcw = er32(RXCW); | ||
| 1575 | 1578 | ||
| 1576 | if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { | 1579 | if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { |
| 1577 | 1580 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 238ab2f8a5e7..e3a7b07df629 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
| @@ -325,24 +325,46 @@ static inline void __ew32flash(struct e1000_hw *hw, unsigned long reg, u32 val) | |||
| 325 | **/ | 325 | **/ |
| 326 | static bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw) | 326 | static bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw) |
| 327 | { | 327 | { |
| 328 | u16 phy_reg; | 328 | u16 phy_reg = 0; |
| 329 | u32 phy_id; | 329 | u32 phy_id = 0; |
| 330 | s32 ret_val; | ||
| 331 | u16 retry_count; | ||
| 332 | |||
| 333 | for (retry_count = 0; retry_count < 2; retry_count++) { | ||
| 334 | ret_val = e1e_rphy_locked(hw, PHY_ID1, &phy_reg); | ||
| 335 | if (ret_val || (phy_reg == 0xFFFF)) | ||
| 336 | continue; | ||
| 337 | phy_id = (u32)(phy_reg << 16); | ||
| 330 | 338 | ||
| 331 | e1e_rphy_locked(hw, PHY_ID1, &phy_reg); | 339 | ret_val = e1e_rphy_locked(hw, PHY_ID2, &phy_reg); |
| 332 | phy_id = (u32)(phy_reg << 16); | 340 | if (ret_val || (phy_reg == 0xFFFF)) { |
| 333 | e1e_rphy_locked(hw, PHY_ID2, &phy_reg); | 341 | phy_id = 0; |
| 334 | phy_id |= (u32)(phy_reg & PHY_REVISION_MASK); | 342 | continue; |
| 343 | } | ||
| 344 | phy_id |= (u32)(phy_reg & PHY_REVISION_MASK); | ||
| 345 | break; | ||
| 346 | } | ||
| 335 | 347 | ||
| 336 | if (hw->phy.id) { | 348 | if (hw->phy.id) { |
| 337 | if (hw->phy.id == phy_id) | 349 | if (hw->phy.id == phy_id) |
| 338 | return true; | 350 | return true; |
| 339 | } else { | 351 | } else if (phy_id) { |
| 340 | if ((phy_id != 0) && (phy_id != PHY_REVISION_MASK)) | 352 | hw->phy.id = phy_id; |
| 341 | hw->phy.id = phy_id; | 353 | hw->phy.revision = (u32)(phy_reg & ~PHY_REVISION_MASK); |
| 342 | return true; | 354 | return true; |
| 343 | } | 355 | } |
| 344 | 356 | ||
| 345 | return false; | 357 | /* |
| 358 | * In case the PHY needs to be in mdio slow mode, | ||
| 359 | * set slow mode and try to get the PHY id again. | ||
| 360 | */ | ||
| 361 | hw->phy.ops.release(hw); | ||
| 362 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | ||
| 363 | if (!ret_val) | ||
| 364 | ret_val = e1000e_get_phy_id(hw); | ||
| 365 | hw->phy.ops.acquire(hw); | ||
| 366 | |||
| 367 | return !ret_val; | ||
| 346 | } | 368 | } |
| 347 | 369 | ||
| 348 | /** | 370 | /** |
