Lines Matching +full:mac +full:-
2 SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
53 * ixgbe_init_ops_X540 - Inits func ptrs and MAC type
56 * Initialize the function pointers and assign the MAC type for X540.
61 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X540() local
62 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_init_ops_X540()
63 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_ops_X540()
74 eeprom->ops.init_params = ixgbe_init_eeprom_params_X540; in ixgbe_init_ops_X540()
75 eeprom->ops.read = ixgbe_read_eerd_X540; in ixgbe_init_ops_X540()
76 eeprom->ops.read_buffer = ixgbe_read_eerd_buffer_X540; in ixgbe_init_ops_X540()
77 eeprom->ops.write = ixgbe_write_eewr_X540; in ixgbe_init_ops_X540()
78 eeprom->ops.write_buffer = ixgbe_write_eewr_buffer_X540; in ixgbe_init_ops_X540()
79 eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X540; in ixgbe_init_ops_X540()
80 eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X540; in ixgbe_init_ops_X540()
81 eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X540; in ixgbe_init_ops_X540()
84 phy->ops.init = ixgbe_init_phy_ops_generic; in ixgbe_init_ops_X540()
85 phy->ops.reset = NULL; in ixgbe_init_ops_X540()
86 phy->ops.set_phy_power = ixgbe_set_copper_phy_power; in ixgbe_init_ops_X540()
88 /* MAC */ in ixgbe_init_ops_X540()
89 mac->ops.reset_hw = ixgbe_reset_hw_X540; in ixgbe_init_ops_X540()
90 mac->ops.enable_relaxed_ordering = ixgbe_enable_relaxed_ordering_gen2; in ixgbe_init_ops_X540()
91 mac->ops.get_media_type = ixgbe_get_media_type_X540; in ixgbe_init_ops_X540()
92 mac->ops.get_supported_physical_layer = in ixgbe_init_ops_X540()
94 mac->ops.read_analog_reg8 = NULL; in ixgbe_init_ops_X540()
95 mac->ops.write_analog_reg8 = NULL; in ixgbe_init_ops_X540()
96 mac->ops.start_hw = ixgbe_start_hw_X540; in ixgbe_init_ops_X540()
97 mac->ops.get_san_mac_addr = ixgbe_get_san_mac_addr_generic; in ixgbe_init_ops_X540()
98 mac->ops.set_san_mac_addr = ixgbe_set_san_mac_addr_generic; in ixgbe_init_ops_X540()
99 mac->ops.get_device_caps = ixgbe_get_device_caps_generic; in ixgbe_init_ops_X540()
100 mac->ops.get_wwn_prefix = ixgbe_get_wwn_prefix_generic; in ixgbe_init_ops_X540()
101 mac->ops.get_fcoe_boot_status = ixgbe_get_fcoe_boot_status_generic; in ixgbe_init_ops_X540()
102 mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X540; in ixgbe_init_ops_X540()
103 mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X540; in ixgbe_init_ops_X540()
104 mac->ops.init_swfw_sync = ixgbe_init_swfw_sync_X540; in ixgbe_init_ops_X540()
105 mac->ops.disable_sec_rx_path = ixgbe_disable_sec_rx_path_generic; in ixgbe_init_ops_X540()
106 mac->ops.enable_sec_rx_path = ixgbe_enable_sec_rx_path_generic; in ixgbe_init_ops_X540()
109 mac->ops.set_vmdq = ixgbe_set_vmdq_generic; in ixgbe_init_ops_X540()
110 mac->ops.set_vmdq_san_mac = ixgbe_set_vmdq_san_mac_generic; in ixgbe_init_ops_X540()
111 mac->ops.clear_vmdq = ixgbe_clear_vmdq_generic; in ixgbe_init_ops_X540()
112 mac->ops.insert_mac_addr = ixgbe_insert_mac_addr_generic; in ixgbe_init_ops_X540()
113 mac->rar_highwater = 1; in ixgbe_init_ops_X540()
114 mac->ops.set_vfta = ixgbe_set_vfta_generic; in ixgbe_init_ops_X540()
115 mac->ops.set_vlvf = ixgbe_set_vlvf_generic; in ixgbe_init_ops_X540()
116 mac->ops.clear_vfta = ixgbe_clear_vfta_generic; in ixgbe_init_ops_X540()
117 mac->ops.init_uta_tables = ixgbe_init_uta_tables_generic; in ixgbe_init_ops_X540()
118 mac->ops.set_mac_anti_spoofing = ixgbe_set_mac_anti_spoofing; in ixgbe_init_ops_X540()
119 mac->ops.set_vlan_anti_spoofing = ixgbe_set_vlan_anti_spoofing; in ixgbe_init_ops_X540()
122 mac->ops.get_link_capabilities = in ixgbe_init_ops_X540()
124 mac->ops.setup_link = ixgbe_setup_mac_link_X540; in ixgbe_init_ops_X540()
125 mac->ops.setup_rxpba = ixgbe_set_rxpba_generic; in ixgbe_init_ops_X540()
126 mac->ops.check_link = ixgbe_check_mac_link_generic; in ixgbe_init_ops_X540()
127 mac->ops.bypass_rw = ixgbe_bypass_rw_generic; in ixgbe_init_ops_X540()
128 mac->ops.bypass_valid_rd = ixgbe_bypass_valid_rd_generic; in ixgbe_init_ops_X540()
129 mac->ops.bypass_set = ixgbe_bypass_set_generic; in ixgbe_init_ops_X540()
130 mac->ops.bypass_rd_eep = ixgbe_bypass_rd_eep_generic; in ixgbe_init_ops_X540()
133 mac->mcft_size = IXGBE_X540_MC_TBL_SIZE; in ixgbe_init_ops_X540()
134 mac->vft_size = IXGBE_X540_VFT_TBL_SIZE; in ixgbe_init_ops_X540()
135 mac->num_rar_entries = IXGBE_X540_RAR_ENTRIES; in ixgbe_init_ops_X540()
136 mac->rx_pb_size = IXGBE_X540_RX_PB_SIZE; in ixgbe_init_ops_X540()
137 mac->max_rx_queues = IXGBE_X540_MAX_RX_QUEUES; in ixgbe_init_ops_X540()
138 mac->max_tx_queues = IXGBE_X540_MAX_TX_QUEUES; in ixgbe_init_ops_X540()
139 mac->max_msix_vectors = ixgbe_get_pcie_msix_count_generic(hw); in ixgbe_init_ops_X540()
146 mac->arc_subsystem_valid = !!(IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw)) in ixgbe_init_ops_X540()
150 hw->mbx.ops[i].init_params = ixgbe_init_mbx_params_pf; in ixgbe_init_ops_X540()
153 mac->ops.blink_led_start = ixgbe_blink_led_start_X540; in ixgbe_init_ops_X540()
154 mac->ops.blink_led_stop = ixgbe_blink_led_stop_X540; in ixgbe_init_ops_X540()
157 mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_generic; in ixgbe_init_ops_X540()
159 mac->ops.get_rtrup2tc = ixgbe_dcb_get_rtrup2tc_generic; in ixgbe_init_ops_X540()
165 * ixgbe_get_link_capabilities_X540 - Determines link capabilities
182 * ixgbe_get_media_type_X540 - Get media type
194 * ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities
204 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete); in ixgbe_setup_mac_link_X540()
208 * ixgbe_reset_hw_X540 - Perform hardware reset
218 u32 swfw_mask = hw->phy.phy_semaphore_mask; in ixgbe_reset_hw_X540()
223 status = hw->mac.ops.stop_adapter(hw); in ixgbe_reset_hw_X540()
231 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X540()
241 hw->mac.ops.release_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X540()
243 /* Poll for reset bit to self-clear indicating reset is complete */ in ixgbe_reset_hw_X540()
263 if (hw->mac.flags & IXGBE_FLAGS_DOUBLE_RESET_REQUIRED) { in ixgbe_reset_hw_X540()
264 hw->mac.flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; in ixgbe_reset_hw_X540()
271 /* Store the permanent mac address */ in ixgbe_reset_hw_X540()
272 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); in ixgbe_reset_hw_X540()
275 * Store MAC address from RAR0, clear receive address registers, and in ixgbe_reset_hw_X540()
277 * since we modify this value when programming the SAN MAC address. in ixgbe_reset_hw_X540()
279 hw->mac.num_rar_entries = 128; in ixgbe_reset_hw_X540()
280 hw->mac.ops.init_rx_addrs(hw); in ixgbe_reset_hw_X540()
282 /* Store the permanent SAN mac address */ in ixgbe_reset_hw_X540()
283 hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); in ixgbe_reset_hw_X540()
285 /* Add the SAN MAC address to the RAR only if it's a valid address */ in ixgbe_reset_hw_X540()
286 if (ixgbe_validate_mac_addr(hw->mac.san_addr) == 0) { in ixgbe_reset_hw_X540()
287 /* Save the SAN MAC RAR index */ in ixgbe_reset_hw_X540()
288 hw->mac.san_mac_rar_index = hw->mac.num_rar_entries - 1; in ixgbe_reset_hw_X540()
290 hw->mac.ops.set_rar(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_X540()
291 hw->mac.san_addr, 0, IXGBE_RAH_AV); in ixgbe_reset_hw_X540()
294 hw->mac.ops.clear_vmdq(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_X540()
297 /* Reserve the last RAR for the SAN MAC address */ in ixgbe_reset_hw_X540()
298 hw->mac.num_rar_entries--; in ixgbe_reset_hw_X540()
302 hw->mac.ops.get_wwn_prefix(hw, &hw->mac.wwnn_prefix, in ixgbe_reset_hw_X540()
303 &hw->mac.wwpn_prefix); in ixgbe_reset_hw_X540()
310 * ixgbe_start_hw_X540 - Prepare hardware for Tx/Rx
315 * Then performs revision-specific operations, if any.
334 * ixgbe_get_supported_physical_layer_X540 - Returns physical layer type
346 hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_EXT_ABILITY, in ixgbe_get_supported_physical_layer_X540()
359 * ixgbe_init_eeprom_params_X540 - Initialize EEPROM params
367 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_eeprom_params_X540()
373 if (eeprom->type == ixgbe_eeprom_uninitialized) { in ixgbe_init_eeprom_params_X540()
374 eeprom->semaphore_delay = 10; in ixgbe_init_eeprom_params_X540()
375 eeprom->type = ixgbe_flash; in ixgbe_init_eeprom_params_X540()
380 eeprom->word_size = 1 << (eeprom_size + in ixgbe_init_eeprom_params_X540()
384 eeprom->type, eeprom->word_size); in ixgbe_init_eeprom_params_X540()
391 * ixgbe_read_eerd_X540- Read EEPROM word using EERD
403 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_read_eerd_X540()
406 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_read_eerd_X540()
415 * ixgbe_read_eerd_buffer_X540- Read EEPROM word(s) using EERD
429 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_read_eerd_buffer_X540()
433 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_read_eerd_buffer_X540()
442 * ixgbe_write_eewr_X540 - Write EEPROM word using EEWR
454 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_eewr_X540()
457 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_eewr_X540()
466 * ixgbe_write_eewr_buffer_X540 - Write EEPROM word(s) using EEWR
480 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_eewr_buffer_X540()
484 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_write_eewr_buffer_X540()
493 * ixgbe_calc_eeprom_checksum_X540 - Calculates and returns the checksum
500 * Returns a negative error code on error, or the 16-bit checksum
511 /* Do not use hw->eeprom.ops.read because we do not want to take in ixgbe_calc_eeprom_checksum_X540()
529 /* Include all data from pointers 0x3, 0x6-0xE. This excludes the in ixgbe_calc_eeprom_checksum_X540()
543 pointer >= hw->eeprom.word_size) in ixgbe_calc_eeprom_checksum_X540()
553 (pointer + length) >= hw->eeprom.word_size) in ixgbe_calc_eeprom_checksum_X540()
565 checksum = (u16)IXGBE_EEPROM_SUM - checksum; in ixgbe_calc_eeprom_checksum_X540()
571 * ixgbe_validate_eeprom_checksum_X540 - Validate EEPROM checksum
591 status = hw->eeprom.ops.read(hw, 0, &checksum); in ixgbe_validate_eeprom_checksum_X540()
597 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM)) in ixgbe_validate_eeprom_checksum_X540()
600 status = hw->eeprom.ops.calc_checksum(hw); in ixgbe_validate_eeprom_checksum_X540()
606 /* Do not use hw->eeprom.ops.read because we do not want to take in ixgbe_validate_eeprom_checksum_X540()
628 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_validate_eeprom_checksum_X540()
634 * ixgbe_update_eeprom_checksum_X540 - Updates the EEPROM checksum and flash
652 status = hw->eeprom.ops.read(hw, 0, &checksum); in ixgbe_update_eeprom_checksum_X540()
658 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM)) in ixgbe_update_eeprom_checksum_X540()
661 status = hw->eeprom.ops.calc_checksum(hw); in ixgbe_update_eeprom_checksum_X540()
667 /* Do not use hw->eeprom.ops.write because we do not want to in ixgbe_update_eeprom_checksum_X540()
677 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM); in ixgbe_update_eeprom_checksum_X540()
683 * ixgbe_update_flash_X540 - Instruct HW to copy EEPROM to Flash device
711 if (hw->mac.type == ixgbe_mac_X540 && hw->revision_id == 0) { in ixgbe_update_flash_X540()
730 * ixgbe_poll_flash_update_done_X540 - Poll flash update status
761 * ixgbe_acquire_swfw_sync_X540 - Acquire SWFW semaphore
789 if (hw->mac.type >= ixgbe_mac_X550) in ixgbe_acquire_swfw_sync_X540()
858 * ixgbe_release_swfw_sync_X540 - Release SWFW semaphore
885 * ixgbe_get_swfw_sync_semaphore - Get hardware semaphore
943 * ixgbe_release_swfw_sync_semaphore - Release hardware semaphore
968 * ixgbe_init_swfw_sync_X540 - Release hardware semaphore
981 * We got the lock - we release it. in ixgbe_init_swfw_sync_X540()
982 * We timeout trying to get the lock - we force its release. in ixgbe_init_swfw_sync_X540()
998 * ixgbe_blink_led_start_X540 - Blink LED based on index.
1019 * register to work. Force link and speed in the MAC if link is down. in ixgbe_blink_led_start_X540()
1022 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_blink_led_start_X540()
1039 * ixgbe_blink_led_stop_X540 - Stop blinking LED based on index.
1063 /* Unforce link and speed in the MAC. */ in ixgbe_blink_led_stop_X540()