ixgbe_api.h revision 190873
1179055Sjfv/****************************************************************************** 2171384Sjfv 3190873Sjfv Copyright (c) 2001-2009, 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 190873 2009-04-10 00:22:48Z 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); 46171384Sjfvs32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw); 47171384Sjfvenum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw); 48171384Sjfvs32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr); 49171384Sjfvs32 ixgbe_get_bus_info(struct ixgbe_hw *hw); 50171384Sjfvu32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw); 51171384Sjfvu32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw); 52171384Sjfvs32 ixgbe_stop_adapter(struct ixgbe_hw *hw); 53179055Sjfvs32 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num); 54171384Sjfv 55171384Sjfvs32 ixgbe_identify_phy(struct ixgbe_hw *hw); 56171384Sjfvs32 ixgbe_reset_phy(struct ixgbe_hw *hw); 57171384Sjfvs32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 58179055Sjfv u16 *phy_data); 59171384Sjfvs32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 60179055Sjfv u16 phy_data); 61171384Sjfv 62179055Sjfvs32 ixgbe_setup_phy_link(struct ixgbe_hw *hw); 63179055Sjfvs32 ixgbe_check_phy_link(struct ixgbe_hw *hw, 64179055Sjfv ixgbe_link_speed *speed, 65179055Sjfv bool *link_up); 66179055Sjfvs32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, 67179055Sjfv ixgbe_link_speed speed, 68179055Sjfv bool autoneg, 69179055Sjfv bool autoneg_wait_to_complete); 70171384Sjfvs32 ixgbe_setup_link(struct ixgbe_hw *hw); 71171384Sjfvs32 ixgbe_setup_link_speed(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); 100171384Sjfvs32 ixgbe_enable_mc(struct ixgbe_hw *hw); 101171384Sjfvs32 ixgbe_disable_mc(struct ixgbe_hw *hw); 102171384Sjfvs32 ixgbe_clear_vfta(struct ixgbe_hw *hw); 103171384Sjfvs32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, 104179055Sjfv u32 vind, bool vlan_on); 105171384Sjfv 106190873Sjfvs32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num); 107171384Sjfv 108171384Sjfvvoid ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr); 109179055Sjfvs32 ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, 110179055Sjfv u16 *firmware_version); 111172043Sjfvs32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val); 112172043Sjfvs32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val); 113181003Sjfvs32 ixgbe_init_uta_tables(struct ixgbe_hw *hw); 114185352Sjfvs32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data); 115185352Sjfvu32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); 116190873Sjfvs32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); 117190873Sjfvs32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 118190873Sjfvs32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc); 119190873Sjfvs32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc); 120190873Sjfvs32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, 121190873Sjfv struct ixgbe_atr_input *input, 122190873Sjfv u8 queue); 123190873Sjfvs32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, 124190873Sjfv struct ixgbe_atr_input *input, 125190873Sjfv u16 soft_id, 126190873Sjfv u8 queue); 127190873Sjfvu16 ixgbe_atr_compute_hash_82599(struct ixgbe_atr_input *input, u32 key); 128190873Sjfvs32 ixgbe_atr_set_vlan_id_82599(struct ixgbe_atr_input *input, u16 vlan_id); 129190873Sjfvs32 ixgbe_atr_set_src_ipv4_82599(struct ixgbe_atr_input *input, u32 src_addr); 130190873Sjfvs32 ixgbe_atr_set_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 dst_addr); 131190873Sjfvs32 ixgbe_atr_set_src_ipv6_82599(struct ixgbe_atr_input *input, u32 src_addr_1, 132190873Sjfv u32 src_addr_2, u32 src_addr_3, 133190873Sjfv u32 src_addr_4); 134190873Sjfvs32 ixgbe_atr_set_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 dst_addr_1, 135190873Sjfv u32 dst_addr_2, u32 dst_addr_3, 136190873Sjfv u32 dst_addr_4); 137190873Sjfvs32 ixgbe_atr_set_src_port_82599(struct ixgbe_atr_input *input, u16 src_port); 138190873Sjfvs32 ixgbe_atr_set_dst_port_82599(struct ixgbe_atr_input *input, u16 dst_port); 139190873Sjfvs32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input, u16 flex_byte); 140190873Sjfvs32 ixgbe_atr_set_vm_pool_82599(struct ixgbe_atr_input *input, u8 vm_pool); 141190873Sjfvs32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input, u8 l4type); 142190873Sjfvs32 ixgbe_atr_get_vlan_id_82599(struct ixgbe_atr_input *input, u16 *vlan_id); 143190873Sjfvs32 ixgbe_atr_get_src_ipv4_82599(struct ixgbe_atr_input *input, u32 *src_addr); 144190873Sjfvs32 ixgbe_atr_get_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 *dst_addr); 145190873Sjfvs32 ixgbe_atr_get_src_ipv6_82599(struct ixgbe_atr_input *input, u32 *src_addr_1, 146190873Sjfv u32 *src_addr_2, u32 *src_addr_3, 147190873Sjfv u32 *src_addr_4); 148190873Sjfvs32 ixgbe_atr_get_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 *dst_addr_1, 149190873Sjfv u32 *dst_addr_2, u32 *dst_addr_3, 150190873Sjfv u32 *dst_addr_4); 151190873Sjfvs32 ixgbe_atr_get_src_port_82599(struct ixgbe_atr_input *input, u16 *src_port); 152190873Sjfvs32 ixgbe_atr_get_dst_port_82599(struct ixgbe_atr_input *input, u16 *dst_port); 153190873Sjfvs32 ixgbe_atr_get_flex_byte_82599(struct ixgbe_atr_input *input, 154190873Sjfv u16 *flex_byte); 155190873Sjfvs32 ixgbe_atr_get_vm_pool_82599(struct ixgbe_atr_input *input, u8 *vm_pool); 156190873Sjfvs32 ixgbe_atr_get_l4type_82599(struct ixgbe_atr_input *input, u8 *l4type); 157190873Sjfvs32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 158190873Sjfv u8 *data); 159190873Sjfvs32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 160190873Sjfv u8 data); 161190873Sjfvs32 ixgbe_write_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 eeprom_data); 162190873Sjfvs32 ixgbe_get_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 163190873Sjfvs32 ixgbe_set_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 164190873Sjfvs32 ixgbe_get_device_caps(struct ixgbe_hw *hw, u16 *device_caps); 165171384Sjfv 166171384Sjfv#endif /* _IXGBE_API_H_ */ 167