Lines Matching +full:hw +full:- +full:blink

2   SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
48 static s32 ixgbe_poll_flash_update_done_X540(struct ixgbe_hw *hw);
49 static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw);
50 static void ixgbe_release_swfw_sync_semaphore(struct ixgbe_hw *hw);
53 * ixgbe_init_ops_X540 - Inits func ptrs and MAC type
54 * @hw: pointer to hardware structure
59 s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw) in ixgbe_init_ops_X540() argument
61 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X540()
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()
69 ret_val = ixgbe_init_phy_ops_generic(hw); in ixgbe_init_ops_X540()
70 ret_val = ixgbe_init_ops_generic(hw); 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()
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
166 * @hw: pointer to hardware structure
172 s32 ixgbe_get_link_capabilities_X540(struct ixgbe_hw *hw, in ixgbe_get_link_capabilities_X540() argument
176 ixgbe_get_copper_link_capabilities_generic(hw, speed, autoneg); in ixgbe_get_link_capabilities_X540()
182 * ixgbe_get_media_type_X540 - Get media type
183 * @hw: pointer to hardware structure
187 enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw) in ixgbe_get_media_type_X540() argument
189 UNREFERENCED_1PARAMETER(hw); in ixgbe_get_media_type_X540()
194 * ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities
195 * @hw: pointer to hardware structure
199 s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, in ixgbe_setup_mac_link_X540() argument
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
209 * @hw: pointer to hardware structure
214 s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw) in ixgbe_reset_hw_X540() argument
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()
228 ixgbe_clear_tx_pending(hw); in ixgbe_reset_hw_X540()
231 status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask); in ixgbe_reset_hw_X540()
238 ctrl |= IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_reset_hw_X540()
239 IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl); in ixgbe_reset_hw_X540()
240 IXGBE_WRITE_FLUSH(hw); 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()
246 ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_reset_hw_X540()
261 * for any pending HW events to 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()
269 IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(0), 384 << IXGBE_RXPBSIZE_SHIFT); in ixgbe_reset_hw_X540()
272 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); 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()
283 hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); in ixgbe_reset_hw_X540()
286 if (ixgbe_validate_mac_addr(hw->mac.san_addr) == 0) { 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()
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
311 * @hw: pointer to hardware structure
315 * Then performs revision-specific operations, if any.
317 s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw) in ixgbe_start_hw_X540() argument
323 ret_val = ixgbe_start_hw_generic(hw); in ixgbe_start_hw_X540()
327 ixgbe_start_hw_gen2(hw); in ixgbe_start_hw_X540()
334 * ixgbe_get_supported_physical_layer_X540 - Returns physical layer type
335 * @hw: pointer to hardware structure
339 u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw) in ixgbe_get_supported_physical_layer_X540() argument
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
360 * @hw: pointer to hardware structure
365 s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw) in ixgbe_init_eeprom_params_X540() argument
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()
377 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); 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
392 * @hw: pointer to hardware structure
398 s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data) in ixgbe_read_eerd_X540() argument
403 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_read_eerd_X540()
405 status = ixgbe_read_eerd_generic(hw, offset, data); 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
416 * @hw: pointer to hardware structure
423 s32 ixgbe_read_eerd_buffer_X540(struct ixgbe_hw *hw, in ixgbe_read_eerd_buffer_X540() argument
429 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_read_eerd_buffer_X540()
431 status = ixgbe_read_eerd_buffer_generic(hw, offset, 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
443 * @hw: pointer to hardware structure
449 s32 ixgbe_write_eewr_X540(struct ixgbe_hw *hw, u16 offset, u16 data) in ixgbe_write_eewr_X540() argument
454 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_eewr_X540()
456 status = ixgbe_write_eewr_generic(hw, offset, data); 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
467 * @hw: pointer to hardware structure
474 s32 ixgbe_write_eewr_buffer_X540(struct ixgbe_hw *hw, in ixgbe_write_eewr_buffer_X540() argument
480 if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_EEP_SM) == in ixgbe_write_eewr_buffer_X540()
482 status = ixgbe_write_eewr_buffer_generic(hw, offset, 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
498 * @hw: pointer to hardware structure
500 * Returns a negative error code on error, or the 16-bit checksum
502 s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw) in ixgbe_calc_eeprom_checksum_X540() argument
511 /* Do not use hw->eeprom.ops.read because we do not want to take in ixgbe_calc_eeprom_checksum_X540()
522 if (ixgbe_read_eerd_generic(hw, i, &word)) { in ixgbe_calc_eeprom_checksum_X540()
529 /* Include all data from pointers 0x3, 0x6-0xE. This excludes the in ixgbe_calc_eeprom_checksum_X540()
536 if (ixgbe_read_eerd_generic(hw, i, &pointer)) { in ixgbe_calc_eeprom_checksum_X540()
543 pointer >= hw->eeprom.word_size) in ixgbe_calc_eeprom_checksum_X540()
546 if (ixgbe_read_eerd_generic(hw, pointer, &length)) { in ixgbe_calc_eeprom_checksum_X540()
553 (pointer + length) >= hw->eeprom.word_size) in ixgbe_calc_eeprom_checksum_X540()
557 if (ixgbe_read_eerd_generic(hw, j, &word)) { 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
572 * @hw: pointer to hardware structure
578 s32 ixgbe_validate_eeprom_checksum_X540(struct ixgbe_hw *hw, in ixgbe_validate_eeprom_checksum_X540() argument
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()
609 status = ixgbe_read_eerd_generic(hw, IXGBE_EEPROM_CHECKSUM, 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
635 * @hw: pointer to hardware structure
641 s32 ixgbe_update_eeprom_checksum_X540(struct ixgbe_hw *hw) in ixgbe_update_eeprom_checksum_X540() argument
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()
670 status = ixgbe_write_eewr_generic(hw, IXGBE_EEPROM_CHECKSUM, checksum); in ixgbe_update_eeprom_checksum_X540()
674 status = ixgbe_update_flash_X540(hw); 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
684 * @hw: pointer to hardware structure
689 s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw) in ixgbe_update_flash_X540() argument
696 status = ixgbe_poll_flash_update_done_X540(hw); in ixgbe_update_flash_X540()
702 flup = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)) | IXGBE_EEC_FLUP; in ixgbe_update_flash_X540()
703 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), flup); in ixgbe_update_flash_X540()
705 status = ixgbe_poll_flash_update_done_X540(hw); in ixgbe_update_flash_X540()
711 if (hw->mac.type == ixgbe_mac_X540 && hw->revision_id == 0) { in ixgbe_update_flash_X540()
712 flup = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_update_flash_X540()
716 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), flup); in ixgbe_update_flash_X540()
719 status = ixgbe_poll_flash_update_done_X540(hw); in ixgbe_update_flash_X540()
730 * ixgbe_poll_flash_update_done_X540 - Poll flash update status
731 * @hw: pointer to hardware structure
736 static s32 ixgbe_poll_flash_update_done_X540(struct ixgbe_hw *hw) in ixgbe_poll_flash_update_done_X540() argument
745 reg = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_poll_flash_update_done_X540()
761 * ixgbe_acquire_swfw_sync_X540 - Acquire SWFW semaphore
762 * @hw: pointer to hardware structure
768 s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask) in ixgbe_acquire_swfw_sync_X540() argument
789 if (hw->mac.type >= ixgbe_mac_X550) in ixgbe_acquire_swfw_sync_X540()
796 if (ixgbe_get_swfw_sync_semaphore(hw)) { in ixgbe_acquire_swfw_sync_X540()
801 swfw_sync = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)); in ixgbe_acquire_swfw_sync_X540()
804 IXGBE_WRITE_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw), in ixgbe_acquire_swfw_sync_X540()
806 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_acquire_swfw_sync_X540()
813 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_acquire_swfw_sync_X540()
817 /* If the resource is not released by the FW/HW the SW can assume that in ixgbe_acquire_swfw_sync_X540()
818 * the FW/HW malfunctions. In that case the SW should set the SW bit(s) in ixgbe_acquire_swfw_sync_X540()
819 * of the requested resource(s) while ignoring the corresponding FW/HW in ixgbe_acquire_swfw_sync_X540()
822 if (ixgbe_get_swfw_sync_semaphore(hw)) { in ixgbe_acquire_swfw_sync_X540()
826 swfw_sync = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)); in ixgbe_acquire_swfw_sync_X540()
829 IXGBE_WRITE_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw), swfw_sync); in ixgbe_acquire_swfw_sync_X540()
830 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_acquire_swfw_sync_X540()
846 ixgbe_release_swfw_sync_X540(hw, rmask); in ixgbe_acquire_swfw_sync_X540()
847 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_acquire_swfw_sync_X540()
851 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_acquire_swfw_sync_X540()
858 * ixgbe_release_swfw_sync_X540 - Release SWFW semaphore
859 * @hw: pointer to hardware structure
865 void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask) in ixgbe_release_swfw_sync_X540() argument
874 ixgbe_get_swfw_sync_semaphore(hw); in ixgbe_release_swfw_sync_X540()
876 swfw_sync = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)); in ixgbe_release_swfw_sync_X540()
878 IXGBE_WRITE_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw), swfw_sync); in ixgbe_release_swfw_sync_X540()
880 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_release_swfw_sync_X540()
885 * ixgbe_get_swfw_sync_semaphore - Get hardware semaphore
886 * @hw: pointer to hardware structure
890 static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw) in ixgbe_get_swfw_sync_semaphore() argument
905 swsm = IXGBE_READ_REG(hw, IXGBE_SWSM_BY_MAC(hw)); in ixgbe_get_swfw_sync_semaphore()
916 swsm = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)); in ixgbe_get_swfw_sync_semaphore()
930 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_get_swfw_sync_semaphore()
943 * ixgbe_release_swfw_sync_semaphore - Release hardware semaphore
944 * @hw: pointer to hardware structure
948 static void ixgbe_release_swfw_sync_semaphore(struct ixgbe_hw *hw) in ixgbe_release_swfw_sync_semaphore() argument
956 swsm = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw)); in ixgbe_release_swfw_sync_semaphore()
958 IXGBE_WRITE_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw), swsm); in ixgbe_release_swfw_sync_semaphore()
960 swsm = IXGBE_READ_REG(hw, IXGBE_SWSM_BY_MAC(hw)); in ixgbe_release_swfw_sync_semaphore()
962 IXGBE_WRITE_REG(hw, IXGBE_SWSM_BY_MAC(hw), swsm); in ixgbe_release_swfw_sync_semaphore()
964 IXGBE_WRITE_FLUSH(hw); in ixgbe_release_swfw_sync_semaphore()
968 * ixgbe_init_swfw_sync_X540 - Release hardware semaphore
969 * @hw: pointer to hardware structure
974 void ixgbe_init_swfw_sync_X540(struct ixgbe_hw *hw) in ixgbe_init_swfw_sync_X540() argument
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()
984 ixgbe_get_swfw_sync_semaphore(hw); in ixgbe_init_swfw_sync_X540()
985 ixgbe_release_swfw_sync_semaphore(hw); in ixgbe_init_swfw_sync_X540()
993 ixgbe_acquire_swfw_sync_X540(hw, rmask); in ixgbe_init_swfw_sync_X540()
994 ixgbe_release_swfw_sync_X540(hw, rmask); in ixgbe_init_swfw_sync_X540()
998 * ixgbe_blink_led_start_X540 - Blink LED based on index.
999 * @hw: pointer to hardware structure
1000 * @index: led number to blink
1005 s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index) in ixgbe_blink_led_start_X540() argument
1018 * Link should be up in order for the blink bit in the LED control in ixgbe_blink_led_start_X540()
1022 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_blink_led_start_X540()
1024 macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC); in ixgbe_blink_led_start_X540()
1026 IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg); in ixgbe_blink_led_start_X540()
1028 /* Set the LED to LINK_UP + BLINK. */ in ixgbe_blink_led_start_X540()
1029 ledctl_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_blink_led_start_X540()
1032 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, ledctl_reg); in ixgbe_blink_led_start_X540()
1033 IXGBE_WRITE_FLUSH(hw); in ixgbe_blink_led_start_X540()
1039 * ixgbe_blink_led_stop_X540 - Stop blinking LED based on index.
1040 * @hw: pointer to hardware structure
1046 s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index) in ixgbe_blink_led_stop_X540() argument
1057 ledctl_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_blink_led_stop_X540()
1061 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, ledctl_reg); in ixgbe_blink_led_stop_X540()
1064 macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC); in ixgbe_blink_led_stop_X540()
1066 IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg); in ixgbe_blink_led_stop_X540()
1067 IXGBE_WRITE_FLUSH(hw); in ixgbe_blink_led_stop_X540()