ixgbe_api.h revision 205720
1179055Sjfv/****************************************************************************** 2171384Sjfv 3205720Sjfv Copyright (c) 2001-2010, Intel Corporation 4171384Sjfv All rights reserved. 5171384Sjfv 6171384Sjfv Redistribution and use in source and binary forms, with or without 7171384Sjfv modification, are permitted provided that the following conditions are met: 8171384Sjfv 9171384Sjfv 1. Redistributions of source code must retain the above copyright notice, 10171384Sjfv this list of conditions and the following disclaimer. 11171384Sjfv 12171384Sjfv 2. Redistributions in binary form must reproduce the above copyright 13171384Sjfv notice, this list of conditions and the following disclaimer in the 14171384Sjfv documentation and/or other materials provided with the distribution. 15171384Sjfv 16171384Sjfv 3. Neither the name of the Intel Corporation nor the names of its 17171384Sjfv contributors may be used to endorse or promote products derived from 18171384Sjfv this software without specific prior written permission. 19171384Sjfv 20171384Sjfv THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21171384Sjfv AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22171384Sjfv IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23171384Sjfv ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24171384Sjfv LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25171384Sjfv CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26171384Sjfv SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27171384Sjfv INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28171384Sjfv CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29171384Sjfv ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30171384Sjfv POSSIBILITY OF SUCH DAMAGE. 31171384Sjfv 32179055Sjfv******************************************************************************/ 33179055Sjfv/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_api.h 205720 2010-03-27 00:21:40Z jfv $*/ 34171384Sjfv 35171384Sjfv#ifndef _IXGBE_API_H_ 36171384Sjfv#define _IXGBE_API_H_ 37171384Sjfv 38171384Sjfv#include "ixgbe_type.h" 39171384Sjfv 40171384Sjfvs32 ixgbe_init_shared_code(struct ixgbe_hw *hw); 41171384Sjfv 42172043Sjfvs32 ixgbe_set_mac_type(struct ixgbe_hw *hw); 43171384Sjfvs32 ixgbe_init_hw(struct ixgbe_hw *hw); 44171384Sjfvs32 ixgbe_reset_hw(struct ixgbe_hw *hw); 45171384Sjfvs32 ixgbe_start_hw(struct ixgbe_hw *hw); 46205720Sjfvvoid ixgbe_enable_relaxed_ordering(struct ixgbe_hw *hw); 47171384Sjfvs32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw); 48171384Sjfvenum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw); 49171384Sjfvs32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr); 50171384Sjfvs32 ixgbe_get_bus_info(struct ixgbe_hw *hw); 51171384Sjfvu32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw); 52171384Sjfvu32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw); 53171384Sjfvs32 ixgbe_stop_adapter(struct ixgbe_hw *hw); 54179055Sjfvs32 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num); 55171384Sjfv 56171384Sjfvs32 ixgbe_identify_phy(struct ixgbe_hw *hw); 57171384Sjfvs32 ixgbe_reset_phy(struct ixgbe_hw *hw); 58171384Sjfvs32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 59179055Sjfv u16 *phy_data); 60171384Sjfvs32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 61179055Sjfv u16 phy_data); 62171384Sjfv 63179055Sjfvs32 ixgbe_setup_phy_link(struct ixgbe_hw *hw); 64179055Sjfvs32 ixgbe_check_phy_link(struct ixgbe_hw *hw, 65179055Sjfv ixgbe_link_speed *speed, 66179055Sjfv bool *link_up); 67179055Sjfvs32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, 68179055Sjfv ixgbe_link_speed speed, 69179055Sjfv bool autoneg, 70179055Sjfv bool autoneg_wait_to_complete); 71200239Sjfvs32 ixgbe_setup_link(struct ixgbe_hw *hw, ixgbe_link_speed speed, 72179055Sjfv bool autoneg, bool autoneg_wait_to_complete); 73171384Sjfvs32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 74179055Sjfv bool *link_up, bool link_up_wait_to_complete); 75179055Sjfvs32 ixgbe_get_link_capabilities(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 76179055Sjfv bool *autoneg); 77171384Sjfvs32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index); 78171384Sjfvs32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index); 79171384Sjfvs32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index); 80171384Sjfvs32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index); 81171384Sjfv 82171384Sjfvs32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw); 83171384Sjfvs32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data); 84171384Sjfvs32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data); 85171384Sjfvs32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val); 86171384Sjfvs32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw); 87171384Sjfv 88190873Sjfvs32 ixgbe_insert_mac_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); 89179055Sjfvs32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, 90179055Sjfv u32 enable_addr); 91181003Sjfvs32 ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index); 92179055Sjfvs32 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 93181003Sjfvs32 ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 94171384Sjfvs32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw); 95171384Sjfvu32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw); 96179055Sjfvs32 ixgbe_update_uc_addr_list(struct ixgbe_hw *hw, u8 *addr_list, 97179055Sjfv u32 addr_count, ixgbe_mc_addr_itr func); 98171384Sjfvs32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list, 99179055Sjfv u32 mc_addr_count, ixgbe_mc_addr_itr func); 100200239Sjfvvoid ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr_list, u32 vmdq); 101171384Sjfvs32 ixgbe_enable_mc(struct ixgbe_hw *hw); 102171384Sjfvs32 ixgbe_disable_mc(struct ixgbe_hw *hw); 103171384Sjfvs32 ixgbe_clear_vfta(struct ixgbe_hw *hw); 104171384Sjfvs32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, 105179055Sjfv u32 vind, bool vlan_on); 106171384Sjfv 107190873Sjfvs32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num); 108171384Sjfv 109171384Sjfvvoid ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr); 110179055Sjfvs32 ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, 111179055Sjfv u16 *firmware_version); 112172043Sjfvs32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val); 113172043Sjfvs32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val); 114181003Sjfvs32 ixgbe_init_uta_tables(struct ixgbe_hw *hw); 115185352Sjfvs32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data); 116185352Sjfvu32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); 117190873Sjfvs32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); 118190873Sjfvs32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 119190873Sjfvs32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc); 120190873Sjfvs32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc); 121190873Sjfvs32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, 122190873Sjfv struct ixgbe_atr_input *input, 123190873Sjfv u8 queue); 124190873Sjfvs32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, 125190873Sjfv struct ixgbe_atr_input *input, 126205720Sjfv struct ixgbe_atr_input_masks *masks, 127190873Sjfv u16 soft_id, 128190873Sjfv u8 queue); 129190873Sjfvu16 ixgbe_atr_compute_hash_82599(struct ixgbe_atr_input *input, u32 key); 130190873Sjfvs32 ixgbe_atr_set_vlan_id_82599(struct ixgbe_atr_input *input, u16 vlan_id); 131190873Sjfvs32 ixgbe_atr_set_src_ipv4_82599(struct ixgbe_atr_input *input, u32 src_addr); 132190873Sjfvs32 ixgbe_atr_set_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 dst_addr); 133190873Sjfvs32 ixgbe_atr_set_src_ipv6_82599(struct ixgbe_atr_input *input, u32 src_addr_1, 134190873Sjfv u32 src_addr_2, u32 src_addr_3, 135190873Sjfv u32 src_addr_4); 136190873Sjfvs32 ixgbe_atr_set_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 dst_addr_1, 137190873Sjfv u32 dst_addr_2, u32 dst_addr_3, 138190873Sjfv u32 dst_addr_4); 139190873Sjfvs32 ixgbe_atr_set_src_port_82599(struct ixgbe_atr_input *input, u16 src_port); 140190873Sjfvs32 ixgbe_atr_set_dst_port_82599(struct ixgbe_atr_input *input, u16 dst_port); 141190873Sjfvs32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input, u16 flex_byte); 142190873Sjfvs32 ixgbe_atr_set_vm_pool_82599(struct ixgbe_atr_input *input, u8 vm_pool); 143190873Sjfvs32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input, u8 l4type); 144190873Sjfvs32 ixgbe_atr_get_vlan_id_82599(struct ixgbe_atr_input *input, u16 *vlan_id); 145190873Sjfvs32 ixgbe_atr_get_src_ipv4_82599(struct ixgbe_atr_input *input, u32 *src_addr); 146190873Sjfvs32 ixgbe_atr_get_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 *dst_addr); 147190873Sjfvs32 ixgbe_atr_get_src_ipv6_82599(struct ixgbe_atr_input *input, u32 *src_addr_1, 148190873Sjfv u32 *src_addr_2, u32 *src_addr_3, 149190873Sjfv u32 *src_addr_4); 150190873Sjfvs32 ixgbe_atr_get_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 *dst_addr_1, 151190873Sjfv u32 *dst_addr_2, u32 *dst_addr_3, 152190873Sjfv u32 *dst_addr_4); 153190873Sjfvs32 ixgbe_atr_get_src_port_82599(struct ixgbe_atr_input *input, u16 *src_port); 154190873Sjfvs32 ixgbe_atr_get_dst_port_82599(struct ixgbe_atr_input *input, u16 *dst_port); 155190873Sjfvs32 ixgbe_atr_get_flex_byte_82599(struct ixgbe_atr_input *input, 156190873Sjfv u16 *flex_byte); 157190873Sjfvs32 ixgbe_atr_get_vm_pool_82599(struct ixgbe_atr_input *input, u8 *vm_pool); 158190873Sjfvs32 ixgbe_atr_get_l4type_82599(struct ixgbe_atr_input *input, u8 *l4type); 159190873Sjfvs32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 160190873Sjfv u8 *data); 161190873Sjfvs32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 162190873Sjfv u8 data); 163190873Sjfvs32 ixgbe_write_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 eeprom_data); 164190873Sjfvs32 ixgbe_get_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 165190873Sjfvs32 ixgbe_set_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 166190873Sjfvs32 ixgbe_get_device_caps(struct ixgbe_hw *hw, u16 *device_caps); 167194875Sjfvs32 ixgbe_acquire_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 168194875Sjfvvoid ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 169200239Sjfvs32 ixgbe_get_wwn_prefix(struct ixgbe_hw *hw, u16 *wwnn_prefix, 170200239Sjfv u16 *wwpn_prefix); 171171384Sjfv 172194875Sjfv 173171384Sjfv#endif /* _IXGBE_API_H_ */ 174