drivers/net/ethernet/intel/i40e/i40e_prototype.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/i40e/i40e_prototype.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/intel/i40e/i40e_prototype.h
Extension
.h
Size
20845 bytes
Lines
528
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _I40E_PROTOTYPE_H_
#define _I40E_PROTOTYPE_H_

#include <linux/ethtool.h>
#include <linux/avf/virtchnl.h>
#include "i40e_debug.h"
#include "i40e_type.h"

/* Prototypes for shared code functions that are not in
 * the standard function pointer structures.  These are
 * mostly because they are needed even before the init
 * has happened and will assist in the early SW and FW
 * setup.
 */

/* adminq functions */
int i40e_init_adminq(struct i40e_hw *hw);
void i40e_shutdown_adminq(struct i40e_hw *hw);
int i40e_clean_arq_element(struct i40e_hw *hw,
			   struct i40e_arq_event_info *e,
			   u16 *events_pending);
int
i40e_asq_send_command(struct i40e_hw *hw, struct libie_aq_desc *desc,
		      void *buff, /* can be NULL */ u16  buff_size,
		      struct i40e_asq_cmd_details *cmd_details);
int
i40e_asq_send_command_atomic(struct i40e_hw *hw, struct libie_aq_desc *desc,
			     void *buff, /* can be NULL */ u16  buff_size,
			     struct i40e_asq_cmd_details *cmd_details,
			     bool is_atomic_context);
int
i40e_asq_send_command_atomic_v2(struct i40e_hw *hw,
				struct libie_aq_desc *desc,
				void *buff, /* can be NULL */
				u16  buff_size,
				struct i40e_asq_cmd_details *cmd_details,
				bool is_atomic_context,
				enum libie_aq_err *aq_status);

/* debug function for adminq */
void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
		   void *desc, void *buffer, u16 buf_len);

bool i40e_check_asq_alive(struct i40e_hw *hw);
int i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);

int i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
			bool pf_lut, u8 *lut, u16 lut_size);
int i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 seid,
			bool pf_lut, u8 *lut, u16 lut_size);
int i40e_aq_get_rss_key(struct i40e_hw *hw,
			u16 seid,
			struct i40e_aqc_get_set_rss_key_data *key);
int i40e_aq_set_rss_key(struct i40e_hw *hw,
			u16 seid,
			struct i40e_aqc_get_set_rss_key_data *key);

u32 i40e_led_get(struct i40e_hw *hw);
void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink);
int i40e_led_set_phy(struct i40e_hw *hw, bool on,
		     u16 led_addr, u32 mode);
int i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
		     u16 *val);

/* admin send queue commands */

int i40e_aq_get_firmware_version(struct i40e_hw *hw,
				 u16 *fw_major_version, u16 *fw_minor_version,
				 u32 *fw_build,
				 u16 *api_major_version, u16 *api_minor_version,
				 struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_debug_write_register(struct i40e_hw *hw,
				 u32 reg_addr, u64 reg_val,
				 struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_debug_read_register(struct i40e_hw *hw,
				u32  reg_addr, u64 *reg_val,
				struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
			  struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id,
			    struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_clear_default_vsi(struct i40e_hw *hw, u16 vsi_id,
			      struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
				 bool qualified_modules, bool report_init,
				 struct i40e_aq_get_phy_abilities_resp *abilities,
				 struct i40e_asq_cmd_details *cmd_details);
int i40e_aq_set_phy_config(struct i40e_hw *hw,
			   struct i40e_aq_set_phy_config *config,
			   struct i40e_asq_cmd_details *cmd_details);

Annotation

Implementation Notes