xref: /freebsd/sys/dev/ixgbe/ixgbe_common.h (revision 13705f88)
113705f88SJack F Vogel /*******************************************************************************
213705f88SJack F Vogel 
313705f88SJack F Vogel   Copyright (c) 2001-2007, 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 
3213705f88SJack F Vogel *******************************************************************************/
3313705f88SJack F Vogel /* $FreeBSD$ */
3413705f88SJack F Vogel 
3513705f88SJack F Vogel #ifndef _IXGBE_COMMON_H_
3613705f88SJack F Vogel #define _IXGBE_COMMON_H_
3713705f88SJack F Vogel 
3813705f88SJack F Vogel #include "ixgbe_type.h"
3913705f88SJack F Vogel 
4013705f88SJack F Vogel s32 ixgbe_assign_func_pointers_generic(struct ixgbe_hw *hw);
4113705f88SJack F Vogel s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
4213705f88SJack F Vogel s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw);
4313705f88SJack F Vogel s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw);
4413705f88SJack F Vogel s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr);
4513705f88SJack F Vogel s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
4613705f88SJack F Vogel s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
4713705f88SJack F Vogel 
4813705f88SJack F Vogel s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);
4913705f88SJack F Vogel s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);
5013705f88SJack F Vogel s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index);
5113705f88SJack F Vogel s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
5213705f88SJack F Vogel 
5313705f88SJack F Vogel s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
5413705f88SJack F Vogel s32 ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 data);
5513705f88SJack F Vogel s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data);
5613705f88SJack F Vogel s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,
5713705f88SJack F Vogel 				       u16 *data);
5813705f88SJack F Vogel s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw,
5913705f88SJack F Vogel 					   u16 *checksum_val);
6013705f88SJack F Vogel s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw);
6113705f88SJack F Vogel 
6213705f88SJack F Vogel s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr,
6313705f88SJack F Vogel 			  u32 vind, u32 enable_addr);
6413705f88SJack F Vogel s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw);
6513705f88SJack F Vogel s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
6613705f88SJack F Vogel 				      u32 mc_addr_count, u32 pad);
6713705f88SJack F Vogel s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
6813705f88SJack F Vogel s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
6913705f88SJack F Vogel s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw);
7013705f88SJack F Vogel s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan,
7113705f88SJack F Vogel 			   u32 vind, bool vlan_on);
7213705f88SJack F Vogel 
7313705f88SJack F Vogel s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw, s32 packtetbuf_num);
7413705f88SJack F Vogel 
7513705f88SJack F Vogel s32 ixgbe_validate_mac_addr(u8 *mac_addr);
7613705f88SJack F Vogel s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask);
7713705f88SJack F Vogel void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask);
7813705f88SJack F Vogel s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
7913705f88SJack F Vogel 
8013705f88SJack F Vogel #endif /* IXGBE_COMMON */
81