Skip to content

Commit

Permalink
e1000e: PHY loopback broken on 82578
Browse files Browse the repository at this point in the history
PHY loopback on 82578 fails to work as a result of flushing the packets
in the FIFO buffer in the link stall workaround.  Don't perform the
workaround if in PHY loopback mode.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bruce Allan authored and David S. Miller committed Jul 4, 2009
1 parent e5d57af commit e65fa87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/e1000e/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@
#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */
#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */

#define PHY_CONTROL_LB 0x4000 /* PHY Loopback bit */

/* NVM Control */
#define E1000_EECD_SK 0x00000001 /* NVM Clock */
#define E1000_EECD_CS 0x00000002 /* NVM Chip Select */
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/e1000e/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw)
if (hw->phy.type != e1000_phy_82578)
goto out;

/* Do not apply workaround if in PHY loopback bit 14 set */
hw->phy.ops.read_phy_reg(hw, PHY_CONTROL, &data);
if (data & PHY_CONTROL_LB)
goto out;

/* check if link is up and at 1Gbps */
ret_val = hw->phy.ops.read_phy_reg(hw, BM_CS_STATUS, &data);
if (ret_val)
Expand Down

0 comments on commit e65fa87

Please sign in to comment.