Lines Matching +full:save +full:- +full:mac +full:- +full:address
1 /*-
4 * SPDX-License-Identifier: BSD-3-Clause
11 * igc_init_mac_params - Initialize MAC function pointers
14 * This function initializes the function pointers for the MAC
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()
24 DEBUGOUT("MAC Initialization Error\n"); in igc_init_mac_params()
28 DEBUGOUT("mac.init_mac_params was NULL\n"); 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
92 * This function sets the mac type of the adapter based on the
99 struct igc_mac_info *mac = &hw->mac; in igc_set_mac_type() local
104 switch (hw->device_id) { in igc_set_mac_type()
119 mac->type = igc_i225; in igc_set_mac_type()
123 ret_val = -IGC_ERR_MAC_INIT; in igc_set_mac_type()
131 * igc_setup_init_funcs - Initializes function pointers
135 * MAC type and the function pointers for the other init
146 /* Can't do much good without knowing the MAC type. */ in igc_setup_init_funcs()
149 DEBUGOUT("ERROR: MAC type could not be set properly.\n"); in igc_setup_init_funcs()
153 if (!hw->hw_addr) { in igc_setup_init_funcs()
155 ret_val = -IGC_ERR_CONFIG; in igc_setup_init_funcs()
172 switch (hw->mac.type) { in igc_setup_init_funcs()
178 ret_val = -IGC_ERR_CONFIG; in igc_setup_init_funcs()
205 * igc_get_bus_info - Obtain bus information for adapter
214 if (hw->mac.ops.get_bus_info) in igc_get_bus_info()
215 return hw->mac.ops.get_bus_info(hw); in igc_get_bus_info()
221 * igc_clear_vfta - Clear VLAN filter table
229 if (hw->mac.ops.clear_vfta) in igc_clear_vfta()
230 hw->mac.ops.clear_vfta(hw); in igc_clear_vfta()
234 * igc_write_vfta - Write value to VLAN filter table
236 * @offset: the 32-bit offset in which to write the value to.
237 * @value: the 32-bit value to write at location offset.
239 * This writes a 32-bit value to a 32-bit offset in the VLAN filter
244 if (hw->mac.ops.write_vfta) in igc_write_vfta()
245 hw->mac.ops.write_vfta(hw, offset, value); in igc_write_vfta()
249 * igc_update_mc_addr_list - Update Multicast addresses
260 if (hw->mac.ops.update_mc_addr_list) in igc_update_mc_addr_list()
261 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, in igc_update_mc_addr_list()
266 * igc_force_mac_fc - Force MAC flow control
269 * Force the MAC's flow control settings. Currently no func pointer exists
279 * igc_check_for_link - Check/Store link connection
283 * results in the hw->mac structure. This is a function pointer entry
288 if (hw->mac.ops.check_for_link) in igc_check_for_link()
289 return hw->mac.ops.check_for_link(hw); in igc_check_for_link()
291 return -IGC_ERR_CONFIG; in igc_check_for_link()
295 * igc_reset_hw - Reset hardware
303 if (hw->mac.ops.reset_hw) in igc_reset_hw()
304 return hw->mac.ops.reset_hw(hw); in igc_reset_hw()
306 return -IGC_ERR_CONFIG; in igc_reset_hw()
310 * igc_init_hw - Initialize hardware
318 if (hw->mac.ops.init_hw) in igc_init_hw()
319 return hw->mac.ops.init_hw(hw); in igc_init_hw()
321 return -IGC_ERR_CONFIG; in igc_init_hw()
325 * igc_setup_link - Configures link and flow control
334 if (hw->mac.ops.setup_link) in igc_setup_link()
335 return hw->mac.ops.setup_link(hw); in igc_setup_link()
337 return -IGC_ERR_CONFIG; in igc_setup_link()
341 * igc_get_speed_and_duplex - Returns current speed and duplex
343 * @speed: pointer to a 16-bit value to store the speed
344 * @duplex: pointer to a 16-bit value to store the duplex.
352 if (hw->mac.ops.get_link_up_info) in igc_get_speed_and_duplex()
353 return hw->mac.ops.get_link_up_info(hw, speed, duplex); in igc_get_speed_and_duplex()
355 return -IGC_ERR_CONFIG; in igc_get_speed_and_duplex()
359 * igc_disable_pcie_master - Disable PCI-Express master access
362 * Disables PCI-Express master access and verifies there are no pending
372 * igc_config_collision_dist - Configure collision distance
380 if (hw->mac.ops.config_collision_dist) in igc_config_collision_dist()
381 hw->mac.ops.config_collision_dist(hw); in igc_config_collision_dist()
385 * igc_rar_set - Sets a receive address register
387 * @addr: address to set the RAR to
390 * Sets a Receive Address Register (RAR) to the specified address.
394 if (hw->mac.ops.rar_set) in igc_rar_set()
395 return hw->mac.ops.rar_set(hw, addr, index); in igc_rar_set()
401 * igc_validate_mdi_setting - Ensures valid MDI/MDIX SW state
408 if (hw->mac.ops.validate_mdi_setting) in igc_validate_mdi_setting()
409 return hw->mac.ops.validate_mdi_setting(hw); in igc_validate_mdi_setting()
415 * igc_hash_mc_addr - Determines address location in multicast table
417 * @mc_addr: Multicast address to hash.
419 * This hashes an address to determine its location in the multicast
429 * igc_check_reset_block - Verifies PHY can be reset
437 if (hw->phy.ops.check_reset_block) in igc_check_reset_block()
438 return hw->phy.ops.check_reset_block(hw); in igc_check_reset_block()
444 * igc_read_phy_reg - Reads PHY register
447 * @data: the buffer to store the 16-bit read.
454 if (hw->phy.ops.read_reg) in igc_read_phy_reg()
455 return hw->phy.ops.read_reg(hw, offset, data); in igc_read_phy_reg()
461 * igc_write_phy_reg - Writes PHY register
471 if (hw->phy.ops.write_reg) in igc_write_phy_reg()
472 return hw->phy.ops.write_reg(hw, offset, data); in igc_write_phy_reg()
478 * igc_release_phy - Generic release PHY
486 if (hw->phy.ops.release) in igc_release_phy()
487 hw->phy.ops.release(hw); in igc_release_phy()
491 * igc_acquire_phy - Generic acquire PHY
499 if (hw->phy.ops.acquire) in igc_acquire_phy()
500 return hw->phy.ops.acquire(hw); in igc_acquire_phy()
506 * igc_get_phy_info - Retrieves PHY information from registers
510 * populates hw->phy values with it. This is a function pointer entry
515 if (hw->phy.ops.get_info) in igc_get_phy_info()
516 return hw->phy.ops.get_info(hw); in igc_get_phy_info()
522 * igc_phy_hw_reset - Hard PHY reset
530 if (hw->phy.ops.reset) in igc_phy_hw_reset()
531 return hw->phy.ops.reset(hw); in igc_phy_hw_reset()
537 * igc_set_d0_lplu_state - Sets low power link up state for D0
552 if (hw->phy.ops.set_d0_lplu_state) in igc_set_d0_lplu_state()
553 return hw->phy.ops.set_d0_lplu_state(hw, active); in igc_set_d0_lplu_state()
559 * igc_set_d3_lplu_state - Sets low power link up state for D3
574 if (hw->phy.ops.set_d3_lplu_state) in igc_set_d3_lplu_state()
575 return hw->phy.ops.set_d3_lplu_state(hw, active); in igc_set_d3_lplu_state()
581 * igc_read_mac_addr - Reads MAC address
584 * Reads the MAC address out of the adapter and stores it in the HW structure.
590 if (hw->mac.ops.read_mac_addr) in igc_read_mac_addr()
591 return hw->mac.ops.read_mac_addr(hw); in igc_read_mac_addr()
597 * igc_read_pba_string - Read device part number string
613 * igc_validate_nvm_checksum - Verifies NVM (EEPROM) checksum
621 if (hw->nvm.ops.validate) in igc_validate_nvm_checksum()
622 return hw->nvm.ops.validate(hw); in igc_validate_nvm_checksum()
624 return -IGC_ERR_CONFIG; in igc_validate_nvm_checksum()
628 * igc_update_nvm_checksum - Updates NVM (EEPROM) checksum
636 if (hw->nvm.ops.update) in igc_update_nvm_checksum()
637 return hw->nvm.ops.update(hw); in igc_update_nvm_checksum()
639 return -IGC_ERR_CONFIG; in igc_update_nvm_checksum()
643 * igc_reload_nvm - Reloads EEPROM
651 if (hw->nvm.ops.reload) in igc_reload_nvm()
652 hw->nvm.ops.reload(hw); in igc_reload_nvm()
656 * igc_read_nvm - Reads NVM (EEPROM)
659 * @words: number of 16-bit words to read
662 * Reads 16-bit chunks of data from the NVM (EEPROM). This is a function
667 if (hw->nvm.ops.read) in igc_read_nvm()
668 return hw->nvm.ops.read(hw, offset, words, data); in igc_read_nvm()
670 return -IGC_ERR_CONFIG; in igc_read_nvm()
674 * igc_write_nvm - Writes to NVM (EEPROM)
677 * @words: number of 16-bit words to write
680 * Writes 16-bit chunks of data to the NVM (EEPROM). This is a function
685 if (hw->nvm.ops.write) in igc_write_nvm()
686 return hw->nvm.ops.write(hw, offset, words, data); in igc_write_nvm()
692 * igc_power_up_phy - Restores link in case of PHY power down
695 * The phy may be powered down to save power, to turn off link when the
700 if (hw->phy.ops.power_up) in igc_power_up_phy()
701 hw->phy.ops.power_up(hw); in igc_power_up_phy()
707 * igc_power_down_phy - Power down PHY
710 * The phy may be powered down to save power, to turn off link when the
715 if (hw->phy.ops.power_down) in igc_power_down_phy()
716 hw->phy.ops.power_down(hw); in igc_power_down_phy()