Lines Matching +full:sw +full:- +full:reset +full:- +full:number

1 /*-
4 * SPDX-License-Identifier: BSD-3-Clause
11 * igc_init_mac_params - Initialize MAC function pointers
21 if (hw->mac.ops.init_params) { in igc_init_mac_params()
22 ret_val = hw->mac.ops.init_params(hw); in igc_init_mac_params()
29 ret_val = -IGC_ERR_CONFIG; in igc_init_mac_params()
37 * igc_init_nvm_params - Initialize NVM function pointers
47 if (hw->nvm.ops.init_params) { in igc_init_nvm_params()
48 ret_val = hw->nvm.ops.init_params(hw); in igc_init_nvm_params()
55 ret_val = -IGC_ERR_CONFIG; in igc_init_nvm_params()
63 * igc_init_phy_params - Initialize PHY function pointers
73 if (hw->phy.ops.init_params) { in igc_init_phy_params()
74 ret_val = hw->phy.ops.init_params(hw); in igc_init_phy_params()
81 ret_val = -IGC_ERR_CONFIG; in igc_init_phy_params()
89 * igc_set_mac_type - Sets MAC type
99 struct igc_mac_info *mac = &hw->mac; in igc_set_mac_type()
104 switch (hw->device_id) { in igc_set_mac_type()
121 mac->type = igc_i225; in igc_set_mac_type()
125 ret_val = -IGC_ERR_MAC_INIT; in igc_set_mac_type()
133 * igc_setup_init_funcs - Initializes function pointers
155 if (!hw->hw_addr) { in igc_setup_init_funcs()
157 ret_val = -IGC_ERR_CONFIG; in igc_setup_init_funcs()
174 switch (hw->mac.type) { in igc_setup_init_funcs()
180 ret_val = -IGC_ERR_CONFIG; in igc_setup_init_funcs()
207 * igc_get_bus_info - Obtain bus information for adapter
216 if (hw->mac.ops.get_bus_info) in igc_get_bus_info()
217 return hw->mac.ops.get_bus_info(hw); in igc_get_bus_info()
223 * igc_clear_vfta - Clear VLAN filter table
231 if (hw->mac.ops.clear_vfta) in igc_clear_vfta()
232 hw->mac.ops.clear_vfta(hw); in igc_clear_vfta()
236 * igc_write_vfta - Write value to VLAN filter table
238 * @offset: the 32-bit offset in which to write the value to.
239 * @value: the 32-bit value to write at location offset.
241 * This writes a 32-bit value to a 32-bit offset in the VLAN filter
246 if (hw->mac.ops.write_vfta) in igc_write_vfta()
247 hw->mac.ops.write_vfta(hw, offset, value); in igc_write_vfta()
251 * igc_update_mc_addr_list - Update Multicast addresses
254 * @mc_addr_count: number of multicast addresses to program
262 if (hw->mac.ops.update_mc_addr_list) in igc_update_mc_addr_list()
263 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, in igc_update_mc_addr_list()
268 * igc_force_mac_fc - Force MAC flow control
281 * igc_check_for_link - Check/Store link connection
285 * results in the hw->mac structure. This is a function pointer entry
290 if (hw->mac.ops.check_for_link) in igc_check_for_link()
291 return hw->mac.ops.check_for_link(hw); in igc_check_for_link()
293 return -IGC_ERR_CONFIG; in igc_check_for_link()
297 * igc_reset_hw - Reset hardware
305 if (hw->mac.ops.reset_hw) in igc_reset_hw()
306 return hw->mac.ops.reset_hw(hw); in igc_reset_hw()
308 return -IGC_ERR_CONFIG; in igc_reset_hw()
312 * igc_init_hw - Initialize hardware
320 if (hw->mac.ops.init_hw) in igc_init_hw()
321 return hw->mac.ops.init_hw(hw); in igc_init_hw()
323 return -IGC_ERR_CONFIG; in igc_init_hw()
327 * igc_setup_link - Configures link and flow control
336 if (hw->mac.ops.setup_link) in igc_setup_link()
337 return hw->mac.ops.setup_link(hw); in igc_setup_link()
339 return -IGC_ERR_CONFIG; in igc_setup_link()
343 * igc_get_speed_and_duplex - Returns current speed and duplex
345 * @speed: pointer to a 16-bit value to store the speed
346 * @duplex: pointer to a 16-bit value to store the duplex.
354 if (hw->mac.ops.get_link_up_info) in igc_get_speed_and_duplex()
355 return hw->mac.ops.get_link_up_info(hw, speed, duplex); in igc_get_speed_and_duplex()
357 return -IGC_ERR_CONFIG; in igc_get_speed_and_duplex()
361 * igc_disable_pcie_master - Disable PCI-Express master access
364 * Disables PCI-Express master access and verifies there are no pending
374 * igc_config_collision_dist - Configure collision distance
382 if (hw->mac.ops.config_collision_dist) in igc_config_collision_dist()
383 hw->mac.ops.config_collision_dist(hw); in igc_config_collision_dist()
387 * igc_rar_set - Sets a receive address register
396 if (hw->mac.ops.rar_set) in igc_rar_set()
397 return hw->mac.ops.rar_set(hw, addr, index); in igc_rar_set()
403 * igc_validate_mdi_setting - Ensures valid MDI/MDIX SW state
406 * Ensures that the MDI/MDIX SW state is valid.
410 if (hw->mac.ops.validate_mdi_setting) in igc_validate_mdi_setting()
411 return hw->mac.ops.validate_mdi_setting(hw); in igc_validate_mdi_setting()
417 * igc_hash_mc_addr - Determines address location in multicast table
431 * igc_check_reset_block - Verifies PHY can be reset
434 * Checks if the PHY is in a state that can be reset or if manageability
439 if (hw->phy.ops.check_reset_block) in igc_check_reset_block()
440 return hw->phy.ops.check_reset_block(hw); in igc_check_reset_block()
446 * igc_read_phy_reg - Reads PHY register
449 * @data: the buffer to store the 16-bit read.
456 if (hw->phy.ops.read_reg) in igc_read_phy_reg()
457 return hw->phy.ops.read_reg(hw, offset, data); in igc_read_phy_reg()
463 * igc_write_phy_reg - Writes PHY register
473 if (hw->phy.ops.write_reg) in igc_write_phy_reg()
474 return hw->phy.ops.write_reg(hw, offset, data); in igc_write_phy_reg()
480 * igc_release_phy - Generic release PHY
488 if (hw->phy.ops.release) in igc_release_phy()
489 hw->phy.ops.release(hw); in igc_release_phy()
493 * igc_acquire_phy - Generic acquire PHY
501 if (hw->phy.ops.acquire) in igc_acquire_phy()
502 return hw->phy.ops.acquire(hw); in igc_acquire_phy()
508 * igc_get_phy_info - Retrieves PHY information from registers
512 * populates hw->phy values with it. This is a function pointer entry
517 if (hw->phy.ops.get_info) in igc_get_phy_info()
518 return hw->phy.ops.get_info(hw); in igc_get_phy_info()
524 * igc_phy_hw_reset - Hard PHY reset
527 * Performs a hard PHY reset. This is a function pointer entry point called
532 if (hw->phy.ops.reset) in igc_phy_hw_reset()
533 return hw->phy.ops.reset(hw); in igc_phy_hw_reset()
539 * igc_set_d0_lplu_state - Sets low power link up state for D0
554 if (hw->phy.ops.set_d0_lplu_state) in igc_set_d0_lplu_state()
555 return hw->phy.ops.set_d0_lplu_state(hw, active); in igc_set_d0_lplu_state()
561 * igc_set_d3_lplu_state - Sets low power link up state for D3
576 if (hw->phy.ops.set_d3_lplu_state) in igc_set_d3_lplu_state()
577 return hw->phy.ops.set_d3_lplu_state(hw, active); in igc_set_d3_lplu_state()
583 * igc_read_mac_addr - Reads MAC address
592 if (hw->mac.ops.read_mac_addr) in igc_read_mac_addr()
593 return hw->mac.ops.read_mac_addr(hw); in igc_read_mac_addr()
599 * igc_read_pba_string - Read device part number string
601 * @pba_num: pointer to device part number
602 * @pba_num_size: size of part number buffer
604 * Reads the product board assembly (PBA) number from the EEPROM and stores
615 * igc_validate_nvm_checksum - Verifies NVM (EEPROM) checksum
623 if (hw->nvm.ops.validate) in igc_validate_nvm_checksum()
624 return hw->nvm.ops.validate(hw); in igc_validate_nvm_checksum()
626 return -IGC_ERR_CONFIG; in igc_validate_nvm_checksum()
630 * igc_update_nvm_checksum - Updates NVM (EEPROM) checksum
638 if (hw->nvm.ops.update) in igc_update_nvm_checksum()
639 return hw->nvm.ops.update(hw); in igc_update_nvm_checksum()
641 return -IGC_ERR_CONFIG; in igc_update_nvm_checksum()
645 * igc_reload_nvm - Reloads EEPROM
653 if (hw->nvm.ops.reload) in igc_reload_nvm()
654 hw->nvm.ops.reload(hw); in igc_reload_nvm()
658 * igc_read_nvm - Reads NVM (EEPROM)
661 * @words: number of 16-bit words to read
664 * Reads 16-bit chunks of data from the NVM (EEPROM). This is a function
669 if (hw->nvm.ops.read) in igc_read_nvm()
670 return hw->nvm.ops.read(hw, offset, words, data); in igc_read_nvm()
672 return -IGC_ERR_CONFIG; in igc_read_nvm()
676 * igc_write_nvm - Writes to NVM (EEPROM)
679 * @words: number of 16-bit words to write
682 * Writes 16-bit chunks of data to the NVM (EEPROM). This is a function
687 if (hw->nvm.ops.write) in igc_write_nvm()
688 return hw->nvm.ops.write(hw, offset, words, data); in igc_write_nvm()
694 * igc_power_up_phy - Restores link in case of PHY power down
702 if (hw->phy.ops.power_up) in igc_power_up_phy()
703 hw->phy.ops.power_up(hw); in igc_power_up_phy()
709 * igc_power_down_phy - Power down PHY
717 if (hw->phy.ops.power_down) in igc_power_down_phy()
718 hw->phy.ops.power_down(hw); in igc_power_down_phy()