diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-05-10 11:01:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 02:31:12 -0400 |
commit | eab50ffb222808b5053a82325be3e5d26faa08df (patch) | |
tree | 6b9b398d4631c96783af1805b01491726ae00df4 /drivers/net/e1000e | |
parent | 8b802a7e94c2ed9c6032a88b3ab9860c55cd6378 (diff) |
e1000e: Incorrect function pointer set for force_speed_duplex on 82577
The force_speed_duplex function pointer was incorrectly set. Instead of
calling the 82577-specific version it was calling the m88 version which,
among other incorrect things, reset the PHY causing autonegotiation to be
re-enabled in the PHY resulting in the link defaulting to half-duplex.
The 82577-specific force_speed_duplex function also had an issue where
it disabled Auto-MDI-X which caused the link to not come up.
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>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 1 | ||||
-rw-r--r-- | drivers/net/e1000e/phy.c | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 61f89275d7c3..e1f244a47807 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -330,6 +330,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
330 | phy->ops.get_cable_length = e1000_get_cable_length_82577; | 330 | phy->ops.get_cable_length = e1000_get_cable_length_82577; |
331 | phy->ops.get_info = e1000_get_phy_info_82577; | 331 | phy->ops.get_info = e1000_get_phy_info_82577; |
332 | phy->ops.commit = e1000e_phy_sw_reset; | 332 | phy->ops.commit = e1000e_phy_sw_reset; |
333 | break; | ||
333 | case e1000_phy_82578: | 334 | case e1000_phy_82578: |
334 | phy->ops.check_polarity = e1000_check_polarity_m88; | 335 | phy->ops.check_polarity = e1000_check_polarity_m88; |
335 | phy->ops.force_speed_duplex = e1000e_phy_force_speed_duplex_m88; | 336 | phy->ops.force_speed_duplex = e1000e_phy_force_speed_duplex_m88; |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 7f3ceb9dad6a..b4ac82d51b20 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -3116,9 +3116,7 @@ s32 e1000_check_polarity_82577(struct e1000_hw *hw) | |||
3116 | * e1000_phy_force_speed_duplex_82577 - Force speed/duplex for I82577 PHY | 3116 | * e1000_phy_force_speed_duplex_82577 - Force speed/duplex for I82577 PHY |
3117 | * @hw: pointer to the HW structure | 3117 | * @hw: pointer to the HW structure |
3118 | * | 3118 | * |
3119 | * Calls the PHY setup function to force speed and duplex. Clears the | 3119 | * Calls the PHY setup function to force speed and duplex. |
3120 | * auto-crossover to force MDI manually. Waits for link and returns | ||
3121 | * successful if link up is successful, else -E1000_ERR_PHY (-2). | ||
3122 | **/ | 3120 | **/ |
3123 | s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | 3121 | s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) |
3124 | { | 3122 | { |
@@ -3137,23 +3135,6 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | |||
3137 | if (ret_val) | 3135 | if (ret_val) |
3138 | goto out; | 3136 | goto out; |
3139 | 3137 | ||
3140 | /* | ||
3141 | * Clear Auto-Crossover to force MDI manually. 82577 requires MDI | ||
3142 | * forced whenever speed and duplex are forced. | ||
3143 | */ | ||
3144 | ret_val = phy->ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data); | ||
3145 | if (ret_val) | ||
3146 | goto out; | ||
3147 | |||
3148 | phy_data &= ~I82577_PHY_CTRL2_AUTO_MDIX; | ||
3149 | phy_data &= ~I82577_PHY_CTRL2_FORCE_MDI_MDIX; | ||
3150 | |||
3151 | ret_val = phy->ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data); | ||
3152 | if (ret_val) | ||
3153 | goto out; | ||
3154 | |||
3155 | e_dbg("I82577_PHY_CTRL_2: %X\n", phy_data); | ||
3156 | |||
3157 | udelay(1); | 3138 | udelay(1); |
3158 | 3139 | ||
3159 | if (phy->autoneg_wait_to_complete) { | 3140 | if (phy->autoneg_wait_to_complete) { |