Home | History | Annotate | Line # | Download | only in ixgbe
ixgbe_common.h revision 1.1
      1  1.1  dyoung /******************************************************************************
      2  1.1  dyoung 
      3  1.1  dyoung   Copyright (c) 2001-2010, Intel Corporation
      4  1.1  dyoung   All rights reserved.
      5  1.1  dyoung 
      6  1.1  dyoung   Redistribution and use in source and binary forms, with or without
      7  1.1  dyoung   modification, are permitted provided that the following conditions are met:
      8  1.1  dyoung 
      9  1.1  dyoung    1. Redistributions of source code must retain the above copyright notice,
     10  1.1  dyoung       this list of conditions and the following disclaimer.
     11  1.1  dyoung 
     12  1.1  dyoung    2. Redistributions in binary form must reproduce the above copyright
     13  1.1  dyoung       notice, this list of conditions and the following disclaimer in the
     14  1.1  dyoung       documentation and/or other materials provided with the distribution.
     15  1.1  dyoung 
     16  1.1  dyoung    3. Neither the name of the Intel Corporation nor the names of its
     17  1.1  dyoung       contributors may be used to endorse or promote products derived from
     18  1.1  dyoung       this software without specific prior written permission.
     19  1.1  dyoung 
     20  1.1  dyoung   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     21  1.1  dyoung   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     22  1.1  dyoung   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23  1.1  dyoung   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     24  1.1  dyoung   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     25  1.1  dyoung   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     26  1.1  dyoung   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27  1.1  dyoung   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     28  1.1  dyoung   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     29  1.1  dyoung   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     30  1.1  dyoung   POSSIBILITY OF SUCH DAMAGE.
     31  1.1  dyoung 
     32  1.1  dyoung ******************************************************************************/
     33  1.1  dyoung /*$FreeBSD: src/sys/dev/ixgbe/ixgbe_common.h,v 1.10 2011/01/19 19:36:27 jfv Exp $*/
     34  1.1  dyoung /*$NetBSD: ixgbe_common.h,v 1.1 2011/08/12 21:55:29 dyoung Exp $*/
     35  1.1  dyoung 
     36  1.1  dyoung #ifndef _IXGBE_COMMON_H_
     37  1.1  dyoung #define _IXGBE_COMMON_H_
     38  1.1  dyoung 
     39  1.1  dyoung #include "ixgbe_type.h"
     40  1.1  dyoung #define IXGBE_WRITE_REG64(hw, reg, value) \
     41  1.1  dyoung 	do { \
     42  1.1  dyoung 		IXGBE_WRITE_REG(hw, reg, (u32) value); \
     43  1.1  dyoung 		IXGBE_WRITE_REG(hw, reg + 4, (u32) (value >> 32)); \
     44  1.1  dyoung 	} while (0)
     45  1.1  dyoung 
     46  1.1  dyoung u32 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);
     47  1.1  dyoung 
     48  1.1  dyoung s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw);
     49  1.1  dyoung s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
     50  1.1  dyoung s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw);
     51  1.1  dyoung s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw);
     52  1.1  dyoung s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw);
     53  1.1  dyoung s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num);
     54  1.1  dyoung s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num,
     55  1.1  dyoung                                   u32 pba_num_size);
     56  1.1  dyoung s32 ixgbe_read_pba_length_generic(struct ixgbe_hw *hw, u32 *pba_num_size);
     57  1.1  dyoung s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr);
     58  1.1  dyoung s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
     59  1.1  dyoung void ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw);
     60  1.1  dyoung s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
     61  1.1  dyoung 
     62  1.1  dyoung s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);
     63  1.1  dyoung s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);
     64  1.1  dyoung 
     65  1.1  dyoung s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
     66  1.1  dyoung s32 ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 data);
     67  1.1  dyoung s32 ixgbe_read_eerd_generic(struct ixgbe_hw *hw, u16 offset, u16 *data);
     68  1.1  dyoung s32 ixgbe_write_eewr_generic(struct ixgbe_hw *hw, u16 offset, u16 data);
     69  1.1  dyoung s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,
     70  1.1  dyoung                                        u16 *data);
     71  1.1  dyoung u16 ixgbe_calc_eeprom_checksum_generic(struct ixgbe_hw *hw);
     72  1.1  dyoung s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw,
     73  1.1  dyoung                                            u16 *checksum_val);
     74  1.1  dyoung s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw);
     75  1.1  dyoung s32 ixgbe_poll_eerd_eewr_done(struct ixgbe_hw *hw, u32 ee_reg);
     76  1.1  dyoung 
     77  1.1  dyoung s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
     78  1.1  dyoung                           u32 enable_addr);
     79  1.1  dyoung s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index);
     80  1.1  dyoung s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw);
     81  1.1  dyoung s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
     82  1.1  dyoung                                       u32 mc_addr_count,
     83  1.1  dyoung                                       ixgbe_mc_addr_itr func);
     84  1.1  dyoung s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, u8 *addr_list,
     85  1.1  dyoung                                       u32 addr_count, ixgbe_mc_addr_itr func);
     86  1.1  dyoung s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
     87  1.1  dyoung s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
     88  1.1  dyoung s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
     89  1.1  dyoung 
     90  1.1  dyoung s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num);
     91  1.1  dyoung s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packtetbuf_num);
     92  1.1  dyoung s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw);
     93  1.1  dyoung 
     94  1.1  dyoung s32 ixgbe_validate_mac_addr(u8 *mac_addr);
     95  1.1  dyoung s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask);
     96  1.1  dyoung void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask);
     97  1.1  dyoung s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
     98  1.1  dyoung 
     99  1.1  dyoung s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index);
    100  1.1  dyoung s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
    101  1.1  dyoung 
    102  1.1  dyoung s32 ixgbe_get_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr);
    103  1.1  dyoung s32 ixgbe_set_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr);
    104  1.1  dyoung 
    105  1.1  dyoung s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq);
    106  1.1  dyoung s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq);
    107  1.1  dyoung s32 ixgbe_insert_mac_addr_generic(struct ixgbe_hw *hw, u8 *addr, u32 vmdq);
    108  1.1  dyoung s32 ixgbe_init_uta_tables_generic(struct ixgbe_hw *hw);
    109  1.1  dyoung s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan,
    110  1.1  dyoung                          u32 vind, bool vlan_on);
    111  1.1  dyoung s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw);
    112  1.1  dyoung 
    113  1.1  dyoung s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw,
    114  1.1  dyoung                                ixgbe_link_speed *speed,
    115  1.1  dyoung                                bool *link_up, bool link_up_wait_to_complete);
    116  1.1  dyoung 
    117  1.1  dyoung s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
    118  1.1  dyoung                                  u16 *wwpn_prefix);
    119  1.1  dyoung 
    120  1.1  dyoung s32 ixgbe_get_fcoe_boot_status_generic(struct ixgbe_hw *hw, u16 *bs);
    121  1.1  dyoung void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int pf);
    122  1.1  dyoung void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf);
    123  1.1  dyoung s32 ixgbe_get_device_caps_generic(struct ixgbe_hw *hw, u16 *device_caps);
    124  1.1  dyoung void ixgbe_enable_relaxed_ordering_gen2(struct ixgbe_hw *hw);
    125  1.1  dyoung #endif /* IXGBE_COMMON */
    126