Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright(c) 2007 - 2018 Intel Corporation. */
0003 
0004 #ifndef _E1000_MAC_H_
0005 #define _E1000_MAC_H_
0006 
0007 #include "e1000_hw.h"
0008 
0009 #include "e1000_phy.h"
0010 #include "e1000_nvm.h"
0011 #include "e1000_defines.h"
0012 #include "e1000_i210.h"
0013 
0014 /* Functions that should not be called directly from drivers but can be used
0015  * by other files in this 'shared code'
0016  */
0017 s32  igb_blink_led(struct e1000_hw *hw);
0018 s32  igb_check_for_copper_link(struct e1000_hw *hw);
0019 s32  igb_cleanup_led(struct e1000_hw *hw);
0020 s32  igb_config_fc_after_link_up(struct e1000_hw *hw);
0021 s32  igb_disable_pcie_master(struct e1000_hw *hw);
0022 s32  igb_force_mac_fc(struct e1000_hw *hw);
0023 s32  igb_get_auto_rd_done(struct e1000_hw *hw);
0024 s32  igb_get_bus_info_pcie(struct e1000_hw *hw);
0025 s32  igb_get_hw_semaphore(struct e1000_hw *hw);
0026 s32  igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed,
0027                      u16 *duplex);
0028 s32  igb_id_led_init(struct e1000_hw *hw);
0029 s32  igb_led_off(struct e1000_hw *hw);
0030 void igb_update_mc_addr_list(struct e1000_hw *hw,
0031                  u8 *mc_addr_list, u32 mc_addr_count);
0032 s32  igb_setup_link(struct e1000_hw *hw);
0033 s32  igb_validate_mdi_setting(struct e1000_hw *hw);
0034 s32  igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg,
0035                  u32 offset, u8 data);
0036 
0037 void igb_clear_hw_cntrs_base(struct e1000_hw *hw);
0038 void igb_clear_vfta(struct e1000_hw *hw);
0039 void igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value);
0040 s32  igb_vfta_set(struct e1000_hw *hw, u32 vid, u32 vind,
0041           bool vlan_on, bool vlvf_bypass);
0042 void igb_config_collision_dist(struct e1000_hw *hw);
0043 void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);
0044 void igb_mta_set(struct e1000_hw *hw, u32 hash_value);
0045 void igb_put_hw_semaphore(struct e1000_hw *hw);
0046 void igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
0047 s32  igb_check_alt_mac_addr(struct e1000_hw *hw);
0048 
0049 bool igb_enable_mng_pass_thru(struct e1000_hw *hw);
0050 
0051 enum e1000_mng_mode {
0052     e1000_mng_mode_none = 0,
0053     e1000_mng_mode_asf,
0054     e1000_mng_mode_pt,
0055     e1000_mng_mode_ipmi,
0056     e1000_mng_mode_host_if_only
0057 };
0058 
0059 #define E1000_FACTPS_MNGCG  0x20000000
0060 
0061 #define E1000_FWSM_MODE_MASK    0xE
0062 #define E1000_FWSM_MODE_SHIFT   1
0063 
0064 #define E1000_MNG_DHCP_COOKIE_STATUS_VLAN   0x2
0065 
0066 void e1000_init_function_pointers_82575(struct e1000_hw *hw);
0067 
0068 #endif