* iavf_alloc_adminq_asq_ring - Allocate Admin Queue send rings
* @hw: pointer to the hardware structure
**/
-enum iavf_status_code iavf_alloc_adminq_asq_ring(struct iavf_hw *hw)
+enum iavf_status iavf_alloc_adminq_asq_ring(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code;
+ enum iavf_status ret_code;
ret_code = iavf_allocate_dma_mem(hw, &hw->aq.asq.desc_buf,
iavf_mem_atq_ring,
* iavf_alloc_adminq_arq_ring - Allocate Admin Queue receive rings
* @hw: pointer to the hardware structure
**/
-enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
+enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code;
+ enum iavf_status ret_code;
ret_code = iavf_allocate_dma_mem(hw, &hw->aq.arq.desc_buf,
iavf_mem_arq_ring,
* iavf_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue
* @hw: pointer to the hardware structure
**/
-STATIC enum iavf_status_code iavf_alloc_arq_bufs(struct iavf_hw *hw)
+STATIC enum iavf_status iavf_alloc_arq_bufs(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code;
+ enum iavf_status ret_code;
struct iavf_aq_desc *desc;
struct iavf_dma_mem *bi;
int i;
* iavf_alloc_asq_bufs - Allocate empty buffer structs for the send queue
* @hw: pointer to the hardware structure
**/
-STATIC enum iavf_status_code iavf_alloc_asq_bufs(struct iavf_hw *hw)
+STATIC enum iavf_status iavf_alloc_asq_bufs(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code;
+ enum iavf_status ret_code;
struct iavf_dma_mem *bi;
int i;
*
* Configure base address and length registers for the transmit queue
**/
-STATIC enum iavf_status_code iavf_config_asq_regs(struct iavf_hw *hw)
+STATIC enum iavf_status iavf_config_asq_regs(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
u32 reg = 0;
/* Clear Head and Tail */
*
* Configure base address and length registers for the receive (event queue)
**/
-STATIC enum iavf_status_code iavf_config_arq_regs(struct iavf_hw *hw)
+STATIC enum iavf_status iavf_config_arq_regs(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
u32 reg = 0;
/* Clear Head and Tail */
* Do *NOT* hold the lock when calling this as the memory allocation routines
* called are not going to be atomic context safe
**/
-enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
+enum iavf_status iavf_init_asq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
if (hw->aq.asq.count > 0) {
/* queue already initialized */
* Do *NOT* hold the lock when calling this as the memory allocation routines
* called are not going to be atomic context safe
**/
-enum iavf_status_code iavf_init_arq(struct iavf_hw *hw)
+enum iavf_status iavf_init_arq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
if (hw->aq.arq.count > 0) {
/* queue already initialized */
*
* The main shutdown routine for the Admin Send Queue
**/
-enum iavf_status_code iavf_shutdown_asq(struct iavf_hw *hw)
+enum iavf_status iavf_shutdown_asq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
iavf_acquire_spinlock(&hw->aq.asq_spinlock);
*
* The main shutdown routine for the Admin Receive Queue
**/
-enum iavf_status_code iavf_shutdown_arq(struct iavf_hw *hw)
+enum iavf_status iavf_shutdown_arq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
iavf_acquire_spinlock(&hw->aq.arq_spinlock);
* - hw->aq.arq_buf_size
* - hw->aq.asq_buf_size
**/
-enum iavf_status_code iavf_init_adminq(struct iavf_hw *hw)
+enum iavf_status iavf_init_adminq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code;
+ enum iavf_status ret_code;
/* verify input for valid configuration */
if ((hw->aq.num_arq_entries == 0) ||
* iavf_shutdown_adminq - shutdown routine for the Admin Queue
* @hw: pointer to the hardware structure
**/
-enum iavf_status_code iavf_shutdown_adminq(struct iavf_hw *hw)
+enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
if (iavf_check_asq_alive(hw))
iavf_aq_queue_shutdown(hw, true);
* This is the main send command driver routine for the Admin Queue send
* queue. It runs the queue, cleans the queue, etc
**/
-enum iavf_status_code iavf_asq_send_command(struct iavf_hw *hw,
+enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
struct iavf_aq_desc *desc,
void *buff, /* can be NULL */
u16 buff_size,
struct iavf_asq_cmd_details *cmd_details)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
struct iavf_dma_mem *dma_buff = NULL;
struct iavf_asq_cmd_details *details;
struct iavf_aq_desc *desc_on_ring;
* the contents through e. It can also return how many events are
* left to process through 'pending'
**/
-enum iavf_status_code iavf_clean_arq_element(struct iavf_hw *hw,
+enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
struct iavf_arq_event_info *e,
u16 *pending)
{
- enum iavf_status_code ret_code = IAVF_SUCCESS;
+ enum iavf_status ret_code = IAVF_SUCCESS;
u16 ntc = hw->aq.arq.next_to_clean;
struct iavf_aq_desc *desc;
struct iavf_dma_mem *bi;
};
/* prototype for functions used for dynamic memory allocation */
-enum iavf_status_code iavf_allocate_dma_mem(struct iavf_hw *hw,
+enum iavf_status iavf_allocate_dma_mem(struct iavf_hw *hw,
struct iavf_dma_mem *mem,
enum iavf_memory_type type,
u64 size, u32 alignment);
-enum iavf_status_code iavf_free_dma_mem(struct iavf_hw *hw,
+enum iavf_status iavf_free_dma_mem(struct iavf_hw *hw,
struct iavf_dma_mem *mem);
-enum iavf_status_code iavf_allocate_virt_mem(struct iavf_hw *hw,
+enum iavf_status iavf_allocate_virt_mem(struct iavf_hw *hw,
struct iavf_virt_mem *mem,
u32 size);
-enum iavf_status_code iavf_free_virt_mem(struct iavf_hw *hw,
+enum iavf_status iavf_free_virt_mem(struct iavf_hw *hw,
struct iavf_virt_mem *mem);
#endif /* _IAVF_ALLOC_H_ */
* This function sets the mac type of the adapter based on the
* vendor ID and device ID stored in the hw structure.
**/
-enum iavf_status_code iavf_set_mac_type(struct iavf_hw *hw)
+enum iavf_status iavf_set_mac_type(struct iavf_hw *hw)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
DEBUGFUNC("iavf_set_mac_type\n");
* @hw: pointer to the HW structure
* @stat_err: the status error code to convert
**/
-const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status_code stat_err)
+const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status stat_err)
{
switch (stat_err) {
case IAVF_SUCCESS:
* Tell the Firmware that we're shutting down the AdminQ and whether
* or not the driver is unloading as well.
**/
-enum iavf_status_code iavf_aq_queue_shutdown(struct iavf_hw *hw,
+enum iavf_status iavf_aq_queue_shutdown(struct iavf_hw *hw,
bool unloading)
{
struct iavf_aq_desc desc;
struct iavf_aqc_queue_shutdown *cmd =
(struct iavf_aqc_queue_shutdown *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_queue_shutdown);
*
* Internal function to get or set RSS look up table
**/
-STATIC enum iavf_status_code iavf_aq_get_set_rss_lut(struct iavf_hw *hw,
+STATIC enum iavf_status iavf_aq_get_set_rss_lut(struct iavf_hw *hw,
u16 vsi_id, bool pf_lut,
u8 *lut, u16 lut_size,
bool set)
{
- enum iavf_status_code status;
+ enum iavf_status status;
struct iavf_aq_desc desc;
struct iavf_aqc_get_set_rss_lut *cmd_resp =
(struct iavf_aqc_get_set_rss_lut *)&desc.params.raw;
*
* get the RSS lookup table, PF or VSI type
**/
-enum iavf_status_code iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 vsi_id,
+enum iavf_status iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 vsi_id,
bool pf_lut, u8 *lut, u16 lut_size)
{
return iavf_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size,
*
* set the RSS lookup table, PF or VSI type
**/
-enum iavf_status_code iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 vsi_id,
+enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 vsi_id,
bool pf_lut, u8 *lut, u16 lut_size)
{
return iavf_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, true);
*
* get the RSS key per VSI
**/
-STATIC enum iavf_status_code iavf_aq_get_set_rss_key(struct iavf_hw *hw,
+STATIC enum iavf_status iavf_aq_get_set_rss_key(struct iavf_hw *hw,
u16 vsi_id,
struct iavf_aqc_get_set_rss_key_data *key,
bool set)
{
- enum iavf_status_code status;
+ enum iavf_status status;
struct iavf_aq_desc desc;
struct iavf_aqc_get_set_rss_key *cmd_resp =
(struct iavf_aqc_get_set_rss_key *)&desc.params.raw;
* @key: pointer to key info struct
*
**/
-enum iavf_status_code iavf_aq_get_rss_key(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_rss_key(struct iavf_hw *hw,
u16 vsi_id,
struct iavf_aqc_get_set_rss_key_data *key)
{
*
* set the RSS key per VSI
**/
-enum iavf_status_code iavf_aq_set_rss_key(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_rss_key(struct iavf_hw *hw,
u16 vsi_id,
struct iavf_aqc_get_set_rss_key_data *key)
{
*
* Tests a MAC address to ensure it is a valid Individual Address
**/
-enum iavf_status_code iavf_validate_mac_addr(u8 *mac_addr)
+enum iavf_status iavf_validate_mac_addr(u8 *mac_addr)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
DEBUGFUNC("iavf_validate_mac_addr");
* Use the firmware to read the Rx control register,
* especially useful if the Rx unit is under heavy pressure
**/
-enum iavf_status_code iavf_aq_rx_ctl_read_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_rx_ctl_read_register(struct iavf_hw *hw,
u32 reg_addr, u32 *reg_val,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
struct iavf_aqc_rx_ctl_reg_read_write *cmd_resp =
(struct iavf_aqc_rx_ctl_reg_read_write *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
if (reg_val == NULL)
return IAVF_ERR_PARAM;
**/
u32 iavf_read_rx_ctl(struct iavf_hw *hw, u32 reg_addr)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
bool use_register;
int retry = 5;
u32 val = 0;
* Use the firmware to write to an Rx control register,
* especially useful if the Rx unit is under heavy pressure
**/
-enum iavf_status_code iavf_aq_rx_ctl_write_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_rx_ctl_write_register(struct iavf_hw *hw,
u32 reg_addr, u32 reg_val,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
struct iavf_aqc_rx_ctl_reg_read_write *cmd =
(struct iavf_aqc_rx_ctl_reg_read_write *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc, iavf_aqc_opc_rx_ctl_reg_write);
**/
void iavf_write_rx_ctl(struct iavf_hw *hw, u32 reg_addr, u32 reg_val)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
bool use_register;
int retry = 5;
*
* Write the external PHY register.
**/
-enum iavf_status_code iavf_aq_set_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_phy_register(struct iavf_hw *hw,
u8 phy_select, u8 dev_addr,
u32 reg_addr, u32 reg_val,
struct iavf_asq_cmd_details *cmd_details)
struct iavf_aq_desc desc;
struct iavf_aqc_phy_register_access *cmd =
(struct iavf_aqc_phy_register_access *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_set_phy_register);
*
* Read the external PHY register.
**/
-enum iavf_status_code iavf_aq_get_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_phy_register(struct iavf_hw *hw,
u8 phy_select, u8 dev_addr,
u32 reg_addr, u32 *reg_val,
struct iavf_asq_cmd_details *cmd_details)
struct iavf_aq_desc desc;
struct iavf_aqc_phy_register_access *cmd =
(struct iavf_aqc_phy_register_access *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_get_phy_register);
* is sent asynchronously, i.e. iavf_asq_send_command() does not wait for
* completion before returning.
**/
-enum iavf_status_code iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
+enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
enum virtchnl_ops v_opcode,
- enum iavf_status_code v_retval,
+ enum iavf_status v_retval,
u8 *msg, u16 msglen,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
struct iavf_asq_cmd_details details;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc, iavf_aqc_opc_send_msg_to_pf);
desc.flags |= CPU_TO_LE16((u16)IAVF_AQ_FLAG_SI);
* as none will be forthcoming. Immediately after calling this function,
* the admin queue should be shut down and (optionally) reinitialized.
**/
-enum iavf_status_code iavf_reset(struct iavf_hw *hw)
+enum iavf_status iavf_reset(struct iavf_hw *hw)
{
return iavf_aq_send_msg_to_pf(hw, VIRTCHNL_OP_RESET_VF,
IAVF_SUCCESS, NULL, 0, NULL);
* Set ARP offload parameters from pre-populated
* iavf_aqc_arp_proxy_data struct
**/
-enum iavf_status_code iavf_aq_set_arp_proxy_config(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_arp_proxy_config(struct iavf_hw *hw,
struct iavf_aqc_arp_proxy_data *proxy_config,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
- enum iavf_status_code status;
+ enum iavf_status status;
if (!proxy_config)
return IAVF_ERR_PARAM;
* Set IPv6 Neighbor Solicitation (NS) protocol offload parameters
* from pre-populated iavf_aqc_ns_proxy_data struct
**/
-enum iavf_status_code iavf_aq_set_ns_proxy_table_entry(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_ns_proxy_table_entry(struct iavf_hw *hw,
struct iavf_aqc_ns_proxy_data *ns_proxy_table_entry,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
- enum iavf_status_code status;
+ enum iavf_status status;
if (!ns_proxy_table_entry)
return IAVF_ERR_PARAM;
*
* Set or clear WoL filter for port attached to the PF
**/
-enum iavf_status_code iavf_aq_set_clear_wol_filter(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_clear_wol_filter(struct iavf_hw *hw,
u8 filter_index,
struct iavf_aqc_set_wol_filter_data *filter,
bool set_filter, bool no_wol_tco,
struct iavf_aq_desc desc;
struct iavf_aqc_set_wol_filter *cmd =
(struct iavf_aqc_set_wol_filter *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
u16 cmd_flags = 0;
u16 valid_flags = 0;
u16 buff_len = 0;
*
* Get information for the reason of a Wake Up event
**/
-enum iavf_status_code iavf_aq_get_wake_event_reason(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_wake_event_reason(struct iavf_hw *hw,
u16 *wake_reason,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
struct iavf_aqc_get_wake_reason_completion *resp =
(struct iavf_aqc_get_wake_reason_completion *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc, iavf_aqc_opc_get_wake_reason);
*
* Get information for the reason of a Wake Up event
**/
-enum iavf_status_code iavf_aq_clear_all_wol_filters(struct iavf_hw *hw,
+enum iavf_status iavf_aq_clear_all_wol_filters(struct iavf_hw *hw,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_clear_all_wol_filters);
* @cmd_details: pointer to command details structure or NULL
**/
enum
-iavf_status_code iavf_aq_write_ddp(struct iavf_hw *hw, void *buff,
+iavf_status iavf_aq_write_ddp(struct iavf_hw *hw, void *buff,
u16 buff_size, u32 track_id,
u32 *error_offset, u32 *error_info,
struct iavf_asq_cmd_details *cmd_details)
(struct iavf_aqc_write_personalization_profile *)
&desc.params.raw;
struct iavf_aqc_write_ddp_resp *resp;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_write_personalization_profile);
* @cmd_details: pointer to command details structure or NULL
**/
enum
-iavf_status_code iavf_aq_get_ddp_list(struct iavf_hw *hw, void *buff,
+iavf_status iavf_aq_get_ddp_list(struct iavf_hw *hw, void *buff,
u16 buff_size, u8 flags,
struct iavf_asq_cmd_details *cmd_details)
{
struct iavf_aq_desc desc;
struct iavf_aqc_get_applied_profiles *cmd =
(struct iavf_aqc_get_applied_profiles *)&desc.params.raw;
- enum iavf_status_code status;
+ enum iavf_status status;
iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_get_personalization_profile_list);
* @aq: command buffer containing all data to execute AQ
**/
STATIC enum
-iavf_status_code iavf_ddp_exec_aq_section(struct iavf_hw *hw,
+iavf_status iavf_ddp_exec_aq_section(struct iavf_hw *hw,
struct iavf_profile_aq_section *aq)
{
- enum iavf_status_code status;
+ enum iavf_status status;
struct iavf_aq_desc desc;
u8 *msg = NULL;
u16 msglen;
*
* Validates supported devices and profile's sections.
*/
-STATIC enum iavf_status_code
+STATIC enum iavf_status
iavf_validate_profile(struct iavf_hw *hw, struct iavf_profile_segment *profile,
u32 track_id, bool rollback)
{
struct iavf_profile_section_header *sec = NULL;
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
struct iavf_section_table *sec_tbl;
u32 vendor_dev_id;
u32 dev_cnt;
*
* Handles the download of a complete package.
*/
-enum iavf_status_code
+enum iavf_status
iavf_write_profile(struct iavf_hw *hw, struct iavf_profile_segment *profile,
u32 track_id)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
struct iavf_section_table *sec_tbl;
struct iavf_profile_section_header *sec = NULL;
struct iavf_profile_aq_section *ddp_aq;
*
* Rolls back previously loaded package.
*/
-enum iavf_status_code
+enum iavf_status
iavf_rollback_profile(struct iavf_hw *hw, struct iavf_profile_segment *profile,
u32 track_id)
{
struct iavf_profile_section_header *sec = NULL;
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
struct iavf_section_table *sec_tbl;
u32 offset = 0, info = 0;
u32 section_size = 0;
*
* Register a profile to the list of loaded profiles.
*/
-enum iavf_status_code
+enum iavf_status
iavf_add_pinfo_to_list(struct iavf_hw *hw,
struct iavf_profile_segment *profile,
u8 *profile_info_sec, u32 track_id)
{
- enum iavf_status_code status = IAVF_SUCCESS;
+ enum iavf_status status = IAVF_SUCCESS;
struct iavf_profile_section_header *sec = NULL;
struct iavf_profile_info *pinfo;
u32 offset = 0, info = 0;
*/
/* adminq functions */
-enum iavf_status_code iavf_init_adminq(struct iavf_hw *hw);
-enum iavf_status_code iavf_shutdown_adminq(struct iavf_hw *hw);
-enum iavf_status_code iavf_init_asq(struct iavf_hw *hw);
-enum iavf_status_code iavf_init_arq(struct iavf_hw *hw);
-enum iavf_status_code iavf_alloc_adminq_asq_ring(struct iavf_hw *hw);
-enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw);
-enum iavf_status_code iavf_shutdown_asq(struct iavf_hw *hw);
-enum iavf_status_code iavf_shutdown_arq(struct iavf_hw *hw);
+enum iavf_status iavf_init_adminq(struct iavf_hw *hw);
+enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw);
+enum iavf_status iavf_init_asq(struct iavf_hw *hw);
+enum iavf_status iavf_init_arq(struct iavf_hw *hw);
+enum iavf_status iavf_alloc_adminq_asq_ring(struct iavf_hw *hw);
+enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw);
+enum iavf_status iavf_shutdown_asq(struct iavf_hw *hw);
+enum iavf_status iavf_shutdown_arq(struct iavf_hw *hw);
u16 iavf_clean_asq(struct iavf_hw *hw);
void iavf_free_adminq_asq(struct iavf_hw *hw);
void iavf_free_adminq_arq(struct iavf_hw *hw);
-enum iavf_status_code iavf_validate_mac_addr(u8 *mac_addr);
+enum iavf_status iavf_validate_mac_addr(u8 *mac_addr);
void iavf_adminq_init_ring_data(struct iavf_hw *hw);
-enum iavf_status_code iavf_clean_arq_element(struct iavf_hw *hw,
+enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
struct iavf_arq_event_info *e,
u16 *events_pending);
-enum iavf_status_code iavf_asq_send_command(struct iavf_hw *hw,
+enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
struct iavf_aq_desc *desc,
void *buff, /* can be NULL */
u16 buff_size,
void iavf_idle_aq(struct iavf_hw *hw);
bool iavf_check_asq_alive(struct iavf_hw *hw);
-enum iavf_status_code iavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading);
+enum iavf_status iavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading);
-enum iavf_status_code iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 seid,
+enum iavf_status iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 seid,
bool pf_lut, u8 *lut, u16 lut_size);
-enum iavf_status_code iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid,
+enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid,
bool pf_lut, u8 *lut, u16 lut_size);
-enum iavf_status_code iavf_aq_get_rss_key(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_rss_key(struct iavf_hw *hw,
u16 seid,
struct iavf_aqc_get_set_rss_key_data *key);
-enum iavf_status_code iavf_aq_set_rss_key(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_rss_key(struct iavf_hw *hw,
u16 seid,
struct iavf_aqc_get_set_rss_key_data *key);
const char *iavf_aq_str(struct iavf_hw *hw, enum iavf_admin_queue_err aq_err);
-const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status_code stat_err);
+const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status stat_err);
-enum iavf_status_code iavf_set_mac_type(struct iavf_hw *hw);
+enum iavf_status iavf_set_mac_type(struct iavf_hw *hw);
extern struct iavf_rx_ptype_decoded iavf_ptype_lookup[];
/* iavf_common for VF drivers*/
void iavf_parse_hw_config(struct iavf_hw *hw,
struct virtchnl_vf_resource *msg);
-enum iavf_status_code iavf_reset(struct iavf_hw *hw);
-enum iavf_status_code iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
+enum iavf_status iavf_reset(struct iavf_hw *hw);
+enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
enum virtchnl_ops v_opcode,
- enum iavf_status_code v_retval,
+ enum iavf_status v_retval,
u8 *msg, u16 msglen,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_set_filter_control(struct iavf_hw *hw,
+enum iavf_status iavf_set_filter_control(struct iavf_hw *hw,
struct iavf_filter_control_settings *settings);
-enum iavf_status_code iavf_aq_add_rem_control_packet_filter(struct iavf_hw *hw,
+enum iavf_status iavf_aq_add_rem_control_packet_filter(struct iavf_hw *hw,
u8 *mac_addr, u16 ethtype, u16 flags,
u16 vsi_seid, u16 queue, bool is_add,
struct iavf_control_filter_stats *stats,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_debug_dump(struct iavf_hw *hw, u8 cluster_id,
+enum iavf_status iavf_aq_debug_dump(struct iavf_hw *hw, u8 cluster_id,
u8 table_id, u32 start_index, u16 buff_size,
void *buff, u16 *ret_buff_size,
u8 *ret_next_table, u32 *ret_next_index,
struct iavf_asq_cmd_details *cmd_details);
void iavf_add_filter_to_drop_tx_flow_control_frames(struct iavf_hw *hw,
u16 vsi_seid);
-enum iavf_status_code iavf_aq_rx_ctl_read_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_rx_ctl_read_register(struct iavf_hw *hw,
u32 reg_addr, u32 *reg_val,
struct iavf_asq_cmd_details *cmd_details);
u32 iavf_read_rx_ctl(struct iavf_hw *hw, u32 reg_addr);
-enum iavf_status_code iavf_aq_rx_ctl_write_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_rx_ctl_write_register(struct iavf_hw *hw,
u32 reg_addr, u32 reg_val,
struct iavf_asq_cmd_details *cmd_details);
void iavf_write_rx_ctl(struct iavf_hw *hw, u32 reg_addr, u32 reg_val);
-enum iavf_status_code iavf_aq_set_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_phy_register(struct iavf_hw *hw,
u8 phy_select, u8 dev_addr,
u32 reg_addr, u32 reg_val,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_get_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_phy_register(struct iavf_hw *hw,
u8 phy_select, u8 dev_addr,
u32 reg_addr, u32 *reg_val,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_set_arp_proxy_config(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_arp_proxy_config(struct iavf_hw *hw,
struct iavf_aqc_arp_proxy_data *proxy_config,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_set_ns_proxy_table_entry(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_ns_proxy_table_entry(struct iavf_hw *hw,
struct iavf_aqc_ns_proxy_data *ns_proxy_table_entry,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_set_clear_wol_filter(struct iavf_hw *hw,
+enum iavf_status iavf_aq_set_clear_wol_filter(struct iavf_hw *hw,
u8 filter_index,
struct iavf_aqc_set_wol_filter_data *filter,
bool set_filter, bool no_wol_tco,
bool filter_valid, bool no_wol_tco_valid,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_get_wake_event_reason(struct iavf_hw *hw,
+enum iavf_status iavf_aq_get_wake_event_reason(struct iavf_hw *hw,
u16 *wake_reason,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_aq_clear_all_wol_filters(struct iavf_hw *hw,
+enum iavf_status iavf_aq_clear_all_wol_filters(struct iavf_hw *hw,
struct iavf_asq_cmd_details *cmd_details);
-enum iavf_status_code iavf_read_phy_register_clause22(struct iavf_hw *hw,
+enum iavf_status iavf_read_phy_register_clause22(struct iavf_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
-enum iavf_status_code iavf_write_phy_register_clause22(struct iavf_hw *hw,
+enum iavf_status iavf_write_phy_register_clause22(struct iavf_hw *hw,
u16 reg, u8 phy_addr, u16 value);
-enum iavf_status_code iavf_read_phy_register_clause45(struct iavf_hw *hw,
+enum iavf_status iavf_read_phy_register_clause45(struct iavf_hw *hw,
u8 page, u16 reg, u8 phy_addr, u16 *value);
-enum iavf_status_code iavf_write_phy_register_clause45(struct iavf_hw *hw,
+enum iavf_status iavf_write_phy_register_clause45(struct iavf_hw *hw,
u8 page, u16 reg, u8 phy_addr, u16 value);
-enum iavf_status_code iavf_read_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_read_phy_register(struct iavf_hw *hw,
u8 page, u16 reg, u8 phy_addr, u16 *value);
-enum iavf_status_code iavf_write_phy_register(struct iavf_hw *hw,
+enum iavf_status iavf_write_phy_register(struct iavf_hw *hw,
u8 page, u16 reg, u8 phy_addr, u16 value);
u8 iavf_get_phy_address(struct iavf_hw *hw, u8 dev_num);
-enum iavf_status_code iavf_blink_phy_link_led(struct iavf_hw *hw,
+enum iavf_status iavf_blink_phy_link_led(struct iavf_hw *hw,
u32 time, u32 interval);
-enum iavf_status_code iavf_aq_write_ddp(struct iavf_hw *hw, void *buff,
+enum iavf_status iavf_aq_write_ddp(struct iavf_hw *hw, void *buff,
u16 buff_size, u32 track_id,
u32 *error_offset, u32 *error_info,
struct iavf_asq_cmd_details *
cmd_details);
-enum iavf_status_code iavf_aq_get_ddp_list(struct iavf_hw *hw, void *buff,
+enum iavf_status iavf_aq_get_ddp_list(struct iavf_hw *hw, void *buff,
u16 buff_size, u8 flags,
struct iavf_asq_cmd_details *
cmd_details);
struct iavf_profile_section_header *
iavf_find_section_in_profile(u32 section_type,
struct iavf_profile_segment *profile);
-enum iavf_status_code
+enum iavf_status
iavf_write_profile(struct iavf_hw *hw, struct iavf_profile_segment *iavf_seg,
u32 track_id);
-enum iavf_status_code
+enum iavf_status
iavf_rollback_profile(struct iavf_hw *hw, struct iavf_profile_segment *iavf_seg,
u32 track_id);
-enum iavf_status_code
+enum iavf_status
iavf_add_pinfo_to_list(struct iavf_hw *hw,
struct iavf_profile_segment *profile,
u8 *profile_info_sec, u32 track_id);
#define _IAVF_STATUS_H_
/* Error Codes */
-enum iavf_status_code {
+enum iavf_status {
IAVF_SUCCESS = 0,
IAVF_ERR_NVM = -1,
IAVF_ERR_NVM_CHECKSUM = -2,
}
/* memory func for base code */
-enum iavf_status_code
+enum iavf_status
iavf_allocate_dma_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_dma_mem *mem,
u64 size,
return IAVF_SUCCESS;
}
-enum iavf_status_code
+enum iavf_status
iavf_free_dma_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_dma_mem *mem)
{
return IAVF_SUCCESS;
}
-enum iavf_status_code
+enum iavf_status
iavf_allocate_virt_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_virt_mem *mem,
u32 size)
return IAVF_ERR_NO_MEMORY;
}
-enum iavf_status_code
+enum iavf_status
iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_virt_mem *mem)
{
#define ASQ_DELAY_MS 10
/* Read data in admin queue to get msg from pf driver */
-static enum iavf_status_code
+static enum iavf_status
iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
uint8_t *buf)
{
{
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
- enum iavf_status_code ret;
+ enum iavf_status ret;
int err = 0;
int i = 0;
struct iavf_arq_event_info info;
uint16_t pending, aq_opc;
enum virtchnl_ops msg_opc;
- enum iavf_status_code msg_ret;
+ enum iavf_status msg_ret;
int ret;
info.buf_len = IAVF_AQ_BUF_SZ;
*/
msg_opc = (enum virtchnl_ops)rte_le_to_cpu_32(
info.desc.cookie_high);
- msg_ret = (enum iavf_status_code)rte_le_to_cpu_32(
+ msg_ret = (enum iavf_status)rte_le_to_cpu_32(
info.desc.cookie_low);
switch (aq_opc) {
case iavf_aqc_opc_send_msg_to_vf: