Lines Matching +full:mac +full:- +full:phy +full:- +full:ctrl
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
42 * e1000_init_phy_params_82571 - Init PHY func ptrs.
47 struct e1000_phy_info *phy = &hw->phy; in e1000_init_phy_params_82571() local
50 if (hw->phy.media_type != e1000_media_type_copper) { in e1000_init_phy_params_82571()
51 phy->type = e1000_phy_none; in e1000_init_phy_params_82571()
55 phy->addr = 1; in e1000_init_phy_params_82571()
56 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; in e1000_init_phy_params_82571()
57 phy->reset_delay_us = 100; in e1000_init_phy_params_82571()
59 phy->ops.power_up = e1000_power_up_phy_copper; in e1000_init_phy_params_82571()
60 phy->ops.power_down = e1000_power_down_phy_copper_82571; in e1000_init_phy_params_82571()
62 switch (hw->mac.type) { in e1000_init_phy_params_82571()
65 phy->type = e1000_phy_igp_2; in e1000_init_phy_params_82571()
68 phy->type = e1000_phy_m88; in e1000_init_phy_params_82571()
72 phy->type = e1000_phy_bm; in e1000_init_phy_params_82571()
73 phy->ops.acquire = e1000_get_hw_semaphore_82574; in e1000_init_phy_params_82571()
74 phy->ops.release = e1000_put_hw_semaphore_82574; in e1000_init_phy_params_82571()
75 phy->ops.set_d0_lplu_state = e1000_set_d0_lplu_state_82574; in e1000_init_phy_params_82571()
76 phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574; in e1000_init_phy_params_82571()
79 return -E1000_ERR_PHY; in e1000_init_phy_params_82571()
85 e_dbg("Error getting PHY ID\n"); in e1000_init_phy_params_82571()
89 /* Verify phy id */ in e1000_init_phy_params_82571()
90 switch (hw->mac.type) { in e1000_init_phy_params_82571()
93 if (phy->id != IGP01E1000_I_PHY_ID) in e1000_init_phy_params_82571()
94 ret_val = -E1000_ERR_PHY; in e1000_init_phy_params_82571()
97 if (phy->id != M88E1111_I_PHY_ID) in e1000_init_phy_params_82571()
98 ret_val = -E1000_ERR_PHY; in e1000_init_phy_params_82571()
102 if (phy->id != BME1000_E_PHY_ID_R2) in e1000_init_phy_params_82571()
103 ret_val = -E1000_ERR_PHY; in e1000_init_phy_params_82571()
106 ret_val = -E1000_ERR_PHY; in e1000_init_phy_params_82571()
111 e_dbg("PHY ID unknown: type = 0x%08x\n", phy->id); in e1000_init_phy_params_82571()
117 * e1000_init_nvm_params_82571 - Init NVM func ptrs.
122 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_init_nvm_params_82571()
126 nvm->opcode_bits = 8; in e1000_init_nvm_params_82571()
127 nvm->delay_usec = 1; in e1000_init_nvm_params_82571()
128 switch (nvm->override) { in e1000_init_nvm_params_82571()
130 nvm->page_size = 32; in e1000_init_nvm_params_82571()
131 nvm->address_bits = 16; in e1000_init_nvm_params_82571()
134 nvm->page_size = 8; in e1000_init_nvm_params_82571()
135 nvm->address_bits = 8; in e1000_init_nvm_params_82571()
138 nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8; in e1000_init_nvm_params_82571()
139 nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8; in e1000_init_nvm_params_82571()
143 switch (hw->mac.type) { in e1000_init_nvm_params_82571()
148 nvm->type = e1000_nvm_flash_hw; in e1000_init_nvm_params_82571()
149 nvm->word_size = 2048; in e1000_init_nvm_params_82571()
159 nvm->type = e1000_nvm_eeprom_spi; in e1000_init_nvm_params_82571()
161 /* Added to a constant, "size" becomes the left-shift value in e1000_init_nvm_params_82571()
169 nvm->word_size = BIT(size); in e1000_init_nvm_params_82571()
174 switch (hw->mac.type) { in e1000_init_nvm_params_82571()
177 nvm->ops.acquire = e1000_get_hw_semaphore_82574; in e1000_init_nvm_params_82571()
178 nvm->ops.release = e1000_put_hw_semaphore_82574; in e1000_init_nvm_params_82571()
188 * e1000_init_mac_params_82571 - Init MAC func ptrs.
193 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_82571() local
198 /* Set media type and media-dependent function pointers */ in e1000_init_mac_params_82571()
199 switch (hw->adapter->pdev->device) { in e1000_init_mac_params_82571()
203 hw->phy.media_type = e1000_media_type_fiber; in e1000_init_mac_params_82571()
204 mac->ops.setup_physical_interface = in e1000_init_mac_params_82571()
206 mac->ops.check_for_link = e1000e_check_for_fiber_link; in e1000_init_mac_params_82571()
207 mac->ops.get_link_up_info = in e1000_init_mac_params_82571()
214 hw->phy.media_type = e1000_media_type_internal_serdes; in e1000_init_mac_params_82571()
215 mac->ops.setup_physical_interface = in e1000_init_mac_params_82571()
217 mac->ops.check_for_link = e1000_check_for_serdes_link_82571; in e1000_init_mac_params_82571()
218 mac->ops.get_link_up_info = in e1000_init_mac_params_82571()
222 hw->phy.media_type = e1000_media_type_copper; in e1000_init_mac_params_82571()
223 mac->ops.setup_physical_interface = in e1000_init_mac_params_82571()
225 mac->ops.check_for_link = e1000e_check_for_copper_link; in e1000_init_mac_params_82571()
226 mac->ops.get_link_up_info = e1000e_get_speed_and_duplex_copper; in e1000_init_mac_params_82571()
231 mac->mta_reg_count = 128; in e1000_init_mac_params_82571()
233 mac->rar_entry_count = E1000_RAR_ENTRIES; in e1000_init_mac_params_82571()
235 mac->adaptive_ifs = true; in e1000_init_mac_params_82571()
237 /* MAC-specific function pointers */ in e1000_init_mac_params_82571()
238 switch (hw->mac.type) { in e1000_init_mac_params_82571()
240 mac->ops.set_lan_id = e1000_set_lan_id_single_port; in e1000_init_mac_params_82571()
241 mac->ops.check_mng_mode = e1000e_check_mng_mode_generic; in e1000_init_mac_params_82571()
242 mac->ops.led_on = e1000e_led_on_generic; in e1000_init_mac_params_82571()
243 mac->ops.blink_led = e1000e_blink_led_generic; in e1000_init_mac_params_82571()
246 mac->has_fwsm = true; in e1000_init_mac_params_82571()
250 mac->arc_subsystem_valid = !!(er32(FWSM) & in e1000_init_mac_params_82571()
255 mac->ops.set_lan_id = e1000_set_lan_id_single_port; in e1000_init_mac_params_82571()
256 mac->ops.check_mng_mode = e1000_check_mng_mode_82574; in e1000_init_mac_params_82571()
257 mac->ops.led_on = e1000_led_on_82574; in e1000_init_mac_params_82571()
260 mac->ops.check_mng_mode = e1000e_check_mng_mode_generic; in e1000_init_mac_params_82571()
261 mac->ops.led_on = e1000e_led_on_generic; in e1000_init_mac_params_82571()
262 mac->ops.blink_led = e1000e_blink_led_generic; in e1000_init_mac_params_82571()
265 mac->has_fwsm = true; in e1000_init_mac_params_82571()
269 /* Ensure that the inter-port SWSM.SMBI lock bit is clear before in e1000_init_mac_params_82571()
270 * first NVM or PHY access. This should be done for single-port in e1000_init_mac_params_82571()
271 * devices, and for one port only on dual-port devices so that in e1000_init_mac_params_82571()
273 * inter-port accesses to the PHY & NVM. in e1000_init_mac_params_82571()
275 switch (hw->mac.type) { in e1000_init_mac_params_82571()
307 hw->dev_spec.e82571.smb_counter = 0; in e1000_init_mac_params_82571()
314 struct e1000_hw *hw = &adapter->hw; in e1000_get_variants_82571()
316 struct pci_dev *pdev = adapter->pdev; in e1000_get_variants_82571()
333 switch (pdev->device) { in e1000_get_variants_82571()
338 adapter->flags |= FLAG_IS_QUAD_PORT; in e1000_get_variants_82571()
341 adapter->flags |= FLAG_IS_QUAD_PORT_A; in e1000_get_variants_82571()
351 switch (adapter->hw.mac.type) { in e1000_get_variants_82571()
354 if (((pdev->device == E1000_DEV_ID_82571EB_FIBER) || in e1000_get_variants_82571()
355 (pdev->device == E1000_DEV_ID_82571EB_SERDES) || in e1000_get_variants_82571()
356 (pdev->device == E1000_DEV_ID_82571EB_COPPER)) && in e1000_get_variants_82571()
358 adapter->flags &= ~FLAG_HAS_WOL; in e1000_get_variants_82571()
360 if (adapter->flags & FLAG_IS_QUAD_PORT && in e1000_get_variants_82571()
361 (!(adapter->flags & FLAG_IS_QUAD_PORT_A))) in e1000_get_variants_82571()
362 adapter->flags &= ~FLAG_HAS_WOL; in e1000_get_variants_82571()
364 if (pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD) in e1000_get_variants_82571()
365 adapter->flags &= ~FLAG_HAS_WOL; in e1000_get_variants_82571()
368 if (pdev->device == E1000_DEV_ID_82573L) { in e1000_get_variants_82571()
369 adapter->flags |= FLAG_HAS_JUMBO_FRAMES; in e1000_get_variants_82571()
370 adapter->max_hw_frame_size = DEFAULT_JUMBO; in e1000_get_variants_82571()
381 * e1000_get_phy_id_82571 - Retrieve the PHY ID and revision
384 * Reads the PHY registers and stores the PHY ID and possibly the PHY
389 struct e1000_phy_info *phy = &hw->phy; in e1000_get_phy_id_82571() local
393 switch (hw->mac.type) { in e1000_get_phy_id_82571()
396 /* The 82571 firmware may still be configuring the PHY. in e1000_get_phy_id_82571()
397 * In this case, we cannot access the PHY until the in e1000_get_phy_id_82571()
399 * PHY ID. in e1000_get_phy_id_82571()
401 phy->id = IGP01E1000_I_PHY_ID; in e1000_get_phy_id_82571()
411 phy->id = (u32)(phy_id << 16); in e1000_get_phy_id_82571()
417 phy->id |= (u32)(phy_id); in e1000_get_phy_id_82571()
418 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); in e1000_get_phy_id_82571()
421 return -E1000_ERR_PHY; in e1000_get_phy_id_82571()
428 * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore
431 * Acquire the HW semaphore to access the PHY or NVM
436 s32 sw_timeout = hw->nvm.word_size + 1; in e1000_get_hw_semaphore_82571()
437 s32 fw_timeout = hw->nvm.word_size + 1; in e1000_get_hw_semaphore_82571()
441 * the inter-port SMBI semaphore, there is old code in e1000_get_hw_semaphore_82571()
447 if (hw->dev_spec.e82571.smb_counter > 2) in e1000_get_hw_semaphore_82571()
461 e_dbg("Driver can't access device - SMBI bit is set.\n"); in e1000_get_hw_semaphore_82571()
462 hw->dev_spec.e82571.smb_counter++; in e1000_get_hw_semaphore_82571()
480 return -E1000_ERR_NVM; in e1000_get_hw_semaphore_82571()
487 * e1000_put_hw_semaphore_82571 - Release hardware semaphore
490 * Release hardware semaphore used to access the PHY or NVM
502 * e1000_get_hw_semaphore_82573 - Acquire hardware semaphore
529 e_dbg("Driver can't access the PHY\n"); in e1000_get_hw_semaphore_82573()
530 return -E1000_ERR_PHY; in e1000_get_hw_semaphore_82573()
537 * e1000_put_hw_semaphore_82573 - Release hardware semaphore
555 * e1000_get_hw_semaphore_82574 - Acquire hardware semaphore
558 * Acquire the HW semaphore to access the PHY or NVM.
573 * e1000_put_hw_semaphore_82574 - Release hardware semaphore
576 * Release hardware semaphore used to access the PHY or NVM
586 * e1000_set_d0_lplu_state_82574 - Set Low Power Linkup D0 state
595 * PHY setup routines.
611 * e1000_set_d3_lplu_state_82574 - Sets low power link up state for D3
627 } else if ((hw->phy.autoneg_advertised == E1000_ALL_SPEED_DUPLEX) || in e1000_set_d3_lplu_state_82574()
628 (hw->phy.autoneg_advertised == E1000_ALL_NOT_GIG) || in e1000_set_d3_lplu_state_82574()
629 (hw->phy.autoneg_advertised == E1000_ALL_10_SPEED)) { in e1000_set_d3_lplu_state_82574()
638 * e1000_acquire_nvm_82571 - Request for access to the EEPROM
642 * Then for non-82573 hardware, set the EEPROM access request bit and wait
654 switch (hw->mac.type) { in e1000_acquire_nvm_82571()
669 * e1000_release_nvm_82571 - Release exclusive access to EEPROM
681 * e1000_write_nvm_82571 - Write to EEPROM using appropriate interface
687 * For non-82573 silicon, write data to EEPROM at offset using SPI interface.
697 switch (hw->mac.type) { in e1000_write_nvm_82571()
708 ret_val = -E1000_ERR_NVM; in e1000_write_nvm_82571()
716 * e1000_update_nvm_checksum_82571 - Update EEPROM checksum
736 if (hw->nvm.type != e1000_nvm_flash_hw) in e1000_update_nvm_checksum_82571()
747 return -E1000_ERR_NVM; in e1000_update_nvm_checksum_82571()
770 return -E1000_ERR_NVM; in e1000_update_nvm_checksum_82571()
776 * e1000_validate_nvm_checksum_82571 - Validate EEPROM checksum
784 if (hw->nvm.type == e1000_nvm_flash_hw) in e1000_validate_nvm_checksum_82571()
791 * e1000_write_nvm_eewr_82571 - Write to EEPROM for 82573 silicon
807 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_write_nvm_eewr_82571()
814 if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) || in e1000_write_nvm_eewr_82571()
817 return -E1000_ERR_NVM; in e1000_write_nvm_eewr_82571()
840 * e1000_get_cfg_done_82571 - Poll for configuration done
853 timeout--; in e1000_get_cfg_done_82571()
857 return -E1000_ERR_RESET; in e1000_get_cfg_done_82571()
864 * e1000_set_d0_lplu_state_82571 - Set Low Power Linkup D0 state
872 * pointer entry point only called by PHY setup routines.
876 struct e1000_phy_info *phy = &hw->phy; in e1000_set_d0_lplu_state_82571() local
908 if (phy->smart_speed == e1000_smart_speed_on) { in e1000_set_d0_lplu_state_82571()
919 } else if (phy->smart_speed == e1000_smart_speed_off) { in e1000_set_d0_lplu_state_82571()
937 * e1000_reset_hw_82571 - Reset hardware
944 u32 ctrl, ctrl_ext, eecd, tctl; in e1000_reset_hw_82571() local
947 /* Prevent the PCI-E bus from sticking if there is no TLP connection in e1000_reset_hw_82571()
948 * on the last TLP read/write transaction when MAC is reset. in e1000_reset_hw_82571()
952 e_dbg("PCI-E Master disable polling has failed.\n"); in e1000_reset_hw_82571()
965 /* Must acquire the MDIO ownership before MAC reset. in e1000_reset_hw_82571()
968 switch (hw->mac.type) { in e1000_reset_hw_82571()
980 ctrl = er32(CTRL); in e1000_reset_hw_82571()
982 e_dbg("Issuing a global reset to MAC\n"); in e1000_reset_hw_82571()
983 ew32(CTRL, ctrl | E1000_CTRL_RST); in e1000_reset_hw_82571()
985 /* Must release MDIO ownership and mutex after MAC reset. */ in e1000_reset_hw_82571()
986 switch (hw->mac.type) { in e1000_reset_hw_82571()
1002 if (hw->nvm.type == e1000_nvm_flash_hw) { in e1000_reset_hw_82571()
1012 /* We don't want to continue accessing MAC registers. */ in e1000_reset_hw_82571()
1015 /* Phy configuration from NVM just starts after EECD_AUTO_RD is set. in e1000_reset_hw_82571()
1016 * Need to wait for Phy configuration completion before accessing in e1000_reset_hw_82571()
1017 * NVM and Phy. in e1000_reset_hw_82571()
1020 switch (hw->mac.type) { in e1000_reset_hw_82571()
1043 if (hw->mac.type == e1000_82571) { in e1000_reset_hw_82571()
1044 /* Install any alternate MAC address into RAR0 */ in e1000_reset_hw_82571()
1053 if (hw->phy.media_type == e1000_media_type_internal_serdes) in e1000_reset_hw_82571()
1054 hw->mac.serdes_link_state = e1000_serdes_link_down; in e1000_reset_hw_82571()
1060 * e1000_init_hw_82571 - Initialize hardware
1067 struct e1000_mac_info *mac = &hw->mac; in e1000_init_hw_82571() local
1070 u16 i, rar_count = mac->rar_entry_count; in e1000_init_hw_82571()
1075 ret_val = mac->ops.id_led_init(hw); in e1000_init_hw_82571()
1082 mac->ops.clear_vfta(hw); in e1000_init_hw_82571()
1087 * resetting one port will reload the MAC on the other port. in e1000_init_hw_82571()
1090 rar_count--; in e1000_init_hw_82571()
1095 for (i = 0; i < mac->mta_reg_count; i++) in e1000_init_hw_82571()
1099 ret_val = mac->ops.setup_link(hw); in e1000_init_hw_82571()
1101 /* Set the transmit descriptor write-back policy */ in e1000_init_hw_82571()
1108 switch (mac->type) { in e1000_init_hw_82571()
1138 * e1000_initialize_hw_bits_82571 - Initialize hardware-dependent bits
1141 * Initializes required hardware-dependent bits needed for normal operation.
1160 switch (hw->mac.type) { in e1000_initialize_hw_bits_82571()
1176 switch (hw->mac.type) { in e1000_initialize_hw_bits_82571()
1192 switch (hw->mac.type) { in e1000_initialize_hw_bits_82571()
1196 reg = er32(CTRL); in e1000_initialize_hw_bits_82571()
1198 ew32(CTRL, reg); in e1000_initialize_hw_bits_82571()
1205 switch (hw->mac.type) { in e1000_initialize_hw_bits_82571()
1218 if (hw->mac.type == e1000_82571) { in e1000_initialize_hw_bits_82571()
1227 if ((hw->mac.type == e1000_82571) || (hw->mac.type == e1000_82572)) { in e1000_initialize_hw_bits_82571()
1236 if (hw->mac.type <= e1000_82573) { in e1000_initialize_hw_bits_82571()
1242 /* PCI-Ex Control Registers */ in e1000_initialize_hw_bits_82571()
1243 switch (hw->mac.type) { in e1000_initialize_hw_bits_82571()
1266 * e1000_clear_vfta_82571 - Clear VLAN filter table
1279 switch (hw->mac.type) { in e1000_clear_vfta_82571()
1283 if (hw->mng_cookie.vlan_id != 0) { in e1000_clear_vfta_82571()
1284 /* The VFTA is a 4096b bit-field, each identifying in e1000_clear_vfta_82571()
1290 vfta_offset = (hw->mng_cookie.vlan_id >> in e1000_clear_vfta_82571()
1294 BIT(hw->mng_cookie.vlan_id & in e1000_clear_vfta_82571()
1313 * e1000_check_mng_mode_82574 - Check manageability is enabled
1328 * e1000_led_on_82574 - Turn LED on
1335 u32 ctrl; in e1000_led_on_82574() local
1338 ctrl = hw->mac.ledctl_mode2; in e1000_led_on_82574()
1344 if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) == in e1000_led_on_82574()
1346 ctrl |= (E1000_LEDCTL_LED0_IVRT << (i * 8)); in e1000_led_on_82574()
1348 ew32(LEDCTL, ctrl); in e1000_led_on_82574()
1354 * e1000_check_phy_82574 - check 82574 phy hung state
1357 * Returns whether phy is hung or not
1365 /* Read PHY Receive Error counter first, if its is max - all F's then in e1000_check_phy_82574()
1366 * read the Base1000T status register If both are max then PHY is hung. in e1000_check_phy_82574()
1384 * e1000_setup_link_82571 - Setup flow control and link settings
1388 * control. Calls the appropriate media-specific link configuration
1399 switch (hw->mac.type) { in e1000_setup_link_82571()
1403 if (hw->fc.requested_mode == e1000_fc_default) in e1000_setup_link_82571()
1404 hw->fc.requested_mode = e1000_fc_full; in e1000_setup_link_82571()
1414 * e1000_setup_copper_link_82571 - Configure copper link settings
1417 * Configures the link for auto-neg or forced speed and duplex. Then we check
1423 u32 ctrl; in e1000_setup_copper_link_82571() local
1426 ctrl = er32(CTRL); in e1000_setup_copper_link_82571()
1427 ctrl |= E1000_CTRL_SLU; in e1000_setup_copper_link_82571()
1428 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); in e1000_setup_copper_link_82571()
1429 ew32(CTRL, ctrl); in e1000_setup_copper_link_82571()
1431 switch (hw->phy.type) { in e1000_setup_copper_link_82571()
1440 return -E1000_ERR_PHY; in e1000_setup_copper_link_82571()
1450 * e1000_setup_fiber_serdes_link_82571 - Setup link for fiber/serdes
1458 switch (hw->mac.type) { in e1000_setup_fiber_serdes_link_82571()
1477 * e1000_check_for_serdes_link_82571 - Check for link (Serdes)
1497 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_serdes_link_82571() local
1499 u32 ctrl; in e1000_check_for_serdes_link_82571() local
1505 ctrl = er32(CTRL); in e1000_check_for_serdes_link_82571()
1514 switch (mac->serdes_link_state) { in e1000_check_for_serdes_link_82571()
1520 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1522 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1523 e_dbg("AN_UP -> AN_PROG\n"); in e1000_check_for_serdes_link_82571()
1525 mac->serdes_has_link = true; in e1000_check_for_serdes_link_82571()
1530 /* If we are receiving /C/ ordered sets, re-enable in e1000_check_for_serdes_link_82571()
1531 * auto-negotiation in the TXCW register and disable in e1000_check_for_serdes_link_82571()
1533 * attempt to auto-negotiate with our link partner. in e1000_check_for_serdes_link_82571()
1537 ew32(TXCW, mac->txcw); in e1000_check_for_serdes_link_82571()
1538 ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); in e1000_check_for_serdes_link_82571()
1539 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1541 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1542 e_dbg("FORCED_UP -> AN_PROG\n"); in e1000_check_for_serdes_link_82571()
1544 mac->serdes_has_link = true; in e1000_check_for_serdes_link_82571()
1555 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1557 e_dbg("AN_PROG -> AN_UP\n"); in e1000_check_for_serdes_link_82571()
1558 mac->serdes_has_link = true; in e1000_check_for_serdes_link_82571()
1561 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1563 e_dbg("AN_PROG -> DOWN\n"); in e1000_check_for_serdes_link_82571()
1570 ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000_check_for_serdes_link_82571()
1571 ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD); in e1000_check_for_serdes_link_82571()
1572 ew32(CTRL, ctrl); in e1000_check_for_serdes_link_82571()
1580 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1582 mac->serdes_has_link = true; in e1000_check_for_serdes_link_82571()
1583 e_dbg("AN_PROG -> FORCED_UP\n"); in e1000_check_for_serdes_link_82571()
1593 ew32(TXCW, mac->txcw); in e1000_check_for_serdes_link_82571()
1594 ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); in e1000_check_for_serdes_link_82571()
1595 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1597 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1598 e_dbg("DOWN -> AN_PROG\n"); in e1000_check_for_serdes_link_82571()
1603 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1604 mac->serdes_link_state = e1000_serdes_link_down; in e1000_check_for_serdes_link_82571()
1605 e_dbg("ANYSTATE -> DOWN\n"); in e1000_check_for_serdes_link_82571()
1619 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1620 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1622 e_dbg("ANYSTATE -> DOWN\n"); in e1000_check_for_serdes_link_82571()
1631 mac->serdes_link_state = in e1000_check_for_serdes_link_82571()
1633 mac->serdes_has_link = false; in e1000_check_for_serdes_link_82571()
1634 e_dbg("ANYSTATE -> AN_PROG\n"); in e1000_check_for_serdes_link_82571()
1643 * e1000_valid_led_default_82571 - Verify a valid default LED config
1660 switch (hw->mac.type) { in e1000_valid_led_default_82571()
1678 * e1000e_get_laa_state_82571 - Get locally administered address state
1685 if (hw->mac.type != e1000_82571) in e1000e_get_laa_state_82571()
1688 return hw->dev_spec.e82571.laa_is_present; in e1000e_get_laa_state_82571()
1692 * e1000e_set_laa_state_82571 - Set locally administered address state
1700 if (hw->mac.type != e1000_82571) in e1000e_set_laa_state_82571()
1703 hw->dev_spec.e82571.laa_is_present = state; in e1000e_set_laa_state_82571()
1713 hw->mac.ops.rar_set(hw, hw->mac.addr, in e1000e_set_laa_state_82571()
1714 hw->mac.rar_entry_count - 1); in e1000e_set_laa_state_82571()
1718 * e1000_fix_nvm_checksum_82571 - Fix EEPROM checksum
1729 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_fix_nvm_checksum_82571()
1733 if (nvm->type != e1000_nvm_flash_hw) in e1000_fix_nvm_checksum_82571()
1737 * 10h-12h. Checksum may need to be fixed. in e1000_fix_nvm_checksum_82571()
1770 * e1000_read_mac_addr_82571 - Read device MAC address
1775 if (hw->mac.type == e1000_82571) { in e1000_read_mac_addr_82571()
1778 /* If there's an alternate MAC address place it in RAR0 in e1000_read_mac_addr_82571()
1791 * e1000_power_down_phy_copper_82571 - Remove link during PHY power down
1794 * In the case of a PHY power down to save power, or to turn off link during a
1799 struct e1000_phy_info *phy = &hw->phy; in e1000_power_down_phy_copper_82571() local
1800 struct e1000_mac_info *mac = &hw->mac; in e1000_power_down_phy_copper_82571() local
1802 if (!phy->ops.check_reset_block) in e1000_power_down_phy_copper_82571()
1806 if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw))) in e1000_power_down_phy_copper_82571()
1811 * e1000_clear_hw_cntrs_82571 - Clear device specific hardware counters
1857 /* .check_mng_mode: mac type dependent */
1865 /* .led_on: mac type dependent */
1947 .mac = e1000_82571,
1968 .mac = e1000_82572,
1986 .mac = e1000_82573,
2004 .mac = e1000_82574,
2029 .mac = e1000_82583,