1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2013 - 2018 Intel Corporation. */ 3 4 #ifndef _IAVF_PROTOTYPE_H_ 5 #define _IAVF_PROTOTYPE_H_ 6 7 #include <linux/net/intel/virtchnl.h> 8 9 #include "iavf_type.h" 10 #include "iavf_alloc.h" 11 12 /* Prototypes for shared code functions that are not in 13 * the standard function pointer structures. These are 14 * mostly because they are needed even before the init 15 * has happened and will assist in the early SW and FW 16 * setup. 17 */ 18 19 /* adminq functions */ 20 enum iavf_status iavf_init_adminq(struct iavf_hw *hw); 21 enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw); 22 enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, 23 struct iavf_arq_event_info *e, 24 u16 *events_pending); 25 enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, 26 struct libie_aq_desc *desc, 27 void *buff, /* can be NULL */ 28 u16 buff_size, 29 struct iavf_asq_cmd_details *cmd_details); 30 bool iavf_asq_done(struct iavf_hw *hw); 31 32 /* debug function for adminq */ 33 void iavf_debug_aq(struct iavf_hw *hw, enum iavf_debug_mask mask, 34 void *desc, void *buffer, u16 buf_len); 35 36 bool iavf_check_asq_alive(struct iavf_hw *hw); 37 enum iavf_status iavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading); 38 const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status stat_err); 39 40 enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid, 41 bool pf_lut, u8 *lut, u16 lut_size); 42 enum iavf_status iavf_aq_set_rss_key(struct iavf_hw *hw, u16 seid, 43 struct iavf_aqc_get_set_rss_key_data *key); 44 45 void iavf_vf_parse_hw_config(struct iavf_hw *hw, 46 struct virtchnl_vf_resource *msg); 47 enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw, 48 enum virtchnl_ops v_opcode, 49 enum iavf_status v_retval, 50 u8 *msg, u16 msglen, 51 struct iavf_asq_cmd_details *cmd_details); 52 #endif /* _IAVF_PROTOTYPE_H_ */ 53