xref: /openbsd/sys/dev/pci/ixgbe.h (revision 42152828)
1 /*	$OpenBSD: ixgbe.h,v 1.37 2024/10/27 04:44:41 yasuoka Exp $	*/
2 
3 /******************************************************************************
4 
5   Copyright (c) 2001-2008, Intel Corporation
6   All rights reserved.
7 
8   Redistribution and use in source and binary forms, with or without
9   modification, are permitted provided that the following conditions are met:
10 
11    1. Redistributions of source code must retain the above copyright notice,
12       this list of conditions and the following disclaimer.
13 
14    2. Redistributions in binary form must reproduce the above copyright
15       notice, this list of conditions and the following disclaimer in the
16       documentation and/or other materials provided with the distribution.
17 
18    3. Neither the name of the Intel Corporation nor the names of its
19       contributors may be used to endorse or promote products derived from
20       this software without specific prior written permission.
21 
22   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32   POSSIBILITY OF SUCH DAMAGE.
33 
34 ******************************************************************************/
35 /* FreeBSD: src/sys/dev/ixgbe/ixgbe_osdep.h 326022 2017-11-20 19:36:21Z pfg $*/
36 /* FreeBSD: src/sys/dev/ixgbe/ixgbe_common.h 326022 2017-11-20 19:36:21Z pfg $*/
37 
38 
39 #ifndef _IXGBE_H_
40 #define _IXGBE_H_
41 
42 #include "bpfilter.h"
43 #include "vlan.h"
44 #include "kstat.h"
45 
46 #include <sys/param.h>
47 #include <sys/systm.h>
48 #include <sys/sockio.h>
49 #include <sys/mbuf.h>
50 #include <sys/malloc.h>
51 #include <sys/kernel.h>
52 #include <sys/device.h>
53 #include <sys/socket.h>
54 #include <sys/timeout.h>
55 #include <sys/pool.h>
56 #include <sys/rwlock.h>
57 #include <sys/intrmap.h>
58 #include <sys/atomic.h>
59 #include <sys/kstat.h>
60 
61 #include <net/if.h>
62 #include <net/if_media.h>
63 #include <net/route.h>
64 #include <net/toeplitz.h>
65 
66 #include <netinet/in.h>
67 #include <netinet/if_ether.h>
68 #include <netinet/tcp.h>
69 #include <netinet/tcp_timer.h>
70 #include <netinet/tcp_var.h>
71 
72 #if NBPFILTER > 0
73 #include <net/bpf.h>
74 #endif
75 
76 typedef int	boolean_t;
77 #define TRUE	1
78 #define FALSE	0
79 
80 #include <dev/pci/pcireg.h>
81 #include <dev/pci/pcivar.h>
82 #include <dev/pci/pcidevs.h>
83 #include <dev/pci/ixgbe_type.h>
84 
85 #define DBG 0
86 #define MSGOUT(S, A, B)     printf(S "\n", A, B)
87 #define DEBUGFUNC(F)        DEBUGOUT(F);
88 #if DBG
89 	#define DEBUGOUT(S)         printf(S "\n")
90 	#define DEBUGOUT1(S,A)      printf(S "\n",A)
91 	#define DEBUGOUT2(S,A,B)    printf(S "\n",A,B)
92 	#define DEBUGOUT3(S,A,B,C)  printf(S "\n",A,B,C)
93 	#define DEBUGOUT4(S,A,B,C,D)  printf(S "\n",A,B,C,D)
94 	#define DEBUGOUT5(S,A,B,C,D,E)  printf(S "\n",A,B,C,D,E)
95 	#define DEBUGOUT6(S,A,B,C,D,E,F)  printf(S "\n",A,B,C,D,E,F)
96 	#define DEBUGOUT7(S,A,B,C,D,E,F,G)  printf(S "\n",A,B,C,D,E,F,G)
97 	#define ERROR_REPORT1(S,A)      printf(S "\n",A)
98 	#define ERROR_REPORT2(S,A,B)    printf(S "\n",A,B)
99 	#define ERROR_REPORT3(S,A,B,C)  printf(S "\n",A,B,C)
100 #else
101 	#define DEBUGOUT(S)
102 	#define DEBUGOUT1(S,A)
103 	#define DEBUGOUT2(S,A,B)
104 	#define DEBUGOUT3(S,A,B,C)
105 	#define DEBUGOUT4(S,A,B,C,D)
106 	#define DEBUGOUT5(S,A,B,C,D,E)
107 	#define DEBUGOUT6(S,A,B,C,D,E,F)
108 	#define DEBUGOUT7(S,A,B,C,D,E,F,G)
109 
110 	#define ERROR_REPORT1(S,A)
111 	#define ERROR_REPORT2(S,A,B)
112 	#define ERROR_REPORT3(S,A,B,C)
113 #endif
114 
115 #define FALSE		    		0
116 #define TRUE		    		1
117 #define CMD_MEM_WRT_INVALIDATE          0x0010  /* BIT_4 */
118 #define PCI_COMMAND_REGISTER            PCIR_COMMAND
119 
120 /* Compat glue */
121 #define PCIR_BAR(_x)	(0x10 + (_x) * 4)
122 #define roundup2(size, unit) (((size) + (unit) - 1) & ~((unit) - 1))
123 #define usec_delay(x) delay(x)
124 #define msec_delay(x) delay(1000 * (x))
125 
126 /* This is needed by the shared code */
127 struct ixgbe_hw;
128 
129 struct ixgbe_osdep {
130 	bus_dma_tag_t		 os_dmat;
131 	bus_space_tag_t		 os_memt;
132 	bus_space_handle_t	 os_memh;
133 
134 	bus_size_t		 os_memsize;
135 	bus_addr_t		 os_membase;
136 
137 	void			*os_sc;
138 	struct pci_attach_args	 os_pa;
139 };
140 
141 extern uint16_t ixgbe_read_pci_cfg(struct ixgbe_hw *, uint32_t);
142 #define IXGBE_READ_PCIE_WORD ixgbe_read_pci_cfg
143 
144 extern void ixgbe_write_pci_cfg(struct ixgbe_hw *, uint32_t, uint16_t);
145 #define IXGBE_WRITE_PCIE_WORD ixgbe_write_pci_cfg
146 
147 #define IXGBE_WRITE_FLUSH(a)						\
148 	IXGBE_READ_REG(a, IXGBE_STATUS)
149 #define IXGBE_READ_REG(a, reg)						\
150 	bus_space_read_4(((struct ixgbe_osdep *)(a)->back)->os_memt,	\
151 	((struct ixgbe_osdep *)(a)->back)->os_memh, reg)
152 #define IXGBE_WRITE_REG(a, reg, value)					\
153 	bus_space_write_4(((struct ixgbe_osdep *)(a)->back)->os_memt,	\
154 	((struct ixgbe_osdep *)(a)->back)->os_memh, reg, value)
155 #define IXGBE_READ_REG_ARRAY(a, reg, offset)				\
156 	bus_space_read_4(((struct ixgbe_osdep *)(a)->back)->os_memt,	\
157 	((struct ixgbe_osdep *)(a)->back)->os_memh, (reg + ((offset) << 2)))
158 #define IXGBE_WRITE_REG_ARRAY(a, reg, offset, value)			\
159 	bus_space_write_4(((struct ixgbe_osdep *)(a)->back)->os_memt,	\
160 	((struct ixgbe_osdep *)(a)->back)->os_memh, (reg + ((offset) << 2)), value)
161 
162 #define IXGBE_REMOVED(a) (0)
163 
164 /* MAC Operations */
165 uint16_t ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);
166 int32_t ixgbe_init_ops_generic(struct ixgbe_hw *hw);
167 int32_t ixgbe_init_hw_generic(struct ixgbe_hw *hw);
168 int32_t ixgbe_start_hw_generic(struct ixgbe_hw *hw);
169 int32_t ixgbe_start_hw_gen2(struct ixgbe_hw *hw);
170 int32_t ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw);
171 int32_t ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, uint8_t *mac_addr);
172 int32_t ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
173 void    ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw);
174 int32_t ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
175 
176 int32_t ixgbe_led_on_generic(struct ixgbe_hw *hw, uint32_t index);
177 int32_t ixgbe_led_off_generic(struct ixgbe_hw *hw, uint32_t index);
178 
179 int32_t ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
180 int32_t ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, uint16_t offset, uint16_t data);
181 int32_t ixgbe_read_eerd_generic(struct ixgbe_hw *hw, uint16_t offset, uint16_t *data);
182 int32_t ixgbe_write_eewr_generic(struct ixgbe_hw *hw, uint16_t offset, uint16_t data);
183 int32_t ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, uint16_t offset,
184 					   uint16_t *data);
185 int32_t ixgbe_calc_eeprom_checksum_generic(struct ixgbe_hw *hw);
186 int32_t ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw,
187 					       uint16_t *checksum_val);
188 int32_t ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw);
189 int32_t ixgbe_poll_eerd_eewr_done(struct ixgbe_hw *hw, uint32_t ee_reg);
190 
191 int32_t ixgbe_set_rar_generic(struct ixgbe_hw *hw, uint32_t index, uint8_t *addr, uint32_t vmdq,
192 			      uint32_t enable_addr);
193 int32_t ixgbe_clear_rar_generic(struct ixgbe_hw *hw, uint32_t index);
194 int32_t ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw);
195 int32_t ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, uint8_t *mc_addr_list,
196 					  uint32_t mc_addr_count,
197 					  ixgbe_mc_addr_itr func, bool clear);
198 int32_t ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
199 int32_t ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
200 int32_t ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, uint32_t regval);
201 int32_t ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw);
202 int32_t ixgbe_enable_sec_rx_path_generic(struct ixgbe_hw *hw);
203 
204 int32_t ixgbe_fc_enable_generic(struct ixgbe_hw *hw);
205 void ixgbe_fc_autoneg(struct ixgbe_hw *hw);
206 int32_t ixgbe_setup_fc_generic(struct ixgbe_hw *hw);
207 
208 int32_t ixgbe_validate_mac_addr(uint8_t *mac_addr);
209 int32_t ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, uint32_t mask);
210 void    ixgbe_release_swfw_sync(struct ixgbe_hw *hw, uint32_t mask);
211 int32_t ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
212 
213 int32_t prot_autoc_read_generic(struct ixgbe_hw *hw, bool *, uint32_t *reg_val);
214 int32_t prot_autoc_write_generic(struct ixgbe_hw *hw, uint32_t reg_val, bool locked);
215 
216 int32_t ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, uint32_t index);
217 int32_t ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, uint32_t index);
218 
219 int32_t ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, uint32_t rar, uint32_t vmdq);
220 int32_t ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, uint32_t rar, uint32_t vmdq);
221 int32_t ixgbe_insert_mac_addr_generic(struct ixgbe_hw *hw, uint8_t *addr, uint32_t vmdq);
222 int32_t ixgbe_init_uta_tables_generic(struct ixgbe_hw *hw);
223 int32_t ixgbe_set_vfta_generic(struct ixgbe_hw *hw, uint32_t vlan,
224 			       uint32_t vind, bool vlan_on, bool);
225 int32_t ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, uint32_t vlan, uint32_t vind,
226 			       bool vlan_on, uint32_t*, uint32_t, bool);
227 int32_t ixgbe_clear_vfta_generic(struct ixgbe_hw *hw);
228 
229 int32_t ixgbe_check_mac_link_generic(struct ixgbe_hw *hw,
230 				     ixgbe_link_speed *speed,
231 				     bool *link_up,
232 				     bool link_up_wait_to_complete);
233 
234 int32_t ixgbe_get_device_caps_generic(struct ixgbe_hw *hw,
235 				      uint16_t *device_caps);
236 int32_t ixgbe_host_interface_command(struct ixgbe_hw *hw, uint32_t *buffer,
237 				     uint32_t length, uint32_t timeout,
238 				     bool return_data);
239 int32_t ixgbe_hic_unlocked(struct ixgbe_hw *, uint32_t *buffer, uint32_t length, uint32_t timeout);
240 void ixgbe_clear_tx_pending(struct ixgbe_hw *hw);
241 
242 bool ixgbe_mng_present(struct ixgbe_hw *hw);
243 bool ixgbe_mng_enabled(struct ixgbe_hw *hw);
244 
245 void ixgbe_disable_rx_generic(struct ixgbe_hw *hw);
246 void ixgbe_enable_rx_generic(struct ixgbe_hw *hw);
247 int32_t ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
248 					      ixgbe_link_speed speed,
249 					      bool autoneg_wait_to_complete);
250 void ixgbe_set_soft_rate_select_speed(struct ixgbe_hw *hw,
251 				      ixgbe_link_speed speed);
252 
253 int32_t ixgbe_negotiate_fc(struct ixgbe_hw *hw, uint32_t adv_reg, uint32_t lp_reg,
254 			uint32_t adv_sym, uint32_t adv_asm, uint32_t lp_sym, uint32_t lp_asm);
255 
256 int32_t ixgbe_init_shared_code(struct ixgbe_hw *hw);
257 
258 int32_t ixgbe_init_ops_82598(struct ixgbe_hw *hw);
259 int32_t ixgbe_init_ops_82599(struct ixgbe_hw *hw);
260 int32_t ixgbe_init_ops_X540(struct ixgbe_hw *hw);
261 int32_t ixgbe_init_ops_X550(struct ixgbe_hw *hw);
262 int32_t ixgbe_init_ops_X550EM(struct ixgbe_hw *hw);
263 int32_t ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw);
264 int32_t ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw);
265 
266 int32_t ixgbe_set_mac_type(struct ixgbe_hw *hw);
267 int32_t ixgbe_init_hw(struct ixgbe_hw *hw);
268 enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw);
269 int32_t ixgbe_identify_phy(struct ixgbe_hw *hw);
270 void ixgbe_flap_tx_laser(struct ixgbe_hw *hw);
271 int32_t ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
272 			 bool *link_up, bool link_up_wait_to_complete);
273 
274 int32_t ixgbe_set_rar(struct ixgbe_hw *hw, uint32_t index, uint8_t *addr,
275 		      uint32_t vmdq, uint32_t enable_addr);
276 int32_t ixgbe_set_vmdq(struct ixgbe_hw *hw, uint32_t rar, uint32_t vmdq);
277 int32_t ixgbe_clear_vmdq(struct ixgbe_hw *hw, uint32_t rar, uint32_t vmdq);
278 int32_t ixgbe_init_uta_tables(struct ixgbe_hw *hw);
279 
280 void ixgbe_add_uc_addr(struct ixgbe_hw *hw, uint8_t *addr, uint32_t vmdq);
281 int32_t ixgbe_mta_vector(struct ixgbe_hw *hw, uint8_t *mc_addr);
282 void ixgbe_set_mta(struct ixgbe_hw *hw, uint8_t *mc_addr);
283 
284 void ixgbe_disable_rx(struct ixgbe_hw *hw);
285 void ixgbe_enable_rx(struct ixgbe_hw *hw);
286 
287 /* PHY */
288 int32_t ixgbe_init_phy_ops_generic(struct ixgbe_hw *hw);
289 bool ixgbe_validate_phy_addr(struct ixgbe_hw *hw, uint32_t phy_addr);
290 enum ixgbe_phy_type ixgbe_get_phy_type_from_id(uint32_t phy_id);
291 int32_t ixgbe_get_phy_id(struct ixgbe_hw *hw);
292 int32_t ixgbe_identify_phy_generic(struct ixgbe_hw *hw);
293 int32_t ixgbe_reset_phy_generic(struct ixgbe_hw *hw);
294 int32_t ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, uint32_t reg_addr,
295 			       uint32_t device_type, uint16_t *phy_data);
296 int32_t ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, uint32_t reg_addr,
297 				uint32_t device_type, uint16_t phy_data);
298 int32_t ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, uint32_t reg_addr,
299 				   uint32_t device_type, uint16_t *phy_data);
300 int32_t ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, uint32_t reg_addr,
301 				    uint32_t device_type, uint16_t phy_data);
302 int32_t ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw);
303 int32_t ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
304 					   ixgbe_link_speed speed,
305 					   bool autoneg_wait_to_complete);
306 int32_t ixgbe_get_copper_link_capabilities_generic(struct ixgbe_hw *hw,
307 						   ixgbe_link_speed *speed,
308 						   bool *autoneg);
309 int32_t ixgbe_check_reset_blocked(struct ixgbe_hw *hw);
310 
311 /* PHY specific */
312 int32_t ixgbe_check_phy_link_tnx(struct ixgbe_hw *hw,
313 				 ixgbe_link_speed *speed,
314 				 bool *link_up);
315 int32_t ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw);
316 int32_t ixgbe_get_phy_firmware_version_tnx(struct ixgbe_hw *hw,
317 					   uint16_t *firmware_version);
318 int32_t ixgbe_get_phy_firmware_version_generic(struct ixgbe_hw *hw,
319 					       uint16_t *firmware_version);
320 
321 int32_t ixgbe_reset_phy_nl(struct ixgbe_hw *hw);
322 bool ixgbe_is_sfp(struct ixgbe_hw *hw);
323 int32_t ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on);
324 int32_t ixgbe_identify_module_generic(struct ixgbe_hw *hw);
325 int32_t ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw);
326 uint64_t ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw);
327 int32_t ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw);
328 int32_t ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
329 					    uint16_t *list_offset,
330 					    uint16_t *data_offset);
331 int32_t ixgbe_tn_check_overtemp(struct ixgbe_hw *hw);
332 int32_t ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, uint8_t byte_offset,
333 				    uint8_t dev_addr, uint8_t *data);
334 int32_t ixgbe_read_i2c_byte_generic_unlocked(struct ixgbe_hw *hw, uint8_t byte_offset,
335 					     uint8_t dev_addr, uint8_t *data);
336 int32_t ixgbe_write_i2c_byte_generic(struct ixgbe_hw *hw, uint8_t byte_offset,
337 				     uint8_t dev_addr, uint8_t data);
338 int32_t ixgbe_write_i2c_byte_generic_unlocked(struct ixgbe_hw *hw, uint8_t byte_offset,
339 					      uint8_t dev_addr, uint8_t data);
340 int32_t ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, uint8_t byte_offset,
341 				      uint8_t *eeprom_data);
342 int32_t ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, uint8_t byte_offset,
343 				       uint8_t eeprom_data);
344 void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw);
345 int32_t ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *, uint8_t addr, uint16_t reg,
346 					uint16_t *val, bool lock);
347 int32_t ixgbe_read_i2c_combined_generic(struct ixgbe_hw *, uint8_t addr, uint16_t reg,
348 					uint16_t *val);
349 int32_t ixgbe_read_i2c_combined_generic_unlocked(struct ixgbe_hw *, uint8_t addr,
350 						 uint16_t reg, uint16_t *val);
351 int32_t ixgbe_write_i2c_combined_generic_int(struct ixgbe_hw *, uint8_t addr, uint16_t reg,
352 					uint16_t val, bool lock);
353 int32_t ixgbe_write_i2c_combined_generic(struct ixgbe_hw *, uint8_t addr, uint16_t reg,
354 					 uint16_t val);
355 int32_t ixgbe_write_i2c_combined_generic_unlocked(struct ixgbe_hw *, uint8_t addr,
356 						  uint16_t reg, uint16_t val);
357 
358 /* Virtual Functions */
359 int32_t ixgbe_init_ops_vf(struct ixgbe_hw *hw);
360 int32_t ixgbe_init_hw_vf(struct ixgbe_hw *hw);
361 int32_t ixgbe_start_hw_vf(struct ixgbe_hw *hw);
362 int32_t ixgbe_reset_hw_vf(struct ixgbe_hw *hw);
363 int32_t ixgbe_stop_adapter_vf(struct ixgbe_hw *hw);
364 uint32_t ixgbe_get_num_of_tx_queues_vf(struct ixgbe_hw *hw);
365 uint32_t ixgbe_get_num_of_rx_queues_vf(struct ixgbe_hw *hw);
366 int32_t ixgbe_get_mac_addr_vf(struct ixgbe_hw *hw, uint8_t *mac_addr);
367 int32_t ixgbe_setup_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed speed,
368 			    bool autoneg_wait_to_complete);
369 int32_t ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
370 			    bool *link_up, bool autoneg_wait_to_complete);
371 int32_t ixgbe_set_rar_vf(struct ixgbe_hw *hw, uint32_t index, uint8_t *addr, uint32_t vmdq,
372 		     uint32_t enable_addr);
373 int32_t ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, uint32_t index, uint8_t *addr);
374 int32_t ixgbe_update_mc_addr_list_vf(struct ixgbe_hw *hw, uint8_t *mc_addr_list,
375 				 uint32_t mc_addr_count, ixgbe_mc_addr_itr,
376 				 bool clear);
377 int32_t ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode);
378 int32_t ixgbe_get_link_state_vf(struct ixgbe_hw *hw, bool *link_state);
379 int32_t ixgbe_set_vfta_vf(struct ixgbe_hw *hw, uint32_t vlan, uint32_t vind,
380 		      bool vlan_on, bool vlvf_bypass);
381 int32_t ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, uint16_t max_size);
382 int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api);
383 int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
384 		       unsigned int *default_tc);
385 
386 /* MBX */
387 int32_t ixgbe_read_mbx(struct ixgbe_hw *, uint32_t *, uint16_t, uint16_t);
388 int32_t ixgbe_poll_mbx(struct ixgbe_hw *, uint32_t *, uint16_t, uint16_t);
389 int32_t ixgbe_write_mbx(struct ixgbe_hw *, uint32_t *, uint16_t, uint16_t);
390 int32_t ixgbe_read_posted_mbx(struct ixgbe_hw *, uint32_t *, uint16_t, uint16_t);
391 int32_t ixgbe_write_posted_mbx(struct ixgbe_hw *, uint32_t *, uint16_t, uint16_t);
392 int32_t ixgbe_check_for_msg(struct ixgbe_hw *, uint16_t);
393 int32_t ixgbe_check_for_ack(struct ixgbe_hw *, uint16_t);
394 int32_t ixgbe_check_for_rst(struct ixgbe_hw *, uint16_t);
395 void ixgbe_init_mbx_ops_generic(struct ixgbe_hw *hw);
396 void ixgbe_init_mbx_params_vf(struct ixgbe_hw *);
397 void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *);
398 void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);
399 void ixgbe_upgrade_mbx_params_pf(struct ixgbe_hw *, uint16_t);
400 
401 #endif /* _IXGBE_H_ */
402