19ca4041bSJack F Vogel /****************************************************************************** 213705f88SJack F Vogel 3c0014855SJack F Vogel Copyright (c) 2001-2010, Intel Corporation 413705f88SJack F Vogel All rights reserved. 513705f88SJack F Vogel 613705f88SJack F Vogel Redistribution and use in source and binary forms, with or without 713705f88SJack F Vogel modification, are permitted provided that the following conditions are met: 813705f88SJack F Vogel 913705f88SJack F Vogel 1. Redistributions of source code must retain the above copyright notice, 1013705f88SJack F Vogel this list of conditions and the following disclaimer. 1113705f88SJack F Vogel 1213705f88SJack F Vogel 2. Redistributions in binary form must reproduce the above copyright 1313705f88SJack F Vogel notice, this list of conditions and the following disclaimer in the 1413705f88SJack F Vogel documentation and/or other materials provided with the distribution. 1513705f88SJack F Vogel 1613705f88SJack F Vogel 3. Neither the name of the Intel Corporation nor the names of its 1713705f88SJack F Vogel contributors may be used to endorse or promote products derived from 1813705f88SJack F Vogel this software without specific prior written permission. 1913705f88SJack F Vogel 2013705f88SJack F Vogel THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2113705f88SJack F Vogel AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2213705f88SJack F Vogel IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2313705f88SJack F Vogel ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2413705f88SJack F Vogel LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2513705f88SJack F Vogel CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2613705f88SJack F Vogel SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2713705f88SJack F Vogel INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2813705f88SJack F Vogel CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2913705f88SJack F Vogel ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3013705f88SJack F Vogel POSSIBILITY OF SUCH DAMAGE. 3113705f88SJack F Vogel 329ca4041bSJack F Vogel ******************************************************************************/ 3313705f88SJack F Vogel /*$FreeBSD$*/ 3413705f88SJack F Vogel 3513705f88SJack F Vogel #ifndef _IXGBE_API_H_ 3613705f88SJack F Vogel #define _IXGBE_API_H_ 3713705f88SJack F Vogel 3813705f88SJack F Vogel #include "ixgbe_type.h" 3913705f88SJack F Vogel 4013705f88SJack F Vogel s32 ixgbe_init_shared_code(struct ixgbe_hw *hw); 4113705f88SJack F Vogel 423ec35e52SJack F Vogel s32 ixgbe_set_mac_type(struct ixgbe_hw *hw); 4313705f88SJack F Vogel s32 ixgbe_init_hw(struct ixgbe_hw *hw); 4413705f88SJack F Vogel s32 ixgbe_reset_hw(struct ixgbe_hw *hw); 4513705f88SJack F Vogel s32 ixgbe_start_hw(struct ixgbe_hw *hw); 46c0014855SJack F Vogel void ixgbe_enable_relaxed_ordering(struct ixgbe_hw *hw); 4713705f88SJack F Vogel s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw); 4813705f88SJack F Vogel enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw); 4913705f88SJack F Vogel s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr); 5013705f88SJack F Vogel s32 ixgbe_get_bus_info(struct ixgbe_hw *hw); 5113705f88SJack F Vogel u32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw); 5213705f88SJack F Vogel u32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw); 5313705f88SJack F Vogel s32 ixgbe_stop_adapter(struct ixgbe_hw *hw); 549ca4041bSJack F Vogel s32 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num); 5513705f88SJack F Vogel 5613705f88SJack F Vogel s32 ixgbe_identify_phy(struct ixgbe_hw *hw); 5713705f88SJack F Vogel s32 ixgbe_reset_phy(struct ixgbe_hw *hw); 5813705f88SJack F Vogel s32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 5913705f88SJack F Vogel u16 *phy_data); 6013705f88SJack F Vogel s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 6113705f88SJack F Vogel u16 phy_data); 6213705f88SJack F Vogel 639ca4041bSJack F Vogel s32 ixgbe_setup_phy_link(struct ixgbe_hw *hw); 649ca4041bSJack F Vogel s32 ixgbe_check_phy_link(struct ixgbe_hw *hw, 659ca4041bSJack F Vogel ixgbe_link_speed *speed, 669ca4041bSJack F Vogel bool *link_up); 679ca4041bSJack F Vogel s32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, 689ca4041bSJack F Vogel ixgbe_link_speed speed, 699ca4041bSJack F Vogel bool autoneg, 709ca4041bSJack F Vogel bool autoneg_wait_to_complete); 712969bf0eSJack F Vogel s32 ixgbe_setup_link(struct ixgbe_hw *hw, ixgbe_link_speed speed, 7213705f88SJack F Vogel bool autoneg, bool autoneg_wait_to_complete); 7313705f88SJack F Vogel s32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 749ca4041bSJack F Vogel bool *link_up, bool link_up_wait_to_complete); 759ca4041bSJack F Vogel s32 ixgbe_get_link_capabilities(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 7613705f88SJack F Vogel bool *autoneg); 7713705f88SJack F Vogel s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index); 7813705f88SJack F Vogel s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index); 7913705f88SJack F Vogel s32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index); 8013705f88SJack F Vogel s32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index); 8113705f88SJack F Vogel 8213705f88SJack F Vogel s32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw); 8313705f88SJack F Vogel s32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data); 8413705f88SJack F Vogel s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data); 8513705f88SJack F Vogel s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val); 8613705f88SJack F Vogel s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw); 8713705f88SJack F Vogel 880ac6dfecSJack F Vogel s32 ixgbe_insert_mac_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); 899ca4041bSJack F Vogel s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, 909ca4041bSJack F Vogel u32 enable_addr); 915b7f4cedSJack F Vogel s32 ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index); 929ca4041bSJack F Vogel s32 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 935b7f4cedSJack F Vogel s32 ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 9413705f88SJack F Vogel s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw); 9513705f88SJack F Vogel u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw); 969ca4041bSJack F Vogel s32 ixgbe_update_uc_addr_list(struct ixgbe_hw *hw, u8 *addr_list, 979ca4041bSJack F Vogel u32 addr_count, ixgbe_mc_addr_itr func); 9813705f88SJack F Vogel s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list, 999ca4041bSJack F Vogel u32 mc_addr_count, ixgbe_mc_addr_itr func); 1002969bf0eSJack F Vogel void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr_list, u32 vmdq); 10113705f88SJack F Vogel s32 ixgbe_enable_mc(struct ixgbe_hw *hw); 10213705f88SJack F Vogel s32 ixgbe_disable_mc(struct ixgbe_hw *hw); 10313705f88SJack F Vogel s32 ixgbe_clear_vfta(struct ixgbe_hw *hw); 10413705f88SJack F Vogel s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, 10513705f88SJack F Vogel u32 vind, bool vlan_on); 10613705f88SJack F Vogel 1070ac6dfecSJack F Vogel s32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num); 10813705f88SJack F Vogel 10913705f88SJack F Vogel void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr); 1109ca4041bSJack F Vogel s32 ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, 1119ca4041bSJack F Vogel u16 *firmware_version); 1123ec35e52SJack F Vogel s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val); 1133ec35e52SJack F Vogel s32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val); 1145b7f4cedSJack F Vogel s32 ixgbe_init_uta_tables(struct ixgbe_hw *hw); 1151b6e0dbaSJack F Vogel s32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data); 1161b6e0dbaSJack F Vogel u32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); 1170ac6dfecSJack F Vogel s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); 1180ac6dfecSJack F Vogel s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 1190ac6dfecSJack F Vogel s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc); 1200ac6dfecSJack F Vogel s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc); 1210ac6dfecSJack F Vogel s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, 1220ac6dfecSJack F Vogel struct ixgbe_atr_input *input, 1230ac6dfecSJack F Vogel u8 queue); 1240ac6dfecSJack F Vogel s32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, 1250ac6dfecSJack F Vogel struct ixgbe_atr_input *input, 126c0014855SJack F Vogel struct ixgbe_atr_input_masks *masks, 1270ac6dfecSJack F Vogel u16 soft_id, 1280ac6dfecSJack F Vogel u8 queue); 1290ac6dfecSJack F Vogel u16 ixgbe_atr_compute_hash_82599(struct ixgbe_atr_input *input, u32 key); 1300ac6dfecSJack F Vogel s32 ixgbe_atr_set_vlan_id_82599(struct ixgbe_atr_input *input, u16 vlan_id); 1310ac6dfecSJack F Vogel s32 ixgbe_atr_set_src_ipv4_82599(struct ixgbe_atr_input *input, u32 src_addr); 1320ac6dfecSJack F Vogel s32 ixgbe_atr_set_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 dst_addr); 1330ac6dfecSJack F Vogel s32 ixgbe_atr_set_src_ipv6_82599(struct ixgbe_atr_input *input, u32 src_addr_1, 1340ac6dfecSJack F Vogel u32 src_addr_2, u32 src_addr_3, 1350ac6dfecSJack F Vogel u32 src_addr_4); 1360ac6dfecSJack F Vogel s32 ixgbe_atr_set_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 dst_addr_1, 1370ac6dfecSJack F Vogel u32 dst_addr_2, u32 dst_addr_3, 1380ac6dfecSJack F Vogel u32 dst_addr_4); 1390ac6dfecSJack F Vogel s32 ixgbe_atr_set_src_port_82599(struct ixgbe_atr_input *input, u16 src_port); 1400ac6dfecSJack F Vogel s32 ixgbe_atr_set_dst_port_82599(struct ixgbe_atr_input *input, u16 dst_port); 1410ac6dfecSJack F Vogel s32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input, u16 flex_byte); 1420ac6dfecSJack F Vogel s32 ixgbe_atr_set_vm_pool_82599(struct ixgbe_atr_input *input, u8 vm_pool); 1430ac6dfecSJack F Vogel s32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input, u8 l4type); 1440ac6dfecSJack F Vogel s32 ixgbe_atr_get_vlan_id_82599(struct ixgbe_atr_input *input, u16 *vlan_id); 1450ac6dfecSJack F Vogel s32 ixgbe_atr_get_src_ipv4_82599(struct ixgbe_atr_input *input, u32 *src_addr); 1460ac6dfecSJack F Vogel s32 ixgbe_atr_get_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 *dst_addr); 1470ac6dfecSJack F Vogel s32 ixgbe_atr_get_src_ipv6_82599(struct ixgbe_atr_input *input, u32 *src_addr_1, 1480ac6dfecSJack F Vogel u32 *src_addr_2, u32 *src_addr_3, 1490ac6dfecSJack F Vogel u32 *src_addr_4); 1500ac6dfecSJack F Vogel s32 ixgbe_atr_get_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 *dst_addr_1, 1510ac6dfecSJack F Vogel u32 *dst_addr_2, u32 *dst_addr_3, 1520ac6dfecSJack F Vogel u32 *dst_addr_4); 1530ac6dfecSJack F Vogel s32 ixgbe_atr_get_src_port_82599(struct ixgbe_atr_input *input, u16 *src_port); 1540ac6dfecSJack F Vogel s32 ixgbe_atr_get_dst_port_82599(struct ixgbe_atr_input *input, u16 *dst_port); 1550ac6dfecSJack F Vogel s32 ixgbe_atr_get_flex_byte_82599(struct ixgbe_atr_input *input, 1560ac6dfecSJack F Vogel u16 *flex_byte); 1570ac6dfecSJack F Vogel s32 ixgbe_atr_get_vm_pool_82599(struct ixgbe_atr_input *input, u8 *vm_pool); 1580ac6dfecSJack F Vogel s32 ixgbe_atr_get_l4type_82599(struct ixgbe_atr_input *input, u8 *l4type); 1590ac6dfecSJack F Vogel s32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 1600ac6dfecSJack F Vogel u8 *data); 1610ac6dfecSJack F Vogel s32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 1620ac6dfecSJack F Vogel u8 data); 1630ac6dfecSJack F Vogel s32 ixgbe_write_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 eeprom_data); 1640ac6dfecSJack F Vogel s32 ixgbe_get_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 1650ac6dfecSJack F Vogel s32 ixgbe_set_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 1660ac6dfecSJack F Vogel s32 ixgbe_get_device_caps(struct ixgbe_hw *hw, u16 *device_caps); 167d8602bb9SJack F Vogel s32 ixgbe_acquire_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 168d8602bb9SJack F Vogel void ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 1692969bf0eSJack F Vogel s32 ixgbe_get_wwn_prefix(struct ixgbe_hw *hw, u16 *wwnn_prefix, 1702969bf0eSJack F Vogel u16 *wwpn_prefix); 171d8602bb9SJack F Vogel 17213705f88SJack F Vogel 17313705f88SJack F Vogel #endif /* _IXGBE_API_H_ */ 174