aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_82575.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/e1000_82575.c')
-rw-r--r--drivers/net/igb/e1000_82575.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index 4a32bed77c71..86438b59fa21 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -104,6 +104,12 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
104 case E1000_DEV_ID_82580_COPPER_DUAL: 104 case E1000_DEV_ID_82580_COPPER_DUAL:
105 mac->type = e1000_82580; 105 mac->type = e1000_82580;
106 break; 106 break;
107 case E1000_DEV_ID_I350_COPPER:
108 case E1000_DEV_ID_I350_FIBER:
109 case E1000_DEV_ID_I350_SERDES:
110 case E1000_DEV_ID_I350_SGMII:
111 mac->type = e1000_i350;
112 break;
107 default: 113 default:
108 return -E1000_ERR_MAC_INIT; 114 return -E1000_ERR_MAC_INIT;
109 break; 115 break;
@@ -153,8 +159,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
153 mac->rar_entry_count = E1000_RAR_ENTRIES_82576; 159 mac->rar_entry_count = E1000_RAR_ENTRIES_82576;
154 if (mac->type == e1000_82580) 160 if (mac->type == e1000_82580)
155 mac->rar_entry_count = E1000_RAR_ENTRIES_82580; 161 mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
162 if (mac->type == e1000_i350)
163 mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
156 /* reset */ 164 /* reset */
157 if (mac->type == e1000_82580) 165 if (mac->type >= e1000_82580)
158 mac->ops.reset_hw = igb_reset_hw_82580; 166 mac->ops.reset_hw = igb_reset_hw_82580;
159 else 167 else
160 mac->ops.reset_hw = igb_reset_hw_82575; 168 mac->ops.reset_hw = igb_reset_hw_82575;
@@ -225,7 +233,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
225 phy->ops.reset = igb_phy_hw_reset_sgmii_82575; 233 phy->ops.reset = igb_phy_hw_reset_sgmii_82575;
226 phy->ops.read_reg = igb_read_phy_reg_sgmii_82575; 234 phy->ops.read_reg = igb_read_phy_reg_sgmii_82575;
227 phy->ops.write_reg = igb_write_phy_reg_sgmii_82575; 235 phy->ops.write_reg = igb_write_phy_reg_sgmii_82575;
228 } else if (hw->mac.type == e1000_82580) { 236 } else if (hw->mac.type >= e1000_82580) {
229 phy->ops.reset = igb_phy_hw_reset; 237 phy->ops.reset = igb_phy_hw_reset;
230 phy->ops.read_reg = igb_read_phy_reg_82580; 238 phy->ops.read_reg = igb_read_phy_reg_82580;
231 phy->ops.write_reg = igb_write_phy_reg_82580; 239 phy->ops.write_reg = igb_write_phy_reg_82580;
@@ -261,6 +269,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
261 phy->ops.set_d3_lplu_state = igb_set_d3_lplu_state; 269 phy->ops.set_d3_lplu_state = igb_set_d3_lplu_state;
262 break; 270 break;
263 case I82580_I_PHY_ID: 271 case I82580_I_PHY_ID:
272 case I350_I_PHY_ID:
264 phy->type = e1000_phy_82580; 273 phy->type = e1000_phy_82580;
265 phy->ops.force_speed_duplex = igb_phy_force_speed_duplex_82580; 274 phy->ops.force_speed_duplex = igb_phy_force_speed_duplex_82580;
266 phy->ops.get_cable_length = igb_get_cable_length_82580; 275 phy->ops.get_cable_length = igb_get_cable_length_82580;
@@ -1205,8 +1214,6 @@ void igb_power_down_phy_copper_82575(struct e1000_hw *hw)
1205 /* If the management interface is not enabled, then power down */ 1214 /* If the management interface is not enabled, then power down */
1206 if (!(igb_enable_mng_pass_thru(hw) || igb_check_reset_block(hw))) 1215 if (!(igb_enable_mng_pass_thru(hw) || igb_check_reset_block(hw)))
1207 igb_power_down_phy_copper(hw); 1216 igb_power_down_phy_copper(hw);
1208
1209 return;
1210} 1217}
1211 1218
1212/** 1219/**
@@ -1445,7 +1452,6 @@ void igb_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable)
1445 **/ 1452 **/
1446static s32 igb_read_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 *data) 1453static s32 igb_read_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 *data)
1447{ 1454{
1448 u32 mdicnfg = 0;
1449 s32 ret_val; 1455 s32 ret_val;
1450 1456
1451 1457
@@ -1453,15 +1459,6 @@ static s32 igb_read_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 *data)
1453 if (ret_val) 1459 if (ret_val)
1454 goto out; 1460 goto out;
1455 1461
1456 /*
1457 * We config the phy address in MDICNFG register now. Same bits
1458 * as before. The values in MDIC can be written but will be
1459 * ignored. This allows us to call the old function after
1460 * configuring the PHY address in the new register
1461 */
1462 mdicnfg = (hw->phy.addr << E1000_MDIC_PHY_SHIFT);
1463 wr32(E1000_MDICNFG, mdicnfg);
1464
1465 ret_val = igb_read_phy_reg_mdic(hw, offset, data); 1462 ret_val = igb_read_phy_reg_mdic(hw, offset, data);
1466 1463
1467 hw->phy.ops.release(hw); 1464 hw->phy.ops.release(hw);
@@ -1480,7 +1477,6 @@ out:
1480 **/ 1477 **/
1481static s32 igb_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data) 1478static s32 igb_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data)
1482{ 1479{
1483 u32 mdicnfg = 0;
1484 s32 ret_val; 1480 s32 ret_val;
1485 1481
1486 1482
@@ -1488,15 +1484,6 @@ static s32 igb_write_phy_reg_82580(struct e1000_hw *hw, u32 offset, u16 data)
1488 if (ret_val) 1484 if (ret_val)
1489 goto out; 1485 goto out;
1490 1486
1491 /*
1492 * We config the phy address in MDICNFG register now. Same bits
1493 * as before. The values in MDIC can be written but will be
1494 * ignored. This allows us to call the old function after
1495 * configuring the PHY address in the new register
1496 */
1497 mdicnfg = (hw->phy.addr << E1000_MDIC_PHY_SHIFT);
1498 wr32(E1000_MDICNFG, mdicnfg);
1499
1500 ret_val = igb_write_phy_reg_mdic(hw, offset, data); 1487 ret_val = igb_write_phy_reg_mdic(hw, offset, data);
1501 1488
1502 hw->phy.ops.release(hw); 1489 hw->phy.ops.release(hw);