aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/82571.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/82571.c')
-rw-r--r--drivers/net/e1000e/82571.c21
1 files changed, 14 insertions, 7 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 **/
957static s32 e1000_reset_hw_82571(struct e1000_hw *hw) 964static 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 */