1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015-2020
8 #include "txgbe_type.h"
10 s32 txgbe_init_hw(struct txgbe_hw *hw);
11 s32 txgbe_start_hw(struct txgbe_hw *hw);
12 s32 txgbe_stop_hw(struct txgbe_hw *hw);
13 s32 txgbe_start_hw_gen2(struct txgbe_hw *hw);
14 s32 txgbe_clear_hw_cntrs(struct txgbe_hw *hw);
15 s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr);
17 void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw);
19 s32 txgbe_set_rar(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
21 s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index);
22 s32 txgbe_init_rx_addrs(struct txgbe_hw *hw);
23 s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
25 txgbe_mc_addr_itr func, bool clear);
26 s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw);
27 s32 txgbe_enable_sec_rx_path(struct txgbe_hw *hw);
28 s32 txgbe_disable_sec_tx_path(struct txgbe_hw *hw);
29 s32 txgbe_enable_sec_tx_path(struct txgbe_hw *hw);
31 s32 txgbe_validate_mac_addr(u8 *mac_addr);
32 s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask);
33 void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask);
35 s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
36 s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
38 s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq);
39 s32 txgbe_clear_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq);
40 s32 txgbe_init_uta_tables(struct txgbe_hw *hw);
41 s32 txgbe_set_vfta(struct txgbe_hw *hw, u32 vlan,
42 u32 vind, bool vlan_on, bool vlvf_bypass);
43 s32 txgbe_set_vlvf(struct txgbe_hw *hw, u32 vlan, u32 vind,
44 bool vlan_on, u32 *vfta_delta, u32 vfta,
46 s32 txgbe_clear_vfta(struct txgbe_hw *hw);
47 s32 txgbe_find_vlvf_slot(struct txgbe_hw *hw, u32 vlan, bool vlvf_bypass);
49 s32 txgbe_check_mac_link(struct txgbe_hw *hw,
51 bool *link_up, bool link_up_wait_to_complete);
53 s32 txgbe_get_wwn_prefix(struct txgbe_hw *hw, u16 *wwnn_prefix,
56 void txgbe_set_mac_anti_spoofing(struct txgbe_hw *hw, bool enable, int vf);
57 void txgbe_set_ethertype_anti_spoofing(struct txgbe_hw *hw,
59 s32 txgbe_get_device_caps(struct txgbe_hw *hw, u16 *device_caps);
60 void txgbe_clear_tx_pending(struct txgbe_hw *hw);
62 s32 txgbe_reset_pipeline_raptor(struct txgbe_hw *hw);
64 s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw);
65 s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw);
67 void txgbe_disable_rx(struct txgbe_hw *hw);
68 void txgbe_enable_rx(struct txgbe_hw *hw);
69 s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
71 bool autoneg_wait_to_complete);
72 void txgbe_set_mta(struct txgbe_hw *hw, u8 *mc_addr);
73 s32 txgbe_init_shared_code(struct txgbe_hw *hw);
74 s32 txgbe_set_mac_type(struct txgbe_hw *hw);
75 s32 txgbe_init_ops_pf(struct txgbe_hw *hw);
76 s32 txgbe_get_link_capabilities_raptor(struct txgbe_hw *hw,
77 u32 *speed, bool *autoneg);
78 u32 txgbe_get_media_type_raptor(struct txgbe_hw *hw);
79 void txgbe_disable_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
80 void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
81 void txgbe_flap_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
82 void txgbe_set_hard_rate_select_speed(struct txgbe_hw *hw,
84 s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
86 bool autoneg_wait_to_complete);
87 s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
88 bool autoneg_wait_to_complete);
89 s32 txgbe_setup_mac_link(struct txgbe_hw *hw, u32 speed,
90 bool autoneg_wait_to_complete);
91 s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw);
92 void txgbe_init_mac_link_ops(struct txgbe_hw *hw);
93 s32 txgbe_reset_hw(struct txgbe_hw *hw);
94 s32 txgbe_start_hw_raptor(struct txgbe_hw *hw);
95 s32 txgbe_init_phy_raptor(struct txgbe_hw *hw);
96 s32 txgbe_enable_rx_dma_raptor(struct txgbe_hw *hw, u32 regval);
97 bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw);
98 #endif /* _TXGBE_HW_H_ */