xref: /freebsd/sys/dev/ixgbe/ixgbe_api.c (revision acbfc85b17d797dccd4d713fd532f4704539c84e)
1 /*******************************************************************************
2 
3   Copyright (c) 2001-2007, Intel Corporation
4   All rights reserved.
5 
6   Redistribution and use in source and binary forms, with or without
7   modification, are permitted provided that the following conditions are met:
8 
9    1. Redistributions of source code must retain the above copyright notice,
10       this list of conditions and the following disclaimer.
11 
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in the
14       documentation and/or other materials provided with the distribution.
15 
16    3. Neither the name of the Intel Corporation nor the names of its
17       contributors may be used to endorse or promote products derived from
18       this software without specific prior written permission.
19 
20   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   POSSIBILITY OF SUCH DAMAGE.
31 
32 *******************************************************************************/
33 /* $FreeBSD$ */
34 
35 #include "ixgbe_api.h"
36 #include "ixgbe_common.h"
37 
38 extern s32 ixgbe_init_shared_code_82598(struct ixgbe_hw *hw);
39 extern s32 ixgbe_init_shared_code_phy(struct ixgbe_hw *hw);
40 
41 /**
42  *  ixgbe_init_shared_code - Initialize the shared code
43  *  @hw: pointer to hardware structure
44  *
45  *  This will assign function pointers and assign the MAC type and PHY code.
46  *  Does not touch the hardware. This function must be called prior to any
47  *  other function in the shared code. The ixgbe_hw structure should be
48  *  memset to 0 prior to calling this function.  The following fields in
49  *  hw structure should be filled in prior to calling this function:
50  *  hw_addr, back, device_id, vendor_id, subsystem_device_id,
51  *   subsystem_vendor_id, and revision_id
52  **/
53 s32 ixgbe_init_shared_code(struct ixgbe_hw *hw)
54 {
55 	s32 status = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
56 
57 	/*
58 	 * Assign generic function pointers before entering adapter-specific
59 	 * init
60 	 */
61 	ixgbe_assign_func_pointers_generic(hw);
62 
63 	if (hw->vendor_id == IXGBE_INTEL_VENDOR_ID) {
64 		switch (hw->device_id) {
65 		case IXGBE_DEV_ID_82598:
66 		case IXGBE_DEV_ID_82598_FPGA:
67 		case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
68 		case IXGBE_DEV_ID_82598AF_DUAL_PORT:
69 		case IXGBE_DEV_ID_82598AT_DUAL_PORT:
70 			status = ixgbe_init_shared_code_82598(hw);
71 			status = ixgbe_init_shared_code_phy(hw);
72 			break;
73 		default:
74 			status = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
75 			break;
76 		}
77 	}
78 
79 	return status;
80 }
81 
82 /**
83  *  ixgbe_init_hw - Initialize the hardware
84  *  @hw: pointer to hardware structure
85  *
86  *  Initialize the hardware by resetting and then starting the hardware
87  **/
88 s32 ixgbe_init_hw(struct ixgbe_hw *hw)
89 {
90 	return ixgbe_call_func(hw, ixgbe_func_init_hw, (hw),
91 			       IXGBE_NOT_IMPLEMENTED);
92 }
93 
94 /**
95  *  ixgbe_reset_hw - Performs a hardware reset
96  *  @hw: pointer to hardware structure
97  *
98  *  Resets the hardware by resetting the transmit and receive units, masks and
99  *  clears all interrupts, performs a PHY reset, and performs a MAC reset
100  **/
101 s32 ixgbe_reset_hw(struct ixgbe_hw *hw)
102 {
103 	return ixgbe_call_func(hw, ixgbe_func_reset_hw, (hw),
104 			       IXGBE_NOT_IMPLEMENTED);
105 }
106 
107 /**
108  *  ixgbe_start_hw - Prepares hardware for TX/TX
109  *  @hw: pointer to hardware structure
110  *
111  *  Starts the hardware by filling the bus info structure and media type,
112  *  clears all on chip counters, initializes receive address registers,
113  *  multicast table, VLAN filter table, calls routine to setup link and
114  *  flow control settings, and leaves transmit and receive units disabled
115  *  and uninitialized.
116  **/
117 s32 ixgbe_start_hw(struct ixgbe_hw *hw)
118 {
119 	return ixgbe_call_func(hw, ixgbe_func_start_hw, (hw),
120 			       IXGBE_NOT_IMPLEMENTED);
121 }
122 
123 /**
124  *  ixgbe_clear_hw_cntrs - Clear hardware counters
125  *  @hw: pointer to hardware structure
126  *
127  *  Clears all hardware statistics counters by reading them from the hardware
128  *  Statistics counters are clear on read.
129  **/
130 s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw)
131 {
132 	return ixgbe_call_func(hw, ixgbe_func_clear_hw_cntrs, (hw),
133 			       IXGBE_NOT_IMPLEMENTED);
134 }
135 
136 /**
137  *  ixgbe_get_media_type - Get media type
138  *  @hw: pointer to hardware structure
139  *
140  *  Returns the media type (fiber, copper, backplane)
141  **/
142 enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw)
143 {
144 	return ixgbe_call_func(hw, ixgbe_func_get_media_type, (hw),
145 			       ixgbe_media_type_unknown);
146 }
147 
148 /**
149  *  ixgbe_get_mac_addr - Get MAC address
150  *  @hw: pointer to hardware structure
151  *  @mac_addr: Adapter MAC address
152  *
153  *  Reads the adapter's MAC address from the first Receive Address Register
154  *  (RAR0) A reset of the adapter must have been performed prior to calling this
155  *  function in order for the MAC address to have been loaded from the EEPROM
156  *  into RAR0
157  **/
158 s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr)
159 {
160 	return ixgbe_call_func(hw, ixgbe_func_get_mac_addr,
161 			       (hw, mac_addr), IXGBE_NOT_IMPLEMENTED);
162 }
163 
164 /**
165  *  ixgbe_get_bus_info - Set PCI bus info
166  *  @hw: pointer to hardware structure
167  *
168  *  Sets the PCI bus info (speed, width, type) within the ixgbe_hw structure
169  **/
170 s32 ixgbe_get_bus_info(struct ixgbe_hw *hw)
171 {
172 	return ixgbe_call_func(hw, ixgbe_func_get_bus_info, (hw),
173 			       IXGBE_NOT_IMPLEMENTED);
174 }
175 
176 /**
177  *  ixgbe_get_num_of_tx_queues - Get TX queues
178  *  @hw: pointer to hardware structure
179  *
180  *  Returns the number of transmit queues for the given adapter.
181  **/
182 u32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw)
183 {
184 	return ixgbe_call_func(hw, ixgbe_func_get_num_of_tx_queues,
185 			       (hw), 0);
186 }
187 
188 /**
189  *  ixgbe_get_num_of_rx_queues - Get RX queues
190  *  @hw: pointer to hardware structure
191  *
192  *  Returns the number of receive queues for the given adapter.
193  **/
194 u32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw)
195 {
196 	return ixgbe_call_func(hw, ixgbe_func_get_num_of_rx_queues,
197 			       (hw), 0);
198 }
199 
200 /**
201  *  ixgbe_stop_adapter - Disable TX/TX units
202  *  @hw: pointer to hardware structure
203  *
204  *  Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts,
205  *  disables transmit and receive units. The adapter_stopped flag is used by
206  *  the shared code and drivers to determine if the adapter is in a stopped
207  *  state and should not touch the hardware.
208  **/
209 s32 ixgbe_stop_adapter(struct ixgbe_hw *hw)
210 {
211 	return ixgbe_call_func(hw, ixgbe_func_stop_adapter, (hw),
212 			       IXGBE_NOT_IMPLEMENTED);
213 }
214 
215 /**
216  *  ixgbe_identify_phy - Get PHY type
217  *  @hw: pointer to hardware structure
218  *
219  *  Determines the physical layer module found on the current adapter.
220  **/
221 s32 ixgbe_identify_phy(struct ixgbe_hw *hw)
222 {
223 	s32 status = IXGBE_SUCCESS;
224 
225 	if (hw->phy.type == ixgbe_phy_unknown) {
226 		status = ixgbe_call_func(hw,
227 					 ixgbe_func_identify_phy,
228 					 (hw),
229 					 IXGBE_NOT_IMPLEMENTED);
230 	}
231 
232 	return status;
233 }
234 
235 /**
236  *  ixgbe_reset_phy - Perform a PHY reset
237  *  @hw: pointer to hardware structure
238  **/
239 s32 ixgbe_reset_phy(struct ixgbe_hw *hw)
240 {
241 	s32 status = IXGBE_SUCCESS;
242 
243 	if (hw->phy.type == ixgbe_phy_unknown) {
244 		if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) {
245 		    status = IXGBE_ERR_PHY;
246 		}
247 	}
248 
249 	if (status == IXGBE_SUCCESS) {
250 		status = ixgbe_call_func(hw,
251 					 ixgbe_func_reset_phy,
252 					 (hw),
253 					 IXGBE_NOT_IMPLEMENTED);
254 	}
255 	return status;
256 }
257 
258 /**
259  *  ixgbe_read_phy_reg - Read PHY register
260  *  @hw: pointer to hardware structure
261  *  @reg_addr: 32 bit address of PHY register to read
262  *  @phy_data: Pointer to read data from PHY register
263  *
264  *  Reads a value from a specified PHY register
265  **/
266 s32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
267 		       u16 *phy_data)
268 {
269 	s32 status = IXGBE_SUCCESS;
270 
271 	if (hw->phy.type == ixgbe_phy_unknown) {
272 		if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) {
273 		    status = IXGBE_ERR_PHY;
274 		}
275 	}
276 
277 	if (status == IXGBE_SUCCESS) {
278 		status = ixgbe_call_func(hw,
279 					 ixgbe_func_read_phy_reg,
280 					 (hw, reg_addr, device_type, phy_data),
281 					 IXGBE_NOT_IMPLEMENTED);
282 	}
283 	return status;
284 }
285 
286 /**
287  *  ixgbe_write_phy_reg - Write PHY register
288  *  @hw: pointer to hardware structure
289  *  @reg_addr: 32 bit PHY register to write
290  *  @phy_data: Data to write to the PHY register
291  *
292  *  Writes a value to specified PHY register
293  **/
294 s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
295 			u16 phy_data)
296 {
297 	s32 status = IXGBE_SUCCESS;
298 
299 	if (hw->phy.type == ixgbe_phy_unknown) {
300 		if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) {
301 		    status = IXGBE_ERR_PHY;
302 		}
303 	}
304 
305 	if (status == IXGBE_SUCCESS) {
306 		status = ixgbe_call_func(hw,
307 					 ixgbe_func_write_phy_reg,
308 					 (hw, reg_addr, device_type, phy_data),
309 					 IXGBE_NOT_IMPLEMENTED);
310 	}
311 	return status;
312 }
313 
314 /**
315  *  ixgbe_setup_link - Configure link settings
316  *  @hw: pointer to hardware structure
317  *
318  *  Configures link settings based on values in the ixgbe_hw struct.
319  *  Restarts the link.  Performs autonegotiation if needed.
320  **/
321 s32 ixgbe_setup_link(struct ixgbe_hw *hw)
322 {
323 	return ixgbe_call_func(hw, ixgbe_func_setup_link, (hw),
324 			       IXGBE_NOT_IMPLEMENTED);
325 }
326 
327 /**
328  *  ixgbe_check_link - Get link and speed status
329  *  @hw: pointer to hardware structure
330  *
331  *  Reads the links register to determine if link is up and the current speed
332  **/
333 s32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
334 		     bool *link_up)
335 {
336 	return ixgbe_call_func(hw, ixgbe_func_check_link, (hw, speed, link_up),
337 			       IXGBE_NOT_IMPLEMENTED);
338 }
339 
340 /**
341  *  ixgbe_setup_link_speed - Set link speed
342  *  @hw: pointer to hardware structure
343  *  @speed: new link speed
344  *  @autoneg: TRUE if autonegotiation enabled
345  *
346  *  Set the link speed and restarts the link.
347  **/
348 s32 ixgbe_setup_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed,
349 			   bool autoneg,
350 			   bool autoneg_wait_to_complete)
351 {
352 	return ixgbe_call_func(hw, ixgbe_func_setup_link_speed, (hw, speed,
353 			       autoneg, autoneg_wait_to_complete),
354 			       IXGBE_NOT_IMPLEMENTED);
355 }
356 
357 /**
358  *  ixgbe_get_link_settings - Set link settings to default
359  *  @hw: pointer to hardware structure
360  *
361  *  Sets the default link settings based on attach type in the hw struct.
362  **/
363 s32 ixgbe_get_link_settings(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
364 			    bool *autoneg)
365 {
366 	return ixgbe_call_func(hw, ixgbe_func_get_link_settings, (hw, speed,
367 			       autoneg), IXGBE_NOT_IMPLEMENTED);
368 }
369 
370 /**
371  *  ixgbe_led_on - Turn on LED's
372  *  @hw: pointer to hardware structure
373  *  @index: led number to turn on
374  *
375  *  Turns on the software controllable LEDs.
376  **/
377 s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index)
378 {
379 	return ixgbe_call_func(hw, ixgbe_func_led_on, (hw, index),
380 			       IXGBE_NOT_IMPLEMENTED);
381 }
382 
383 /**
384  *  ixgbe_led_off - Turn off LED's
385  *  @hw: pointer to hardware structure
386  *  @index: led number to turn off
387  *
388  *  Turns off the software controllable LEDs.
389  **/
390 s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index)
391 {
392 	return ixgbe_call_func(hw, ixgbe_func_led_off, (hw, index),
393 			       IXGBE_NOT_IMPLEMENTED);
394 }
395 
396 /**
397  *  ixgbe_blink_led_start - Blink LED's
398  *  @hw: pointer to hardware structure
399  *  @index: led number to blink
400  *
401  *  Blink LED based on index.
402  **/
403 s32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index)
404 {
405 	return ixgbe_call_func(hw, ixgbe_func_blink_led_start, (hw, index),
406 			       IXGBE_NOT_IMPLEMENTED);
407 }
408 
409 /**
410  *  ixgbe_blink_led_stop - Stop blinking LED's
411  *  @hw: pointer to hardware structure
412  *
413  *  Stop blinking LED based on index.
414  **/
415 s32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index)
416 {
417 	return ixgbe_call_func(hw, ixgbe_func_blink_led_stop, (hw, index),
418 			       IXGBE_NOT_IMPLEMENTED);
419 }
420 
421 /**
422  *  ixgbe_init_eeprom_params - Initialiaze EEPROM parameters
423  *  @hw: pointer to hardware structure
424  *
425  *  Initializes the EEPROM parameters ixgbe_eeprom_info within the
426  *  ixgbe_hw struct in order to set up EEPROM access.
427  **/
428 s32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw)
429 {
430 	return ixgbe_call_func(hw, ixgbe_func_init_eeprom_params, (hw),
431 			       IXGBE_NOT_IMPLEMENTED);
432 }
433 
434 
435 /**
436  *  ixgbe_write_eeprom - Write word to EEPROM
437  *  @hw: pointer to hardware structure
438  *  @offset: offset within the EEPROM to be written to
439  *  @data: 16 bit word to be written to the EEPROM
440  *
441  *  Writes 16 bit value to EEPROM. If ixgbe_eeprom_update_checksum is not
442  *  called after this function, the EEPROM will most likely contain an
443  *  invalid checksum.
444  **/
445 s32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data)
446 {
447 	s32 status;
448 
449 	/*
450 	 * Initialize EEPROM parameters.  This will not do anything if the
451 	 * EEPROM structure has already been initialized
452 	 */
453 	ixgbe_init_eeprom_params(hw);
454 
455 	/* Check for invalid offset */
456 	if (offset >= hw->eeprom.word_size) {
457 		status = IXGBE_ERR_EEPROM;
458 	} else {
459 		status = ixgbe_call_func(hw,
460 					 ixgbe_func_write_eeprom,
461 					 (hw, offset, data),
462 					 IXGBE_NOT_IMPLEMENTED);
463 	}
464 
465 	return status;
466 }
467 
468 /**
469  *  ixgbe_read_eeprom - Read word from EEPROM
470  *  @hw: pointer to hardware structure
471  *  @offset: offset within the EEPROM to be read
472  *  @data: read 16 bit value from EEPROM
473  *
474  *  Reads 16 bit value from EEPROM
475  **/
476 s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data)
477 {
478 	s32 status;
479 
480 	/*
481 	 * Initialize EEPROM parameters.  This will not do anything if the
482 	 * EEPROM structure has already been initialized
483 	 */
484 	ixgbe_init_eeprom_params(hw);
485 
486 	/* Check for invalid offset */
487 	if (offset >= hw->eeprom.word_size) {
488 		status = IXGBE_ERR_EEPROM;
489 	} else {
490 		status = ixgbe_call_func(hw,
491 					 ixgbe_func_read_eeprom,
492 					 (hw, offset, data),
493 					 IXGBE_NOT_IMPLEMENTED);
494 	}
495 
496 	return status;
497 }
498 
499 /**
500  *  ixgbe_validate_eeprom_checksum - Validate EEPROM checksum
501  *  @hw: pointer to hardware structure
502  *  @checksum_val: calculated checksum
503  *
504  *  Performs checksum calculation and validates the EEPROM checksum
505  **/
506 s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val)
507 {
508 	return ixgbe_call_func(hw, ixgbe_func_validate_eeprom_checksum,
509 			       (hw, checksum_val), IXGBE_NOT_IMPLEMENTED);
510 }
511 
512 /**
513  *  ixgbe_eeprom_update_checksum - Updates the EEPROM checksum
514  *  @hw: pointer to hardware structure
515  **/
516 s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw)
517 {
518 	return ixgbe_call_func(hw, ixgbe_func_update_eeprom_checksum, (hw),
519 			       IXGBE_NOT_IMPLEMENTED);
520 }
521 
522 /**
523  *  ixgbe_set_rar - Set RX address register
524  *  @hw: pointer to hardware structure
525  *  @addr: Address to put into receive address register
526  *  @index: Receive address register to write
527  *  @vind: Vind to set RAR to
528  *  @enable_addr: set flag that address is active
529  *
530  *  Puts an ethernet address into a receive address register.
531  **/
532 s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind,
533 		  u32 enable_addr)
534 {
535 	return ixgbe_call_func(hw, ixgbe_func_set_rar, (hw, index, addr, vind,
536 			       enable_addr), IXGBE_NOT_IMPLEMENTED);
537 }
538 
539 /**
540  *  ixgbe_init_rx_addrs - Initializes receive address filters.
541  *  @hw: pointer to hardware structure
542  *
543  *  Places the MAC address in receive address register 0 and clears the rest
544  *  of the receive addresss registers. Clears the multicast table. Assumes
545  *  the receiver is in reset when the routine is called.
546  **/
547 s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw)
548 {
549 	return ixgbe_call_func(hw, ixgbe_func_init_rx_addrs, (hw),
550 			       IXGBE_NOT_IMPLEMENTED);
551 }
552 
553 /**
554  *  ixgbe_get_num_rx_addrs - Returns the number of RAR entries.
555  *  @hw: pointer to hardware structure
556  **/
557 u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw)
558 {
559 	return ixgbe_call_func(hw, ixgbe_func_get_num_rx_addrs, (hw), 0);
560 }
561 
562 /**
563  *  ixgbe_update_mc_addr_list - Updates the MAC's list of multicast addresses
564  *  @hw: pointer to hardware structure
565  *  @mc_addr_list: the list of new multicast addresses
566  *  @mc_addr_count: number of addresses
567  *  @pad: number of bytes between addresses in the list
568  *
569  *  The given list replaces any existing list. Clears the MC addrs from receive
570  *  address registers and the multicast table. Uses unsed receive address
571  *  registers for the first multicast addresses, and hashes the rest into the
572  *  multicast table.
573  **/
574 s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
575 			      u32 mc_addr_count, u32 pad)
576 {
577 	return ixgbe_call_func(hw, ixgbe_func_update_mc_addr_list, (hw,
578 			       mc_addr_list, mc_addr_count,  pad),
579 			       IXGBE_NOT_IMPLEMENTED);
580 }
581 
582 /**
583  *  ixgbe_enable_mc - Enable multicast address in RAR
584  *  @hw: pointer to hardware structure
585  *
586  *  Enables multicast address in RAR and the use of the multicast hash table.
587  **/
588 s32 ixgbe_enable_mc(struct ixgbe_hw *hw)
589 {
590 	return ixgbe_call_func(hw, ixgbe_func_enable_mc, (hw),
591 			       IXGBE_NOT_IMPLEMENTED);
592 }
593 
594 /**
595  *  ixgbe_disable_mc - Disable multicast address in RAR
596  *  @hw: pointer to hardware structure
597  *
598  *  Disables multicast address in RAR and the use of the multicast hash table.
599  **/
600 s32 ixgbe_disable_mc(struct ixgbe_hw *hw)
601 {
602 	return ixgbe_call_func(hw, ixgbe_func_disable_mc, (hw),
603 			       IXGBE_NOT_IMPLEMENTED);
604 }
605 
606 /**
607  *  ixgbe_clear_vfta - Clear VLAN filter table
608  *  @hw: pointer to hardware structure
609  *
610  *  Clears the VLAN filer table, and the VMDq index associated with the filter
611  **/
612 s32 ixgbe_clear_vfta(struct ixgbe_hw *hw)
613 {
614 	return ixgbe_call_func(hw, ixgbe_func_clear_vfta, (hw),
615 			       IXGBE_NOT_IMPLEMENTED);
616 }
617 
618 /**
619  *  ixgbe_set_vfta - Set VLAN filter table
620  *  @hw: pointer to hardware structure
621  *  @vlan: VLAN id to write to VLAN filter
622  *  @vind: VMDq output index that maps queue to VLAN id in VFTA
623  *  @vlan_on: boolean flag to turn on/off VLAN in VFTA
624  *
625  *  Turn on/off specified VLAN in the VLAN filter table.
626  **/
627 s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on)
628 {
629 	return ixgbe_call_func(hw, ixgbe_func_set_vfta, (hw, vlan, vind,
630 			       vlan_on), IXGBE_NOT_IMPLEMENTED);
631 }
632 
633 /**
634  *  ixgbe_setup_fc - Set flow control
635  *  @hw: pointer to hardware structure
636  *  @packetbuf_num: packet buffer number (0-7)
637  *
638  *  Configures the flow control settings based on SW configuration.
639  **/
640 s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
641 {
642 	return ixgbe_call_func(hw, ixgbe_func_setup_fc, (hw, packetbuf_num),
643 			       IXGBE_NOT_IMPLEMENTED);
644 }
645 
646