Lines Matching +full:save +full:- +full:mac +full:- +full:address

2   SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
38 * e1000_init_mac_params - Initialize MAC function pointers
41 * This function initializes the function pointers for the MAC
48 if (hw->mac.ops.init_params) { in e1000_init_mac_params()
49 ret_val = hw->mac.ops.init_params(hw); in e1000_init_mac_params()
51 DEBUGOUT("MAC Initialization Error\n"); in e1000_init_mac_params()
55 DEBUGOUT("mac.init_mac_params was NULL\n"); in e1000_init_mac_params()
56 ret_val = -E1000_ERR_CONFIG; in e1000_init_mac_params()
64 * e1000_init_nvm_params - Initialize NVM function pointers
74 if (hw->nvm.ops.init_params) { in e1000_init_nvm_params()
75 ret_val = hw->nvm.ops.init_params(hw); in e1000_init_nvm_params()
82 ret_val = -E1000_ERR_CONFIG; in e1000_init_nvm_params()
90 * e1000_init_phy_params - Initialize PHY function pointers
100 if (hw->phy.ops.init_params) { in e1000_init_phy_params()
101 ret_val = hw->phy.ops.init_params(hw); in e1000_init_phy_params()
108 ret_val = -E1000_ERR_CONFIG; in e1000_init_phy_params()
116 * e1000_init_mbx_params - Initialize mailbox function pointers
126 if (hw->mbx.ops.init_params) { in e1000_init_mbx_params()
127 ret_val = hw->mbx.ops.init_params(hw); in e1000_init_mbx_params()
134 ret_val = -E1000_ERR_CONFIG; in e1000_init_mbx_params()
142 * e1000_set_mac_type - Sets MAC type
145 * This function sets the mac type of the adapter based on the
152 struct e1000_mac_info *mac = &hw->mac; in e1000_set_mac_type() local
157 switch (hw->device_id) { in e1000_set_mac_type()
159 mac->type = e1000_82542; in e1000_set_mac_type()
163 mac->type = e1000_82543; in e1000_set_mac_type()
169 mac->type = e1000_82544; in e1000_set_mac_type()
176 mac->type = e1000_82540; in e1000_set_mac_type()
180 mac->type = e1000_82545; in e1000_set_mac_type()
185 mac->type = e1000_82545_rev_3; in e1000_set_mac_type()
190 mac->type = e1000_82546; in e1000_set_mac_type()
198 mac->type = e1000_82546_rev_3; in e1000_set_mac_type()
203 mac->type = e1000_82541; in e1000_set_mac_type()
209 mac->type = e1000_82541_rev_2; in e1000_set_mac_type()
213 mac->type = e1000_82547; in e1000_set_mac_type()
216 mac->type = e1000_82547_rev_2; in e1000_set_mac_type()
227 mac->type = e1000_82571; in e1000_set_mac_type()
233 mac->type = e1000_82572; in e1000_set_mac_type()
238 mac->type = e1000_82573; in e1000_set_mac_type()
242 mac->type = e1000_82574; in e1000_set_mac_type()
245 mac->type = e1000_82583; in e1000_set_mac_type()
251 mac->type = e1000_80003es2lan; in e1000_set_mac_type()
261 mac->type = e1000_ich8lan; in e1000_set_mac_type()
275 mac->type = e1000_ich9lan; in e1000_set_mac_type()
280 mac->type = e1000_ich10lan; in e1000_set_mac_type()
286 mac->type = e1000_pchlan; in e1000_set_mac_type()
290 mac->type = e1000_pch2lan; in e1000_set_mac_type()
300 mac->type = e1000_pch_lpt; in e1000_set_mac_type()
313 mac->type = e1000_pch_spt; in e1000_set_mac_type()
327 mac->type = e1000_pch_cnp; in e1000_set_mac_type()
335 mac->type = e1000_pch_tgp; in e1000_set_mac_type()
347 mac->type = e1000_pch_adp; in e1000_set_mac_type()
355 mac->type = e1000_pch_mtp; in e1000_set_mac_type()
365 mac->type = e1000_pch_ptp; in e1000_set_mac_type()
370 mac->type = e1000_82575; in e1000_set_mac_type()
380 mac->type = e1000_82576; in e1000_set_mac_type()
392 mac->type = e1000_82580; in e1000_set_mac_type()
399 mac->type = e1000_i350; in e1000_set_mac_type()
410 mac->type = e1000_i210; in e1000_set_mac_type()
413 mac->type = e1000_i211; in e1000_set_mac_type()
417 mac->type = e1000_vfadapt; in e1000_set_mac_type()
421 mac->type = e1000_vfadapt_i350; in e1000_set_mac_type()
427 mac->type = e1000_i354; in e1000_set_mac_type()
431 ret_val = -E1000_ERR_MAC_INIT; in e1000_set_mac_type()
439 * e1000_setup_init_funcs - Initializes function pointers
443 * MAC type and the function pointers for the other init
454 /* Can't do much good without knowing the MAC type. */ in e1000_setup_init_funcs()
457 DEBUGOUT("ERROR: MAC type could not be set properly.\n"); in e1000_setup_init_funcs()
461 if (!hw->hw_addr) { in e1000_setup_init_funcs()
463 ret_val = -E1000_ERR_CONFIG; in e1000_setup_init_funcs()
481 switch (hw->mac.type) { in e1000_setup_init_funcs()
545 ret_val = -E1000_ERR_CONFIG; in e1000_setup_init_funcs()
576 * e1000_get_bus_info - Obtain bus information for adapter
585 if (hw->mac.ops.get_bus_info) in e1000_get_bus_info()
586 return hw->mac.ops.get_bus_info(hw); in e1000_get_bus_info()
592 * e1000_clear_vfta - Clear VLAN filter table
600 if (hw->mac.ops.clear_vfta) in e1000_clear_vfta()
601 hw->mac.ops.clear_vfta(hw); in e1000_clear_vfta()
605 * e1000_write_vfta - Write value to VLAN filter table
607 * @offset: the 32-bit offset in which to write the value to.
608 * @value: the 32-bit value to write at location offset.
610 * This writes a 32-bit value to a 32-bit offset in the VLAN filter
615 if (hw->mac.ops.write_vfta) in e1000_write_vfta()
616 hw->mac.ops.write_vfta(hw, offset, value); in e1000_write_vfta()
620 * e1000_update_mc_addr_list - Update Multicast addresses
631 if (hw->mac.ops.update_mc_addr_list) in e1000_update_mc_addr_list()
632 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, in e1000_update_mc_addr_list()
637 * e1000_force_mac_fc - Force MAC flow control
640 * Force the MAC's flow control settings. Currently no func pointer exists
650 * e1000_check_for_link - Check/Store link connection
654 * results in the hw->mac structure. This is a function pointer entry
659 if (hw->mac.ops.check_for_link) in e1000_check_for_link()
660 return hw->mac.ops.check_for_link(hw); in e1000_check_for_link()
662 return -E1000_ERR_CONFIG; in e1000_check_for_link()
666 * e1000_check_mng_mode - Check management mode
674 if (hw->mac.ops.check_mng_mode) in e1000_check_mng_mode()
675 return hw->mac.ops.check_mng_mode(hw); in e1000_check_mng_mode()
681 * e1000_mng_write_dhcp_info - Writes DHCP info to host interface
694 * e1000_reset_hw - Reset hardware
702 if (hw->mac.ops.reset_hw) in e1000_reset_hw()
703 return hw->mac.ops.reset_hw(hw); in e1000_reset_hw()
705 return -E1000_ERR_CONFIG; in e1000_reset_hw()
709 * e1000_init_hw - Initialize hardware
717 if (hw->mac.ops.init_hw) in e1000_init_hw()
718 return hw->mac.ops.init_hw(hw); in e1000_init_hw()
720 return -E1000_ERR_CONFIG; in e1000_init_hw()
724 * e1000_setup_link - Configures link and flow control
733 if (hw->mac.ops.setup_link) in e1000_setup_link()
734 return hw->mac.ops.setup_link(hw); in e1000_setup_link()
736 return -E1000_ERR_CONFIG; in e1000_setup_link()
740 * e1000_get_speed_and_duplex - Returns current speed and duplex
742 * @speed: pointer to a 16-bit value to store the speed
743 * @duplex: pointer to a 16-bit value to store the duplex.
751 if (hw->mac.ops.get_link_up_info) in e1000_get_speed_and_duplex()
752 return hw->mac.ops.get_link_up_info(hw, speed, duplex); in e1000_get_speed_and_duplex()
754 return -E1000_ERR_CONFIG; in e1000_get_speed_and_duplex()
758 * e1000_setup_led - Configures SW controllable LED
767 if (hw->mac.ops.setup_led) in e1000_setup_led()
768 return hw->mac.ops.setup_led(hw); in e1000_setup_led()
774 * e1000_cleanup_led - Restores SW controllable LED
782 if (hw->mac.ops.cleanup_led) in e1000_cleanup_led()
783 return hw->mac.ops.cleanup_led(hw); in e1000_cleanup_led()
789 * e1000_blink_led - Blink SW controllable LED
798 if (hw->mac.ops.blink_led) in e1000_blink_led()
799 return hw->mac.ops.blink_led(hw); in e1000_blink_led()
805 * e1000_id_led_init - store LED configurations in SW
813 if (hw->mac.ops.id_led_init) in e1000_id_led_init()
814 return hw->mac.ops.id_led_init(hw); in e1000_id_led_init()
820 * e1000_led_on - Turn on SW controllable LED
828 if (hw->mac.ops.led_on) in e1000_led_on()
829 return hw->mac.ops.led_on(hw); in e1000_led_on()
835 * e1000_led_off - Turn off SW controllable LED
843 if (hw->mac.ops.led_off) in e1000_led_off()
844 return hw->mac.ops.led_off(hw); in e1000_led_off()
850 * e1000_reset_adaptive - Reset adaptive IFS
862 * e1000_update_adaptive - Update adaptive IFS
874 * e1000_disable_pcie_master - Disable PCI-Express master access
877 * Disables PCI-Express master access and verifies there are no pending
887 * e1000_config_collision_dist - Configure collision distance
895 if (hw->mac.ops.config_collision_dist) in e1000_config_collision_dist()
896 hw->mac.ops.config_collision_dist(hw); in e1000_config_collision_dist()
900 * e1000_rar_set - Sets a receive address register
902 * @addr: address to set the RAR to
905 * Sets a Receive Address Register (RAR) to the specified address.
909 if (hw->mac.ops.rar_set) in e1000_rar_set()
910 return hw->mac.ops.rar_set(hw, addr, index); in e1000_rar_set()
916 * e1000_validate_mdi_setting - Ensures valid MDI/MDIX SW state
923 if (hw->mac.ops.validate_mdi_setting) in e1000_validate_mdi_setting()
924 return hw->mac.ops.validate_mdi_setting(hw); in e1000_validate_mdi_setting()
930 * e1000_hash_mc_addr - Determines address location in multicast table
932 * @mc_addr: Multicast address to hash.
934 * This hashes an address to determine its location in the multicast
944 * e1000_enable_tx_pkt_filtering - Enable packet filtering on TX
958 * e1000_mng_host_if_write - Writes to the manageability host interface
976 * e1000_mng_write_cmd_header - Writes manageability command header
989 * e1000_mng_enable_host_if - Checks host interface is enabled
1004 * e1000_set_obff_timer - Set Optimized Buffer Flush/Fill timer
1012 if (hw->mac.ops.set_obff_timer) in e1000_set_obff_timer()
1013 return hw->mac.ops.set_obff_timer(hw, itr); in e1000_set_obff_timer()
1019 * e1000_check_reset_block - Verifies PHY can be reset
1027 if (hw->phy.ops.check_reset_block) in e1000_check_reset_block()
1028 return hw->phy.ops.check_reset_block(hw); in e1000_check_reset_block()
1034 * e1000_read_phy_reg - Reads PHY register
1037 * @data: the buffer to store the 16-bit read.
1044 if (hw->phy.ops.read_reg) in e1000_read_phy_reg()
1045 return hw->phy.ops.read_reg(hw, offset, data); in e1000_read_phy_reg()
1051 * e1000_write_phy_reg - Writes PHY register
1061 if (hw->phy.ops.write_reg) in e1000_write_phy_reg()
1062 return hw->phy.ops.write_reg(hw, offset, data); in e1000_write_phy_reg()
1068 * e1000_release_phy - Generic release PHY
1076 if (hw->phy.ops.release) in e1000_release_phy()
1077 hw->phy.ops.release(hw); in e1000_release_phy()
1081 * e1000_acquire_phy - Generic acquire PHY
1089 if (hw->phy.ops.acquire) in e1000_acquire_phy()
1090 return hw->phy.ops.acquire(hw); in e1000_acquire_phy()
1096 * e1000_cfg_on_link_up - Configure PHY upon link up
1101 if (hw->phy.ops.cfg_on_link_up) in e1000_cfg_on_link_up()
1102 return hw->phy.ops.cfg_on_link_up(hw); in e1000_cfg_on_link_up()
1108 * e1000_read_kmrn_reg - Reads register using Kumeran interface
1111 * @data: the location to store the 16-bit value read.
1123 * e1000_write_kmrn_reg - Writes register using Kumeran interface
1138 * e1000_get_cable_length - Retrieves cable length estimation
1142 * hw->phy.min_length and hw->phy.max_length. This is a function pointer
1147 if (hw->phy.ops.get_cable_length) in e1000_get_cable_length()
1148 return hw->phy.ops.get_cable_length(hw); in e1000_get_cable_length()
1154 * e1000_get_phy_info - Retrieves PHY information from registers
1158 * populates hw->phy values with it. This is a function pointer entry
1163 if (hw->phy.ops.get_info) in e1000_get_phy_info()
1164 return hw->phy.ops.get_info(hw); in e1000_get_phy_info()
1170 * e1000_phy_hw_reset - Hard PHY reset
1178 if (hw->phy.ops.reset) in e1000_phy_hw_reset()
1179 return hw->phy.ops.reset(hw); in e1000_phy_hw_reset()
1185 * e1000_phy_commit - Soft PHY reset
1193 if (hw->phy.ops.commit) in e1000_phy_commit()
1194 return hw->phy.ops.commit(hw); in e1000_phy_commit()
1200 * e1000_set_d0_lplu_state - Sets low power link up state for D0
1215 if (hw->phy.ops.set_d0_lplu_state) in e1000_set_d0_lplu_state()
1216 return hw->phy.ops.set_d0_lplu_state(hw, active); in e1000_set_d0_lplu_state()
1222 * e1000_set_d3_lplu_state - Sets low power link up state for D3
1237 if (hw->phy.ops.set_d3_lplu_state) in e1000_set_d3_lplu_state()
1238 return hw->phy.ops.set_d3_lplu_state(hw, active); in e1000_set_d3_lplu_state()
1244 * e1000_read_mac_addr - Reads MAC address
1247 * Reads the MAC address out of the adapter and stores it in the HW structure.
1253 if (hw->mac.ops.read_mac_addr) in e1000_read_mac_addr()
1254 return hw->mac.ops.read_mac_addr(hw); in e1000_read_mac_addr()
1260 * e1000_read_pba_string - Read device part number string
1276 * e1000_read_pba_length - Read device part number string length
1291 * e1000_read_pba_num - Read device part number
1306 * e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum
1314 if (hw->nvm.ops.validate) in e1000_validate_nvm_checksum()
1315 return hw->nvm.ops.validate(hw); in e1000_validate_nvm_checksum()
1317 return -E1000_ERR_CONFIG; in e1000_validate_nvm_checksum()
1321 * e1000_update_nvm_checksum - Updates NVM (EEPROM) checksum
1329 if (hw->nvm.ops.update) in e1000_update_nvm_checksum()
1330 return hw->nvm.ops.update(hw); in e1000_update_nvm_checksum()
1332 return -E1000_ERR_CONFIG; in e1000_update_nvm_checksum()
1336 * e1000_reload_nvm - Reloads EEPROM
1344 if (hw->nvm.ops.reload) in e1000_reload_nvm()
1345 hw->nvm.ops.reload(hw); in e1000_reload_nvm()
1349 * e1000_read_nvm - Reads NVM (EEPROM)
1352 * @words: number of 16-bit words to read
1355 * Reads 16-bit chunks of data from the NVM (EEPROM). This is a function
1360 if (hw->nvm.ops.read) in e1000_read_nvm()
1361 return hw->nvm.ops.read(hw, offset, words, data); in e1000_read_nvm()
1363 return -E1000_ERR_CONFIG; in e1000_read_nvm()
1367 * e1000_write_nvm - Writes to NVM (EEPROM)
1370 * @words: number of 16-bit words to write
1373 * Writes 16-bit chunks of data to the NVM (EEPROM). This is a function
1378 if (hw->nvm.ops.write) in e1000_write_nvm()
1379 return hw->nvm.ops.write(hw, offset, words, data); in e1000_write_nvm()
1385 * e1000_write_8bit_ctrl_reg - Writes 8bit Control register
1401 * e1000_power_up_phy - Restores link in case of PHY power down
1404 * The phy may be powered down to save power, to turn off link when the
1409 if (hw->phy.ops.power_up) in e1000_power_up_phy()
1410 hw->phy.ops.power_up(hw); in e1000_power_up_phy()
1416 * e1000_power_down_phy - Power down PHY
1419 * The phy may be powered down to save power, to turn off link when the
1424 if (hw->phy.ops.power_down) in e1000_power_down_phy()
1425 hw->phy.ops.power_down(hw); in e1000_power_down_phy()
1429 * e1000_power_up_fiber_serdes_link - Power up serdes link
1436 if (hw->mac.ops.power_up_serdes) in e1000_power_up_fiber_serdes_link()
1437 hw->mac.ops.power_up_serdes(hw); in e1000_power_up_fiber_serdes_link()
1441 * e1000_shutdown_fiber_serdes_link - Remove link during power down
1448 if (hw->mac.ops.shutdown_serdes) in e1000_shutdown_fiber_serdes_link()
1449 hw->mac.ops.shutdown_serdes(hw); in e1000_shutdown_fiber_serdes_link()