diff options
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 150 |
1 files changed, 115 insertions, 35 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 99df2abf82a9..b6388b9535fd 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -122,6 +122,13 @@ | |||
122 | 122 | ||
123 | #define HV_LED_CONFIG PHY_REG(768, 30) /* LED Configuration */ | 123 | #define HV_LED_CONFIG PHY_REG(768, 30) /* LED Configuration */ |
124 | 124 | ||
125 | #define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in milliseconds */ | ||
126 | |||
127 | /* OEM Bits Phy Register */ | ||
128 | #define HV_OEM_BITS PHY_REG(768, 25) | ||
129 | #define HV_OEM_BITS_LPLU 0x0004 /* Low Power Link Up */ | ||
130 | #define HV_OEM_BITS_RESTART_AN 0x0400 /* Restart Auto-negotiation */ | ||
131 | |||
125 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ | 132 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ |
126 | /* Offset 04h HSFSTS */ | 133 | /* Offset 04h HSFSTS */ |
127 | union ich8_hws_flash_status { | 134 | union ich8_hws_flash_status { |
@@ -200,6 +207,7 @@ static s32 e1000_setup_led_pchlan(struct e1000_hw *hw); | |||
200 | static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw); | 207 | static s32 e1000_cleanup_led_pchlan(struct e1000_hw *hw); |
201 | static s32 e1000_led_on_pchlan(struct e1000_hw *hw); | 208 | static s32 e1000_led_on_pchlan(struct e1000_hw *hw); |
202 | static s32 e1000_led_off_pchlan(struct e1000_hw *hw); | 209 | static s32 e1000_led_off_pchlan(struct e1000_hw *hw); |
210 | static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); | ||
203 | 211 | ||
204 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) | 212 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) |
205 | { | 213 | { |
@@ -242,7 +250,11 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
242 | 250 | ||
243 | phy->ops.check_polarity = e1000_check_polarity_ife_ich8lan; | 251 | phy->ops.check_polarity = e1000_check_polarity_ife_ich8lan; |
244 | phy->ops.read_phy_reg = e1000_read_phy_reg_hv; | 252 | phy->ops.read_phy_reg = e1000_read_phy_reg_hv; |
253 | phy->ops.read_phy_reg_locked = e1000_read_phy_reg_hv_locked; | ||
254 | phy->ops.set_d0_lplu_state = e1000_set_lplu_state_pchlan; | ||
255 | phy->ops.set_d3_lplu_state = e1000_set_lplu_state_pchlan; | ||
245 | phy->ops.write_phy_reg = e1000_write_phy_reg_hv; | 256 | phy->ops.write_phy_reg = e1000_write_phy_reg_hv; |
257 | phy->ops.write_phy_reg_locked = e1000_write_phy_reg_hv_locked; | ||
246 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; | 258 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; |
247 | 259 | ||
248 | phy->id = e1000_phy_unknown; | 260 | phy->id = e1000_phy_unknown; |
@@ -303,6 +315,8 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw) | |||
303 | case IGP03E1000_E_PHY_ID: | 315 | case IGP03E1000_E_PHY_ID: |
304 | phy->type = e1000_phy_igp_3; | 316 | phy->type = e1000_phy_igp_3; |
305 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; | 317 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; |
318 | phy->ops.read_phy_reg_locked = e1000e_read_phy_reg_igp_locked; | ||
319 | phy->ops.write_phy_reg_locked = e1000e_write_phy_reg_igp_locked; | ||
306 | break; | 320 | break; |
307 | case IFE_E_PHY_ID: | 321 | case IFE_E_PHY_ID: |
308 | case IFE_PLUS_E_PHY_ID: | 322 | case IFE_PLUS_E_PHY_ID: |
@@ -568,12 +582,39 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter) | |||
568 | static DEFINE_MUTEX(nvm_mutex); | 582 | static DEFINE_MUTEX(nvm_mutex); |
569 | 583 | ||
570 | /** | 584 | /** |
585 | * e1000_acquire_nvm_ich8lan - Acquire NVM mutex | ||
586 | * @hw: pointer to the HW structure | ||
587 | * | ||
588 | * Acquires the mutex for performing NVM operations. | ||
589 | **/ | ||
590 | static s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw) | ||
591 | { | ||
592 | mutex_lock(&nvm_mutex); | ||
593 | |||
594 | return 0; | ||
595 | } | ||
596 | |||
597 | /** | ||
598 | * e1000_release_nvm_ich8lan - Release NVM mutex | ||
599 | * @hw: pointer to the HW structure | ||
600 | * | ||
601 | * Releases the mutex used while performing NVM operations. | ||
602 | **/ | ||
603 | static void e1000_release_nvm_ich8lan(struct e1000_hw *hw) | ||
604 | { | ||
605 | mutex_unlock(&nvm_mutex); | ||
606 | |||
607 | return; | ||
608 | } | ||
609 | |||
610 | static DEFINE_MUTEX(swflag_mutex); | ||
611 | |||
612 | /** | ||
571 | * e1000_acquire_swflag_ich8lan - Acquire software control flag | 613 | * e1000_acquire_swflag_ich8lan - Acquire software control flag |
572 | * @hw: pointer to the HW structure | 614 | * @hw: pointer to the HW structure |
573 | * | 615 | * |
574 | * Acquires the software control flag for performing NVM and PHY | 616 | * Acquires the software control flag for performing PHY and select |
575 | * operations. This is a function pointer entry point only called by | 617 | * MAC CSR accesses. |
576 | * read/write routines for the PHY and NVM parts. | ||
577 | **/ | 618 | **/ |
578 | static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) | 619 | static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) |
579 | { | 620 | { |
@@ -582,7 +623,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) | |||
582 | 623 | ||
583 | might_sleep(); | 624 | might_sleep(); |
584 | 625 | ||
585 | mutex_lock(&nvm_mutex); | 626 | mutex_lock(&swflag_mutex); |
586 | 627 | ||
587 | while (timeout) { | 628 | while (timeout) { |
588 | extcnf_ctrl = er32(EXTCNF_CTRL); | 629 | extcnf_ctrl = er32(EXTCNF_CTRL); |
@@ -599,7 +640,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) | |||
599 | goto out; | 640 | goto out; |
600 | } | 641 | } |
601 | 642 | ||
602 | timeout = PHY_CFG_TIMEOUT * 2; | 643 | timeout = SW_FLAG_TIMEOUT; |
603 | 644 | ||
604 | extcnf_ctrl |= E1000_EXTCNF_CTRL_SWFLAG; | 645 | extcnf_ctrl |= E1000_EXTCNF_CTRL_SWFLAG; |
605 | ew32(EXTCNF_CTRL, extcnf_ctrl); | 646 | ew32(EXTCNF_CTRL, extcnf_ctrl); |
@@ -623,7 +664,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) | |||
623 | 664 | ||
624 | out: | 665 | out: |
625 | if (ret_val) | 666 | if (ret_val) |
626 | mutex_unlock(&nvm_mutex); | 667 | mutex_unlock(&swflag_mutex); |
627 | 668 | ||
628 | return ret_val; | 669 | return ret_val; |
629 | } | 670 | } |
@@ -632,9 +673,8 @@ out: | |||
632 | * e1000_release_swflag_ich8lan - Release software control flag | 673 | * e1000_release_swflag_ich8lan - Release software control flag |
633 | * @hw: pointer to the HW structure | 674 | * @hw: pointer to the HW structure |
634 | * | 675 | * |
635 | * Releases the software control flag for performing NVM and PHY operations. | 676 | * Releases the software control flag for performing PHY and select |
636 | * This is a function pointer entry point only called by read/write | 677 | * MAC CSR accesses. |
637 | * routines for the PHY and NVM parts. | ||
638 | **/ | 678 | **/ |
639 | static void e1000_release_swflag_ich8lan(struct e1000_hw *hw) | 679 | static void e1000_release_swflag_ich8lan(struct e1000_hw *hw) |
640 | { | 680 | { |
@@ -644,7 +684,9 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw) | |||
644 | extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; | 684 | extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; |
645 | ew32(EXTCNF_CTRL, extcnf_ctrl); | 685 | ew32(EXTCNF_CTRL, extcnf_ctrl); |
646 | 686 | ||
647 | mutex_unlock(&nvm_mutex); | 687 | mutex_unlock(&swflag_mutex); |
688 | |||
689 | return; | ||
648 | } | 690 | } |
649 | 691 | ||
650 | /** | 692 | /** |
@@ -844,7 +886,7 @@ static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw) | |||
844 | u32 i; | 886 | u32 i; |
845 | u32 data, cnf_size, cnf_base_addr, sw_cfg_mask; | 887 | u32 data, cnf_size, cnf_base_addr, sw_cfg_mask; |
846 | s32 ret_val; | 888 | s32 ret_val; |
847 | u16 word_addr, reg_data, reg_addr, phy_page = 0; | 889 | u16 reg, word_addr, reg_data, reg_addr, phy_page = 0; |
848 | 890 | ||
849 | ret_val = e1000e_phy_hw_reset_generic(hw); | 891 | ret_val = e1000e_phy_hw_reset_generic(hw); |
850 | if (ret_val) | 892 | if (ret_val) |
@@ -859,6 +901,10 @@ static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw) | |||
859 | return ret_val; | 901 | return ret_val; |
860 | } | 902 | } |
861 | 903 | ||
904 | /* Dummy read to clear the phy wakeup bit after lcd reset */ | ||
905 | if (hw->mac.type == e1000_pchlan) | ||
906 | e1e_rphy(hw, BM_WUC, ®); | ||
907 | |||
862 | /* | 908 | /* |
863 | * Initialize the PHY from the NVM on ICH platforms. This | 909 | * Initialize the PHY from the NVM on ICH platforms. This |
864 | * is needed due to an issue where the NVM configuration is | 910 | * is needed due to an issue where the NVM configuration is |
@@ -1054,6 +1100,38 @@ static s32 e1000_check_polarity_ife_ich8lan(struct e1000_hw *hw) | |||
1054 | } | 1100 | } |
1055 | 1101 | ||
1056 | /** | 1102 | /** |
1103 | * e1000_set_lplu_state_pchlan - Set Low Power Link Up state | ||
1104 | * @hw: pointer to the HW structure | ||
1105 | * @active: true to enable LPLU, false to disable | ||
1106 | * | ||
1107 | * Sets the LPLU state according to the active flag. For PCH, if OEM write | ||
1108 | * bit are disabled in the NVM, writing the LPLU bits in the MAC will not set | ||
1109 | * the phy speed. This function will manually set the LPLU bit and restart | ||
1110 | * auto-neg as hw would do. D3 and D0 LPLU will call the same function | ||
1111 | * since it configures the same bit. | ||
1112 | **/ | ||
1113 | static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active) | ||
1114 | { | ||
1115 | s32 ret_val = 0; | ||
1116 | u16 oem_reg; | ||
1117 | |||
1118 | ret_val = e1e_rphy(hw, HV_OEM_BITS, &oem_reg); | ||
1119 | if (ret_val) | ||
1120 | goto out; | ||
1121 | |||
1122 | if (active) | ||
1123 | oem_reg |= HV_OEM_BITS_LPLU; | ||
1124 | else | ||
1125 | oem_reg &= ~HV_OEM_BITS_LPLU; | ||
1126 | |||
1127 | oem_reg |= HV_OEM_BITS_RESTART_AN; | ||
1128 | ret_val = e1e_wphy(hw, HV_OEM_BITS, oem_reg); | ||
1129 | |||
1130 | out: | ||
1131 | return ret_val; | ||
1132 | } | ||
1133 | |||
1134 | /** | ||
1057 | * e1000_set_d0_lplu_state_ich8lan - Set Low Power Linkup D0 state | 1135 | * e1000_set_d0_lplu_state_ich8lan - Set Low Power Linkup D0 state |
1058 | * @hw: pointer to the HW structure | 1136 | * @hw: pointer to the HW structure |
1059 | * @active: TRUE to enable LPLU, FALSE to disable | 1137 | * @active: TRUE to enable LPLU, FALSE to disable |
@@ -1314,12 +1392,11 @@ static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, | |||
1314 | if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) || | 1392 | if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) || |
1315 | (words == 0)) { | 1393 | (words == 0)) { |
1316 | hw_dbg(hw, "nvm parameter(s) out of bounds\n"); | 1394 | hw_dbg(hw, "nvm parameter(s) out of bounds\n"); |
1317 | return -E1000_ERR_NVM; | 1395 | ret_val = -E1000_ERR_NVM; |
1396 | goto out; | ||
1318 | } | 1397 | } |
1319 | 1398 | ||
1320 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 1399 | nvm->ops.acquire_nvm(hw); |
1321 | if (ret_val) | ||
1322 | goto out; | ||
1323 | 1400 | ||
1324 | ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); | 1401 | ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); |
1325 | if (ret_val) { | 1402 | if (ret_val) { |
@@ -1345,7 +1422,7 @@ static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, | |||
1345 | } | 1422 | } |
1346 | } | 1423 | } |
1347 | 1424 | ||
1348 | e1000_release_swflag_ich8lan(hw); | 1425 | nvm->ops.release_nvm(hw); |
1349 | 1426 | ||
1350 | out: | 1427 | out: |
1351 | if (ret_val) | 1428 | if (ret_val) |
@@ -1603,11 +1680,15 @@ static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, | |||
1603 | return -E1000_ERR_NVM; | 1680 | return -E1000_ERR_NVM; |
1604 | } | 1681 | } |
1605 | 1682 | ||
1683 | nvm->ops.acquire_nvm(hw); | ||
1684 | |||
1606 | for (i = 0; i < words; i++) { | 1685 | for (i = 0; i < words; i++) { |
1607 | dev_spec->shadow_ram[offset+i].modified = 1; | 1686 | dev_spec->shadow_ram[offset+i].modified = 1; |
1608 | dev_spec->shadow_ram[offset+i].value = data[i]; | 1687 | dev_spec->shadow_ram[offset+i].value = data[i]; |
1609 | } | 1688 | } |
1610 | 1689 | ||
1690 | nvm->ops.release_nvm(hw); | ||
1691 | |||
1611 | return 0; | 1692 | return 0; |
1612 | } | 1693 | } |
1613 | 1694 | ||
@@ -1637,9 +1718,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1637 | if (nvm->type != e1000_nvm_flash_sw) | 1718 | if (nvm->type != e1000_nvm_flash_sw) |
1638 | goto out; | 1719 | goto out; |
1639 | 1720 | ||
1640 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 1721 | nvm->ops.acquire_nvm(hw); |
1641 | if (ret_val) | ||
1642 | goto out; | ||
1643 | 1722 | ||
1644 | /* | 1723 | /* |
1645 | * We're writing to the opposite bank so if we're on bank 1, | 1724 | * We're writing to the opposite bank so if we're on bank 1, |
@@ -1657,7 +1736,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1657 | old_bank_offset = 0; | 1736 | old_bank_offset = 0; |
1658 | ret_val = e1000_erase_flash_bank_ich8lan(hw, 1); | 1737 | ret_val = e1000_erase_flash_bank_ich8lan(hw, 1); |
1659 | if (ret_val) { | 1738 | if (ret_val) { |
1660 | e1000_release_swflag_ich8lan(hw); | 1739 | nvm->ops.release_nvm(hw); |
1661 | goto out; | 1740 | goto out; |
1662 | } | 1741 | } |
1663 | } else { | 1742 | } else { |
@@ -1665,7 +1744,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1665 | new_bank_offset = 0; | 1744 | new_bank_offset = 0; |
1666 | ret_val = e1000_erase_flash_bank_ich8lan(hw, 0); | 1745 | ret_val = e1000_erase_flash_bank_ich8lan(hw, 0); |
1667 | if (ret_val) { | 1746 | if (ret_val) { |
1668 | e1000_release_swflag_ich8lan(hw); | 1747 | nvm->ops.release_nvm(hw); |
1669 | goto out; | 1748 | goto out; |
1670 | } | 1749 | } |
1671 | } | 1750 | } |
@@ -1723,7 +1802,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1723 | if (ret_val) { | 1802 | if (ret_val) { |
1724 | /* Possibly read-only, see e1000e_write_protect_nvm_ich8lan() */ | 1803 | /* Possibly read-only, see e1000e_write_protect_nvm_ich8lan() */ |
1725 | hw_dbg(hw, "Flash commit failed.\n"); | 1804 | hw_dbg(hw, "Flash commit failed.\n"); |
1726 | e1000_release_swflag_ich8lan(hw); | 1805 | nvm->ops.release_nvm(hw); |
1727 | goto out; | 1806 | goto out; |
1728 | } | 1807 | } |
1729 | 1808 | ||
@@ -1736,7 +1815,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1736 | act_offset = new_bank_offset + E1000_ICH_NVM_SIG_WORD; | 1815 | act_offset = new_bank_offset + E1000_ICH_NVM_SIG_WORD; |
1737 | ret_val = e1000_read_flash_word_ich8lan(hw, act_offset, &data); | 1816 | ret_val = e1000_read_flash_word_ich8lan(hw, act_offset, &data); |
1738 | if (ret_val) { | 1817 | if (ret_val) { |
1739 | e1000_release_swflag_ich8lan(hw); | 1818 | nvm->ops.release_nvm(hw); |
1740 | goto out; | 1819 | goto out; |
1741 | } | 1820 | } |
1742 | data &= 0xBFFF; | 1821 | data &= 0xBFFF; |
@@ -1744,7 +1823,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1744 | act_offset * 2 + 1, | 1823 | act_offset * 2 + 1, |
1745 | (u8)(data >> 8)); | 1824 | (u8)(data >> 8)); |
1746 | if (ret_val) { | 1825 | if (ret_val) { |
1747 | e1000_release_swflag_ich8lan(hw); | 1826 | nvm->ops.release_nvm(hw); |
1748 | goto out; | 1827 | goto out; |
1749 | } | 1828 | } |
1750 | 1829 | ||
@@ -1757,7 +1836,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1757 | act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1; | 1836 | act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1; |
1758 | ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0); | 1837 | ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0); |
1759 | if (ret_val) { | 1838 | if (ret_val) { |
1760 | e1000_release_swflag_ich8lan(hw); | 1839 | nvm->ops.release_nvm(hw); |
1761 | goto out; | 1840 | goto out; |
1762 | } | 1841 | } |
1763 | 1842 | ||
@@ -1767,7 +1846,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1767 | dev_spec->shadow_ram[i].value = 0xFFFF; | 1846 | dev_spec->shadow_ram[i].value = 0xFFFF; |
1768 | } | 1847 | } |
1769 | 1848 | ||
1770 | e1000_release_swflag_ich8lan(hw); | 1849 | nvm->ops.release_nvm(hw); |
1771 | 1850 | ||
1772 | /* | 1851 | /* |
1773 | * Reload the EEPROM, or else modifications will not appear | 1852 | * Reload the EEPROM, or else modifications will not appear |
@@ -1831,14 +1910,12 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw) | |||
1831 | **/ | 1910 | **/ |
1832 | void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw) | 1911 | void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw) |
1833 | { | 1912 | { |
1913 | struct e1000_nvm_info *nvm = &hw->nvm; | ||
1834 | union ich8_flash_protected_range pr0; | 1914 | union ich8_flash_protected_range pr0; |
1835 | union ich8_hws_flash_status hsfsts; | 1915 | union ich8_hws_flash_status hsfsts; |
1836 | u32 gfpreg; | 1916 | u32 gfpreg; |
1837 | s32 ret_val; | ||
1838 | 1917 | ||
1839 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 1918 | nvm->ops.acquire_nvm(hw); |
1840 | if (ret_val) | ||
1841 | return; | ||
1842 | 1919 | ||
1843 | gfpreg = er32flash(ICH_FLASH_GFPREG); | 1920 | gfpreg = er32flash(ICH_FLASH_GFPREG); |
1844 | 1921 | ||
@@ -1859,7 +1936,7 @@ void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw) | |||
1859 | hsfsts.hsf_status.flockdn = true; | 1936 | hsfsts.hsf_status.flockdn = true; |
1860 | ew32flash(ICH_FLASH_HSFSTS, hsfsts.regval); | 1937 | ew32flash(ICH_FLASH_HSFSTS, hsfsts.regval); |
1861 | 1938 | ||
1862 | e1000_release_swflag_ich8lan(hw); | 1939 | nvm->ops.release_nvm(hw); |
1863 | } | 1940 | } |
1864 | 1941 | ||
1865 | /** | 1942 | /** |
@@ -2229,6 +2306,7 @@ static s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw) | |||
2229 | **/ | 2306 | **/ |
2230 | static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | 2307 | static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) |
2231 | { | 2308 | { |
2309 | u16 reg; | ||
2232 | u32 ctrl, icr, kab; | 2310 | u32 ctrl, icr, kab; |
2233 | s32 ret_val; | 2311 | s32 ret_val; |
2234 | 2312 | ||
@@ -2304,6 +2382,9 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2304 | hw_dbg(hw, "Auto Read Done did not complete\n"); | 2382 | hw_dbg(hw, "Auto Read Done did not complete\n"); |
2305 | } | 2383 | } |
2306 | } | 2384 | } |
2385 | /* Dummy read to clear the phy wakeup bit after lcd reset */ | ||
2386 | if (hw->mac.type == e1000_pchlan) | ||
2387 | e1e_rphy(hw, BM_WUC, ®); | ||
2307 | 2388 | ||
2308 | /* | 2389 | /* |
2309 | * For PCH, this write will make sure that any noise | 2390 | * For PCH, this write will make sure that any noise |
@@ -2843,9 +2924,8 @@ void e1000e_disable_gig_wol_ich8lan(struct e1000_hw *hw) | |||
2843 | E1000_PHY_CTRL_GBE_DISABLE; | 2924 | E1000_PHY_CTRL_GBE_DISABLE; |
2844 | ew32(PHY_CTRL, phy_ctrl); | 2925 | ew32(PHY_CTRL, phy_ctrl); |
2845 | 2926 | ||
2846 | /* Workaround SWFLAG unexpectedly set during S0->Sx */ | ||
2847 | if (hw->mac.type == e1000_pchlan) | 2927 | if (hw->mac.type == e1000_pchlan) |
2848 | udelay(500); | 2928 | e1000_phy_hw_reset_ich8lan(hw); |
2849 | default: | 2929 | default: |
2850 | break; | 2930 | break; |
2851 | } | 2931 | } |
@@ -3113,9 +3193,9 @@ static struct e1000_phy_operations ich8_phy_ops = { | |||
3113 | }; | 3193 | }; |
3114 | 3194 | ||
3115 | static struct e1000_nvm_operations ich8_nvm_ops = { | 3195 | static struct e1000_nvm_operations ich8_nvm_ops = { |
3116 | .acquire_nvm = e1000_acquire_swflag_ich8lan, | 3196 | .acquire_nvm = e1000_acquire_nvm_ich8lan, |
3117 | .read_nvm = e1000_read_nvm_ich8lan, | 3197 | .read_nvm = e1000_read_nvm_ich8lan, |
3118 | .release_nvm = e1000_release_swflag_ich8lan, | 3198 | .release_nvm = e1000_release_nvm_ich8lan, |
3119 | .update_nvm = e1000_update_nvm_checksum_ich8lan, | 3199 | .update_nvm = e1000_update_nvm_checksum_ich8lan, |
3120 | .valid_led_default = e1000_valid_led_default_ich8lan, | 3200 | .valid_led_default = e1000_valid_led_default_ich8lan, |
3121 | .validate_nvm = e1000_validate_nvm_checksum_ich8lan, | 3201 | .validate_nvm = e1000_validate_nvm_checksum_ich8lan, |