diff options
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 168 |
1 files changed, 91 insertions, 77 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 57b5435599ab..3369d1f6a39c 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel PRO/1000 Linux driver | 3 | Intel PRO/1000 Linux driver |
4 | Copyright(c) 1999 - 2010 Intel Corporation. | 4 | Copyright(c) 1999 - 2011 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -140,6 +140,11 @@ | |||
140 | #define I82579_LPI_CTRL PHY_REG(772, 20) | 140 | #define I82579_LPI_CTRL PHY_REG(772, 20) |
141 | #define I82579_LPI_CTRL_ENABLE_MASK 0x6000 | 141 | #define I82579_LPI_CTRL_ENABLE_MASK 0x6000 |
142 | 142 | ||
143 | /* EMI Registers */ | ||
144 | #define I82579_EMI_ADDR 0x10 | ||
145 | #define I82579_EMI_DATA 0x11 | ||
146 | #define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */ | ||
147 | |||
143 | /* Strapping Option Register - RO */ | 148 | /* Strapping Option Register - RO */ |
144 | #define E1000_STRAP 0x0000C | 149 | #define E1000_STRAP 0x0000C |
145 | #define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000 | 150 | #define E1000_STRAP_SMBUS_ADDRESS_MASK 0x00FE0000 |
@@ -302,9 +307,9 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
302 | * the interconnect to PCIe mode. | 307 | * the interconnect to PCIe mode. |
303 | */ | 308 | */ |
304 | fwsm = er32(FWSM); | 309 | fwsm = er32(FWSM); |
305 | if (!(fwsm & E1000_ICH_FWSM_FW_VALID)) { | 310 | if (!(fwsm & E1000_ICH_FWSM_FW_VALID) && !e1000_check_reset_block(hw)) { |
306 | ctrl = er32(CTRL); | 311 | ctrl = er32(CTRL); |
307 | ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; | 312 | ctrl |= E1000_CTRL_LANPHYPC_OVERRIDE; |
308 | ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; | 313 | ctrl &= ~E1000_CTRL_LANPHYPC_VALUE; |
309 | ew32(CTRL, ctrl); | 314 | ew32(CTRL, ctrl); |
310 | udelay(10); | 315 | udelay(10); |
@@ -321,7 +326,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
321 | } | 326 | } |
322 | 327 | ||
323 | /* | 328 | /* |
324 | * Reset the PHY before any acccess to it. Doing so, ensures that | 329 | * Reset the PHY before any access to it. Doing so, ensures that |
325 | * the PHY is in a known good state before we read/write PHY registers. | 330 | * the PHY is in a known good state before we read/write PHY registers. |
326 | * The generic reset is sufficient here, because we haven't determined | 331 | * The generic reset is sufficient here, because we haven't determined |
327 | * the PHY type yet. | 332 | * the PHY type yet. |
@@ -331,19 +336,24 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
331 | goto out; | 336 | goto out; |
332 | 337 | ||
333 | /* Ungate automatic PHY configuration on non-managed 82579 */ | 338 | /* Ungate automatic PHY configuration on non-managed 82579 */ |
334 | if ((hw->mac.type == e1000_pch2lan) && | 339 | if ((hw->mac.type == e1000_pch2lan) && |
335 | !(fwsm & E1000_ICH_FWSM_FW_VALID)) { | 340 | !(fwsm & E1000_ICH_FWSM_FW_VALID)) { |
336 | msleep(10); | 341 | usleep_range(10000, 20000); |
337 | e1000_gate_hw_phy_config_ich8lan(hw, false); | 342 | e1000_gate_hw_phy_config_ich8lan(hw, false); |
338 | } | 343 | } |
339 | 344 | ||
340 | phy->id = e1000_phy_unknown; | 345 | phy->id = e1000_phy_unknown; |
341 | ret_val = e1000e_get_phy_id(hw); | 346 | switch (hw->mac.type) { |
342 | if (ret_val) | 347 | default: |
343 | goto out; | 348 | ret_val = e1000e_get_phy_id(hw); |
344 | if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) { | 349 | if (ret_val) |
350 | goto out; | ||
351 | if ((phy->id != 0) && (phy->id != PHY_REVISION_MASK)) | ||
352 | break; | ||
353 | /* fall-through */ | ||
354 | case e1000_pch2lan: | ||
345 | /* | 355 | /* |
346 | * In case the PHY needs to be in mdio slow mode (eg. 82577), | 356 | * In case the PHY needs to be in mdio slow mode, |
347 | * set slow mode and try to get the PHY id again. | 357 | * set slow mode and try to get the PHY id again. |
348 | */ | 358 | */ |
349 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | 359 | ret_val = e1000_set_mdio_slow_mode_hv(hw); |
@@ -352,6 +362,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
352 | ret_val = e1000e_get_phy_id(hw); | 362 | ret_val = e1000e_get_phy_id(hw); |
353 | if (ret_val) | 363 | if (ret_val) |
354 | goto out; | 364 | goto out; |
365 | break; | ||
355 | } | 366 | } |
356 | phy->type = e1000e_get_phy_type_from_id(phy->id); | 367 | phy->type = e1000e_get_phy_type_from_id(phy->id); |
357 | 368 | ||
@@ -360,7 +371,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
360 | case e1000_phy_82579: | 371 | case e1000_phy_82579: |
361 | phy->ops.check_polarity = e1000_check_polarity_82577; | 372 | phy->ops.check_polarity = e1000_check_polarity_82577; |
362 | phy->ops.force_speed_duplex = | 373 | phy->ops.force_speed_duplex = |
363 | e1000_phy_force_speed_duplex_82577; | 374 | e1000_phy_force_speed_duplex_82577; |
364 | phy->ops.get_cable_length = e1000_get_cable_length_82577; | 375 | phy->ops.get_cable_length = e1000_get_cable_length_82577; |
365 | phy->ops.get_info = e1000_get_phy_info_82577; | 376 | phy->ops.get_info = e1000_get_phy_info_82577; |
366 | phy->ops.commit = e1000e_phy_sw_reset; | 377 | phy->ops.commit = e1000e_phy_sw_reset; |
@@ -416,7 +427,7 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw) | |||
416 | phy->id = 0; | 427 | phy->id = 0; |
417 | while ((e1000_phy_unknown == e1000e_get_phy_type_from_id(phy->id)) && | 428 | while ((e1000_phy_unknown == e1000e_get_phy_type_from_id(phy->id)) && |
418 | (i++ < 100)) { | 429 | (i++ < 100)) { |
419 | msleep(1); | 430 | usleep_range(1000, 2000); |
420 | ret_val = e1000e_get_phy_id(hw); | 431 | ret_val = e1000e_get_phy_id(hw); |
421 | if (ret_val) | 432 | if (ret_val) |
422 | return ret_val; | 433 | return ret_val; |
@@ -553,6 +564,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) | |||
553 | mac->ops.check_mng_mode = e1000_check_mng_mode_ich8lan; | 564 | mac->ops.check_mng_mode = e1000_check_mng_mode_ich8lan; |
554 | /* ID LED init */ | 565 | /* ID LED init */ |
555 | mac->ops.id_led_init = e1000e_id_led_init; | 566 | mac->ops.id_led_init = e1000e_id_led_init; |
567 | /* blink LED */ | ||
568 | mac->ops.blink_led = e1000e_blink_led_generic; | ||
556 | /* setup LED */ | 569 | /* setup LED */ |
557 | mac->ops.setup_led = e1000e_setup_led_generic; | 570 | mac->ops.setup_led = e1000e_setup_led_generic; |
558 | /* cleanup LED */ | 571 | /* cleanup LED */ |
@@ -747,9 +760,17 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter) | |||
747 | if (rc) | 760 | if (rc) |
748 | return rc; | 761 | return rc; |
749 | 762 | ||
750 | if (adapter->hw.phy.type == e1000_phy_ife) { | 763 | /* |
764 | * Disable Jumbo Frame support on parts with Intel 10/100 PHY or | ||
765 | * on parts with MACsec enabled in NVM (reflected in CTRL_EXT). | ||
766 | */ | ||
767 | if ((adapter->hw.phy.type == e1000_phy_ife) || | ||
768 | ((adapter->hw.mac.type >= e1000_pch2lan) && | ||
769 | (!(er32(CTRL_EXT) & E1000_CTRL_EXT_LSECCK)))) { | ||
751 | adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES; | 770 | adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES; |
752 | adapter->max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN; | 771 | adapter->max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN; |
772 | |||
773 | hw->mac.ops.blink_led = NULL; | ||
753 | } | 774 | } |
754 | 775 | ||
755 | if ((adapter->hw.mac.type == e1000_ich8lan) && | 776 | if ((adapter->hw.mac.type == e1000_ich8lan) && |
@@ -1389,22 +1410,6 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw) | |||
1389 | } | 1410 | } |
1390 | } | 1411 | } |
1391 | 1412 | ||
1392 | static u32 e1000_calc_rx_da_crc(u8 mac[]) | ||
1393 | { | ||
1394 | u32 poly = 0xEDB88320; /* Polynomial for 802.3 CRC calculation */ | ||
1395 | u32 i, j, mask, crc; | ||
1396 | |||
1397 | crc = 0xffffffff; | ||
1398 | for (i = 0; i < 6; i++) { | ||
1399 | crc = crc ^ mac[i]; | ||
1400 | for (j = 8; j > 0; j--) { | ||
1401 | mask = (crc & 1) * (-1); | ||
1402 | crc = (crc >> 1) ^ (poly & mask); | ||
1403 | } | ||
1404 | } | ||
1405 | return ~crc; | ||
1406 | } | ||
1407 | |||
1408 | /** | 1413 | /** |
1409 | * e1000_lv_jumbo_workaround_ich8lan - required for jumbo frame operation | 1414 | * e1000_lv_jumbo_workaround_ich8lan - required for jumbo frame operation |
1410 | * with 82579 PHY | 1415 | * with 82579 PHY |
@@ -1447,8 +1452,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable) | |||
1447 | mac_addr[4] = (addr_high & 0xFF); | 1452 | mac_addr[4] = (addr_high & 0xFF); |
1448 | mac_addr[5] = ((addr_high >> 8) & 0xFF); | 1453 | mac_addr[5] = ((addr_high >> 8) & 0xFF); |
1449 | 1454 | ||
1450 | ew32(PCH_RAICC(i), | 1455 | ew32(PCH_RAICC(i), ~ether_crc_le(ETH_ALEN, mac_addr)); |
1451 | e1000_calc_rx_da_crc(mac_addr)); | ||
1452 | } | 1456 | } |
1453 | 1457 | ||
1454 | /* Write Rx addresses to the PHY */ | 1458 | /* Write Rx addresses to the PHY */ |
@@ -1704,7 +1708,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw) | |||
1704 | goto out; | 1708 | goto out; |
1705 | 1709 | ||
1706 | /* Allow time for h/w to get to quiescent state after reset */ | 1710 | /* Allow time for h/w to get to quiescent state after reset */ |
1707 | msleep(10); | 1711 | usleep_range(10000, 20000); |
1708 | 1712 | ||
1709 | /* Perform any necessary post-reset workarounds */ | 1713 | /* Perform any necessary post-reset workarounds */ |
1710 | switch (hw->mac.type) { | 1714 | switch (hw->mac.type) { |
@@ -1734,11 +1738,25 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw) | |||
1734 | /* Configure the LCD with the OEM bits in NVM */ | 1738 | /* Configure the LCD with the OEM bits in NVM */ |
1735 | ret_val = e1000_oem_bits_config_ich8lan(hw, true); | 1739 | ret_val = e1000_oem_bits_config_ich8lan(hw, true); |
1736 | 1740 | ||
1737 | /* Ungate automatic PHY configuration on non-managed 82579 */ | 1741 | if (hw->mac.type == e1000_pch2lan) { |
1738 | if ((hw->mac.type == e1000_pch2lan) && | 1742 | /* Ungate automatic PHY configuration on non-managed 82579 */ |
1739 | !(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) { | 1743 | if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) { |
1740 | msleep(10); | 1744 | usleep_range(10000, 20000); |
1741 | e1000_gate_hw_phy_config_ich8lan(hw, false); | 1745 | e1000_gate_hw_phy_config_ich8lan(hw, false); |
1746 | } | ||
1747 | |||
1748 | /* Set EEE LPI Update Timer to 200usec */ | ||
1749 | ret_val = hw->phy.ops.acquire(hw); | ||
1750 | if (ret_val) | ||
1751 | goto out; | ||
1752 | ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_ADDR, | ||
1753 | I82579_LPI_UPDATE_TIMER); | ||
1754 | if (ret_val) | ||
1755 | goto release; | ||
1756 | ret_val = hw->phy.ops.write_reg_locked(hw, I82579_EMI_DATA, | ||
1757 | 0x1387); | ||
1758 | release: | ||
1759 | hw->phy.ops.release(hw); | ||
1742 | } | 1760 | } |
1743 | 1761 | ||
1744 | out: | 1762 | out: |
@@ -2115,7 +2133,6 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw) | |||
2115 | { | 2133 | { |
2116 | union ich8_hws_flash_status hsfsts; | 2134 | union ich8_hws_flash_status hsfsts; |
2117 | s32 ret_val = -E1000_ERR_NVM; | 2135 | s32 ret_val = -E1000_ERR_NVM; |
2118 | s32 i = 0; | ||
2119 | 2136 | ||
2120 | hsfsts.regval = er16flash(ICH_FLASH_HSFSTS); | 2137 | hsfsts.regval = er16flash(ICH_FLASH_HSFSTS); |
2121 | 2138 | ||
@@ -2151,6 +2168,8 @@ static s32 e1000_flash_cycle_init_ich8lan(struct e1000_hw *hw) | |||
2151 | ew16flash(ICH_FLASH_HSFSTS, hsfsts.regval); | 2168 | ew16flash(ICH_FLASH_HSFSTS, hsfsts.regval); |
2152 | ret_val = 0; | 2169 | ret_val = 0; |
2153 | } else { | 2170 | } else { |
2171 | s32 i = 0; | ||
2172 | |||
2154 | /* | 2173 | /* |
2155 | * Otherwise poll for sometime so the current | 2174 | * Otherwise poll for sometime so the current |
2156 | * cycle has a chance to end before giving up. | 2175 | * cycle has a chance to end before giving up. |
@@ -2303,11 +2322,10 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset, | |||
2303 | */ | 2322 | */ |
2304 | if (ret_val == 0) { | 2323 | if (ret_val == 0) { |
2305 | flash_data = er32flash(ICH_FLASH_FDATA0); | 2324 | flash_data = er32flash(ICH_FLASH_FDATA0); |
2306 | if (size == 1) { | 2325 | if (size == 1) |
2307 | *data = (u8)(flash_data & 0x000000FF); | 2326 | *data = (u8)(flash_data & 0x000000FF); |
2308 | } else if (size == 2) { | 2327 | else if (size == 2) |
2309 | *data = (u16)(flash_data & 0x0000FFFF); | 2328 | *data = (u16)(flash_data & 0x0000FFFF); |
2310 | } | ||
2311 | break; | 2329 | break; |
2312 | } else { | 2330 | } else { |
2313 | /* | 2331 | /* |
@@ -2518,7 +2536,7 @@ release: | |||
2518 | */ | 2536 | */ |
2519 | if (!ret_val) { | 2537 | if (!ret_val) { |
2520 | e1000e_reload_nvm(hw); | 2538 | e1000e_reload_nvm(hw); |
2521 | msleep(10); | 2539 | usleep_range(10000, 20000); |
2522 | } | 2540 | } |
2523 | 2541 | ||
2524 | out: | 2542 | out: |
@@ -2972,7 +2990,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2972 | { | 2990 | { |
2973 | struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; | 2991 | struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; |
2974 | u16 reg; | 2992 | u16 reg; |
2975 | u32 ctrl, icr, kab; | 2993 | u32 ctrl, kab; |
2976 | s32 ret_val; | 2994 | s32 ret_val; |
2977 | 2995 | ||
2978 | /* | 2996 | /* |
@@ -2995,7 +3013,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2995 | ew32(TCTL, E1000_TCTL_PSP); | 3013 | ew32(TCTL, E1000_TCTL_PSP); |
2996 | e1e_flush(); | 3014 | e1e_flush(); |
2997 | 3015 | ||
2998 | msleep(10); | 3016 | usleep_range(10000, 20000); |
2999 | 3017 | ||
3000 | /* Workaround for ICH8 bit corruption issue in FIFO memory */ | 3018 | /* Workaround for ICH8 bit corruption issue in FIFO memory */ |
3001 | if (hw->mac.type == e1000_ich8lan) { | 3019 | if (hw->mac.type == e1000_ich8lan) { |
@@ -3062,7 +3080,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
3062 | ew32(CRC_OFFSET, 0x65656565); | 3080 | ew32(CRC_OFFSET, 0x65656565); |
3063 | 3081 | ||
3064 | ew32(IMC, 0xffffffff); | 3082 | ew32(IMC, 0xffffffff); |
3065 | icr = er32(ICR); | 3083 | er32(ICR); |
3066 | 3084 | ||
3067 | kab = er32(KABGTXD); | 3085 | kab = er32(KABGTXD); |
3068 | kab |= E1000_KABGTXD_BGSQLBIAS; | 3086 | kab |= E1000_KABGTXD_BGSQLBIAS; |
@@ -3113,7 +3131,7 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw) | |||
3113 | * Reset the phy after disabling host wakeup to reset the Rx buffer. | 3131 | * Reset the phy after disabling host wakeup to reset the Rx buffer. |
3114 | */ | 3132 | */ |
3115 | if (hw->phy.type == e1000_phy_82578) { | 3133 | if (hw->phy.type == e1000_phy_82578) { |
3116 | hw->phy.ops.read_reg(hw, BM_WUC, &i); | 3134 | e1e_rphy(hw, BM_WUC, &i); |
3117 | ret_val = e1000_phy_hw_reset_ich8lan(hw); | 3135 | ret_val = e1000_phy_hw_reset_ich8lan(hw); |
3118 | if (ret_val) | 3136 | if (ret_val) |
3119 | return ret_val; | 3137 | return ret_val; |
@@ -3271,9 +3289,8 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) | |||
3271 | (hw->phy.type == e1000_phy_82577)) { | 3289 | (hw->phy.type == e1000_phy_82577)) { |
3272 | ew32(FCRTV_PCH, hw->fc.refresh_time); | 3290 | ew32(FCRTV_PCH, hw->fc.refresh_time); |
3273 | 3291 | ||
3274 | ret_val = hw->phy.ops.write_reg(hw, | 3292 | ret_val = e1e_wphy(hw, PHY_REG(BM_PORT_CTRL_PAGE, 27), |
3275 | PHY_REG(BM_PORT_CTRL_PAGE, 27), | 3293 | hw->fc.pause_time); |
3276 | hw->fc.pause_time); | ||
3277 | if (ret_val) | 3294 | if (ret_val) |
3278 | return ret_val; | 3295 | return ret_val; |
3279 | } | 3296 | } |
@@ -3337,8 +3354,7 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw) | |||
3337 | return ret_val; | 3354 | return ret_val; |
3338 | break; | 3355 | break; |
3339 | case e1000_phy_ife: | 3356 | case e1000_phy_ife: |
3340 | ret_val = hw->phy.ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, | 3357 | ret_val = e1e_rphy(hw, IFE_PHY_MDIX_CONTROL, ®_data); |
3341 | ®_data); | ||
3342 | if (ret_val) | 3358 | if (ret_val) |
3343 | return ret_val; | 3359 | return ret_val; |
3344 | 3360 | ||
@@ -3356,8 +3372,7 @@ static s32 e1000_setup_copper_link_ich8lan(struct e1000_hw *hw) | |||
3356 | reg_data |= IFE_PMC_AUTO_MDIX; | 3372 | reg_data |= IFE_PMC_AUTO_MDIX; |
3357 | break; | 3373 | break; |
3358 | } | 3374 | } |
3359 | ret_val = hw->phy.ops.write_reg(hw, IFE_PHY_MDIX_CONTROL, | 3375 | ret_val = e1e_wphy(hw, IFE_PHY_MDIX_CONTROL, reg_data); |
3360 | reg_data); | ||
3361 | if (ret_val) | 3376 | if (ret_val) |
3362 | return ret_val; | 3377 | return ret_val; |
3363 | break; | 3378 | break; |
@@ -3591,7 +3606,7 @@ void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw) | |||
3591 | ew32(PHY_CTRL, phy_ctrl); | 3606 | ew32(PHY_CTRL, phy_ctrl); |
3592 | 3607 | ||
3593 | if (hw->mac.type >= e1000_pchlan) { | 3608 | if (hw->mac.type >= e1000_pchlan) { |
3594 | e1000_oem_bits_config_ich8lan(hw, true); | 3609 | e1000_oem_bits_config_ich8lan(hw, false); |
3595 | ret_val = hw->phy.ops.acquire(hw); | 3610 | ret_val = hw->phy.ops.acquire(hw); |
3596 | if (ret_val) | 3611 | if (ret_val) |
3597 | return; | 3612 | return; |
@@ -3641,7 +3656,8 @@ static s32 e1000_led_off_ich8lan(struct e1000_hw *hw) | |||
3641 | { | 3656 | { |
3642 | if (hw->phy.type == e1000_phy_ife) | 3657 | if (hw->phy.type == e1000_phy_ife) |
3643 | return e1e_wphy(hw, IFE_PHY_SPECIAL_CONTROL_LED, | 3658 | return e1e_wphy(hw, IFE_PHY_SPECIAL_CONTROL_LED, |
3644 | (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_OFF)); | 3659 | (IFE_PSCL_PROBE_MODE | |
3660 | IFE_PSCL_PROBE_LEDS_OFF)); | ||
3645 | 3661 | ||
3646 | ew32(LEDCTL, hw->mac.ledctl_mode1); | 3662 | ew32(LEDCTL, hw->mac.ledctl_mode1); |
3647 | return 0; | 3663 | return 0; |
@@ -3655,8 +3671,7 @@ static s32 e1000_led_off_ich8lan(struct e1000_hw *hw) | |||
3655 | **/ | 3671 | **/ |
3656 | static s32 e1000_setup_led_pchlan(struct e1000_hw *hw) | 3672 | static s32 e1000_setup_led_pchlan(struct e1000_hw *hw) |
3657 | { | 3673 | { |
3658 | return hw->phy.ops.write_reg(hw, HV_LED_CONFIG, | 3674 | return e1e_wphy(hw, HV_LED_CONFIG, (u16)hw->mac.ledctl_mode1); |
3659 | (u16)hw->mac.ledctl_mode1); | ||
3660 | } | 3675 | } |
3661 | 3676 | ||
3662 | /** | 3677 | /** |
@@ -3667,8 +3682,7 @@ static s32 e1000_setup_led_pchlan(struct e1000_hw *hw) | |||
3667 | **/ | 3682 | **/ |
3668 | static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw) | 3683 | static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw) |
3669 | { | 3684 | { |
3670 | return hw->phy.ops.write_reg(hw, HV_LED_CONFIG, | 3685 | return e1e_wphy(hw, HV_LED_CONFIG, (u16)hw->mac.ledctl_default); |
3671 | (u16)hw->mac.ledctl_default); | ||
3672 | } | 3686 | } |
3673 | 3687 | ||
3674 | /** | 3688 | /** |
@@ -3699,7 +3713,7 @@ static s32 e1000_led_on_pchlan(struct e1000_hw *hw) | |||
3699 | } | 3713 | } |
3700 | } | 3714 | } |
3701 | 3715 | ||
3702 | return hw->phy.ops.write_reg(hw, HV_LED_CONFIG, data); | 3716 | return e1e_wphy(hw, HV_LED_CONFIG, data); |
3703 | } | 3717 | } |
3704 | 3718 | ||
3705 | /** | 3719 | /** |
@@ -3730,7 +3744,7 @@ static s32 e1000_led_off_pchlan(struct e1000_hw *hw) | |||
3730 | } | 3744 | } |
3731 | } | 3745 | } |
3732 | 3746 | ||
3733 | return hw->phy.ops.write_reg(hw, HV_LED_CONFIG, data); | 3747 | return e1e_wphy(hw, HV_LED_CONFIG, data); |
3734 | } | 3748 | } |
3735 | 3749 | ||
3736 | /** | 3750 | /** |
@@ -3839,20 +3853,20 @@ static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw) | |||
3839 | if ((hw->phy.type == e1000_phy_82578) || | 3853 | if ((hw->phy.type == e1000_phy_82578) || |
3840 | (hw->phy.type == e1000_phy_82579) || | 3854 | (hw->phy.type == e1000_phy_82579) || |
3841 | (hw->phy.type == e1000_phy_82577)) { | 3855 | (hw->phy.type == e1000_phy_82577)) { |
3842 | hw->phy.ops.read_reg(hw, HV_SCC_UPPER, &phy_data); | 3856 | e1e_rphy(hw, HV_SCC_UPPER, &phy_data); |
3843 | hw->phy.ops.read_reg(hw, HV_SCC_LOWER, &phy_data); | 3857 | e1e_rphy(hw, HV_SCC_LOWER, &phy_data); |
3844 | hw->phy.ops.read_reg(hw, HV_ECOL_UPPER, &phy_data); | 3858 | e1e_rphy(hw, HV_ECOL_UPPER, &phy_data); |
3845 | hw->phy.ops.read_reg(hw, HV_ECOL_LOWER, &phy_data); | 3859 | e1e_rphy(hw, HV_ECOL_LOWER, &phy_data); |
3846 | hw->phy.ops.read_reg(hw, HV_MCC_UPPER, &phy_data); | 3860 | e1e_rphy(hw, HV_MCC_UPPER, &phy_data); |
3847 | hw->phy.ops.read_reg(hw, HV_MCC_LOWER, &phy_data); | 3861 | e1e_rphy(hw, HV_MCC_LOWER, &phy_data); |
3848 | hw->phy.ops.read_reg(hw, HV_LATECOL_UPPER, &phy_data); | 3862 | e1e_rphy(hw, HV_LATECOL_UPPER, &phy_data); |
3849 | hw->phy.ops.read_reg(hw, HV_LATECOL_LOWER, &phy_data); | 3863 | e1e_rphy(hw, HV_LATECOL_LOWER, &phy_data); |
3850 | hw->phy.ops.read_reg(hw, HV_COLC_UPPER, &phy_data); | 3864 | e1e_rphy(hw, HV_COLC_UPPER, &phy_data); |
3851 | hw->phy.ops.read_reg(hw, HV_COLC_LOWER, &phy_data); | 3865 | e1e_rphy(hw, HV_COLC_LOWER, &phy_data); |
3852 | hw->phy.ops.read_reg(hw, HV_DC_UPPER, &phy_data); | 3866 | e1e_rphy(hw, HV_DC_UPPER, &phy_data); |
3853 | hw->phy.ops.read_reg(hw, HV_DC_LOWER, &phy_data); | 3867 | e1e_rphy(hw, HV_DC_LOWER, &phy_data); |
3854 | hw->phy.ops.read_reg(hw, HV_TNCRS_UPPER, &phy_data); | 3868 | e1e_rphy(hw, HV_TNCRS_UPPER, &phy_data); |
3855 | hw->phy.ops.read_reg(hw, HV_TNCRS_LOWER, &phy_data); | 3869 | e1e_rphy(hw, HV_TNCRS_LOWER, &phy_data); |
3856 | } | 3870 | } |
3857 | } | 3871 | } |
3858 | 3872 | ||
@@ -3986,7 +4000,7 @@ struct e1000_info e1000_pch2_info = { | |||
3986 | | FLAG_APME_IN_WUC, | 4000 | | FLAG_APME_IN_WUC, |
3987 | .flags2 = FLAG2_HAS_PHY_STATS | 4001 | .flags2 = FLAG2_HAS_PHY_STATS |
3988 | | FLAG2_HAS_EEE, | 4002 | | FLAG2_HAS_EEE, |
3989 | .pba = 18, | 4003 | .pba = 26, |
3990 | .max_hw_frame_size = DEFAULT_JUMBO, | 4004 | .max_hw_frame_size = DEFAULT_JUMBO, |
3991 | .get_variants = e1000_get_variants_ich8lan, | 4005 | .get_variants = e1000_get_variants_ich8lan, |
3992 | .mac_ops = &ich8_mac_ops, | 4006 | .mac_ops = &ich8_mac_ops, |