diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-01-06 09:29:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-10 02:44:06 -0500 |
commit | dd93f95e92283498f2497a632a81c167444668b5 (patch) | |
tree | fa5067184bc32c77bec6931a5a9862d8d137c270 /drivers/net/e1000e | |
parent | 0363466866d901fbc658f4e63dd61e7cc93dd0af (diff) |
e1000e: cleanup variables set but not used
The ICR register is clear on read and we don't care what the returned value
is when resetting the hardware so the icr variable(s) can be removed. We
should not ignore the return from e1000_lv_jumbo_workaround_ich8lan() and
from e1000_get_phy_id_82571() (dump a debug message when it fails and when
an unknown Phy id is returned).
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@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/82571.c | 21 | ||||
-rw-r--r-- | drivers/net/e1000e/es2lan.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 3 |
4 files changed, 21 insertions, 11 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index e57e4097ef1b..11a273e4ba23 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -121,29 +121,36 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) | |||
121 | 121 | ||
122 | /* This can only be done after all function pointers are setup. */ | 122 | /* This can only be done after all function pointers are setup. */ |
123 | ret_val = e1000_get_phy_id_82571(hw); | 123 | ret_val = e1000_get_phy_id_82571(hw); |
124 | if (ret_val) { | ||
125 | e_dbg("Error getting PHY ID\n"); | ||
126 | return ret_val; | ||
127 | } | ||
124 | 128 | ||
125 | /* Verify phy id */ | 129 | /* Verify phy id */ |
126 | switch (hw->mac.type) { | 130 | switch (hw->mac.type) { |
127 | case e1000_82571: | 131 | case e1000_82571: |
128 | case e1000_82572: | 132 | case e1000_82572: |
129 | if (phy->id != IGP01E1000_I_PHY_ID) | 133 | if (phy->id != IGP01E1000_I_PHY_ID) |
130 | return -E1000_ERR_PHY; | 134 | ret_val = -E1000_ERR_PHY; |
131 | break; | 135 | break; |
132 | case e1000_82573: | 136 | case e1000_82573: |
133 | if (phy->id != M88E1111_I_PHY_ID) | 137 | if (phy->id != M88E1111_I_PHY_ID) |
134 | return -E1000_ERR_PHY; | 138 | ret_val = -E1000_ERR_PHY; |
135 | break; | 139 | break; |
136 | case e1000_82574: | 140 | case e1000_82574: |
137 | case e1000_82583: | 141 | case e1000_82583: |
138 | if (phy->id != BME1000_E_PHY_ID_R2) | 142 | if (phy->id != BME1000_E_PHY_ID_R2) |
139 | return -E1000_ERR_PHY; | 143 | ret_val = -E1000_ERR_PHY; |
140 | break; | 144 | break; |
141 | default: | 145 | default: |
142 | return -E1000_ERR_PHY; | 146 | ret_val = -E1000_ERR_PHY; |
143 | break; | 147 | break; |
144 | } | 148 | } |
145 | 149 | ||
146 | return 0; | 150 | if (ret_val) |
151 | e_dbg("PHY ID unknown: type = 0x%08x\n", phy->id); | ||
152 | |||
153 | return ret_val; | ||
147 | } | 154 | } |
148 | 155 | ||
149 | /** | 156 | /** |
@@ -956,7 +963,7 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active) | |||
956 | **/ | 963 | **/ |
957 | static s32 e1000_reset_hw_82571(struct e1000_hw *hw) | 964 | static s32 e1000_reset_hw_82571(struct e1000_hw *hw) |
958 | { | 965 | { |
959 | u32 ctrl, ctrl_ext, icr; | 966 | u32 ctrl, ctrl_ext; |
960 | s32 ret_val; | 967 | s32 ret_val; |
961 | 968 | ||
962 | /* | 969 | /* |
@@ -1040,7 +1047,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) | |||
1040 | 1047 | ||
1041 | /* Clear any pending interrupt events. */ | 1048 | /* Clear any pending interrupt events. */ |
1042 | ew32(IMC, 0xffffffff); | 1049 | ew32(IMC, 0xffffffff); |
1043 | icr = er32(ICR); | 1050 | er32(ICR); |
1044 | 1051 | ||
1045 | if (hw->mac.type == e1000_82571) { | 1052 | if (hw->mac.type == e1000_82571) { |
1046 | /* Install any alternate MAC address into RAR0 */ | 1053 | /* Install any alternate MAC address into RAR0 */ |
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index b18c644e13d1..e45a61c8930a 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c | |||
@@ -784,7 +784,7 @@ static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed, | |||
784 | **/ | 784 | **/ |
785 | static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) | 785 | static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) |
786 | { | 786 | { |
787 | u32 ctrl, icr; | 787 | u32 ctrl; |
788 | s32 ret_val; | 788 | s32 ret_val; |
789 | 789 | ||
790 | /* | 790 | /* |
@@ -818,7 +818,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) | |||
818 | 818 | ||
819 | /* Clear any pending interrupt events. */ | 819 | /* Clear any pending interrupt events. */ |
820 | ew32(IMC, 0xffffffff); | 820 | ew32(IMC, 0xffffffff); |
821 | icr = er32(ICR); | 821 | er32(ICR); |
822 | 822 | ||
823 | ret_val = e1000_check_alt_mac_addr_generic(hw); | 823 | ret_val = e1000_check_alt_mac_addr_generic(hw); |
824 | 824 | ||
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index d86cc0832720..754590d79f6d 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -2977,7 +2977,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2977 | { | 2977 | { |
2978 | struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; | 2978 | struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; |
2979 | u16 reg; | 2979 | u16 reg; |
2980 | u32 ctrl, icr, kab; | 2980 | u32 ctrl, kab; |
2981 | s32 ret_val; | 2981 | s32 ret_val; |
2982 | 2982 | ||
2983 | /* | 2983 | /* |
@@ -3067,7 +3067,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
3067 | ew32(CRC_OFFSET, 0x65656565); | 3067 | ew32(CRC_OFFSET, 0x65656565); |
3068 | 3068 | ||
3069 | ew32(IMC, 0xffffffff); | 3069 | ew32(IMC, 0xffffffff); |
3070 | icr = er32(ICR); | 3070 | er32(ICR); |
3071 | 3071 | ||
3072 | kab = er32(KABGTXD); | 3072 | kab = er32(KABGTXD); |
3073 | kab |= E1000_KABGTXD_BGSQLBIAS; | 3073 | kab |= E1000_KABGTXD_BGSQLBIAS; |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index fe50242aa9e6..5498689ac20c 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2734,6 +2734,9 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter) | |||
2734 | ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true); | 2734 | ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, true); |
2735 | else | 2735 | else |
2736 | ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false); | 2736 | ret_val = e1000_lv_jumbo_workaround_ich8lan(hw, false); |
2737 | |||
2738 | if (ret_val) | ||
2739 | e_dbg("failed to enable jumbo frame workaround mode\n"); | ||
2737 | } | 2740 | } |
2738 | 2741 | ||
2739 | /* Program MC offset vector base */ | 2742 | /* Program MC offset vector base */ |