aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ich8lan.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2009-07-01 09:28:14 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-03 23:09:32 -0400
commit60f1292fcbdff03ef5caea56404d3d81d05026f6 (patch)
treec2e5904bed66be0540ba354d737e4d7f9b328929 /drivers/net/e1000e/ich8lan.c
parentfc0c7760aea07c74af3395ad18f96ba62eecac36 (diff)
e1000e: do not write SmartSpeed register bits on parts without support
The driver was accessing register bits for features on parts that do not support that feature. This could cause problems in the hardware. 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/ich8lan.c')
-rw-r--r--drivers/net/e1000e/ich8lan.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 438778fef5ac..bf9b97db76b9 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -977,12 +977,14 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
977 phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU; 977 phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU;
978 ew32(PHY_CTRL, phy_ctrl); 978 ew32(PHY_CTRL, phy_ctrl);
979 979
980 if (phy->type != e1000_phy_igp_3)
981 return 0;
982
980 /* 983 /*
981 * Call gig speed drop workaround on LPLU before accessing 984 * Call gig speed drop workaround on LPLU before accessing
982 * any PHY registers 985 * any PHY registers
983 */ 986 */
984 if ((hw->mac.type == e1000_ich8lan) && 987 if (hw->mac.type == e1000_ich8lan)
985 (hw->phy.type == e1000_phy_igp_3))
986 e1000e_gig_downshift_workaround_ich8lan(hw); 988 e1000e_gig_downshift_workaround_ich8lan(hw);
987 989
988 /* When LPLU is enabled, we should disable SmartSpeed */ 990 /* When LPLU is enabled, we should disable SmartSpeed */
@@ -995,6 +997,9 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
995 phy_ctrl &= ~E1000_PHY_CTRL_D0A_LPLU; 997 phy_ctrl &= ~E1000_PHY_CTRL_D0A_LPLU;
996 ew32(PHY_CTRL, phy_ctrl); 998 ew32(PHY_CTRL, phy_ctrl);
997 999
1000 if (phy->type != e1000_phy_igp_3)
1001 return 0;
1002
998 /* 1003 /*
999 * LPLU and SmartSpeed are mutually exclusive. LPLU is used 1004 * LPLU and SmartSpeed are mutually exclusive. LPLU is used
1000 * during Dx states where the power conservation is most 1005 * during Dx states where the power conservation is most
@@ -1054,6 +1059,10 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
1054 if (!active) { 1059 if (!active) {
1055 phy_ctrl &= ~E1000_PHY_CTRL_NOND0A_LPLU; 1060 phy_ctrl &= ~E1000_PHY_CTRL_NOND0A_LPLU;
1056 ew32(PHY_CTRL, phy_ctrl); 1061 ew32(PHY_CTRL, phy_ctrl);
1062
1063 if (phy->type != e1000_phy_igp_3)
1064 return 0;
1065
1057 /* 1066 /*
1058 * LPLU and SmartSpeed are mutually exclusive. LPLU is used 1067 * LPLU and SmartSpeed are mutually exclusive. LPLU is used
1059 * during Dx states where the power conservation is most 1068 * during Dx states where the power conservation is most
@@ -1089,12 +1098,14 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
1089 phy_ctrl |= E1000_PHY_CTRL_NOND0A_LPLU; 1098 phy_ctrl |= E1000_PHY_CTRL_NOND0A_LPLU;
1090 ew32(PHY_CTRL, phy_ctrl); 1099 ew32(PHY_CTRL, phy_ctrl);
1091 1100
1101 if (phy->type != e1000_phy_igp_3)
1102 return 0;
1103
1092 /* 1104 /*
1093 * Call gig speed drop workaround on LPLU before accessing 1105 * Call gig speed drop workaround on LPLU before accessing
1094 * any PHY registers 1106 * any PHY registers
1095 */ 1107 */
1096 if ((hw->mac.type == e1000_ich8lan) && 1108 if (hw->mac.type == e1000_ich8lan)
1097 (hw->phy.type == e1000_phy_igp_3))
1098 e1000e_gig_downshift_workaround_ich8lan(hw); 1109 e1000e_gig_downshift_workaround_ich8lan(hw);
1099 1110
1100 /* When LPLU is enabled, we should disable SmartSpeed */ 1111 /* When LPLU is enabled, we should disable SmartSpeed */