#include <linux/module.h>
#include "be.h"
#include "be_cmds.h"
const char * const be_misconfig_evt_port_state[] = …;
static char *be_port_misconfig_evt_severity[] = …;
static char *phy_state_oper_desc[] = …;
static struct be_cmd_priv_map cmd_priv_map[] = …;
static bool be_cmd_allowed(struct be_adapter *adapter, u8 opcode, u8 subsystem)
{ … }
static inline void *embedded_payload(struct be_mcc_wrb *wrb)
{ … }
static int be_mcc_notify(struct be_adapter *adapter)
{ … }
static inline bool be_mcc_compl_is_new(struct be_mcc_compl *compl)
{ … }
static inline void be_mcc_compl_use(struct be_mcc_compl *compl)
{ … }
static struct be_cmd_resp_hdr *be_decode_resp_hdr(u32 tag0, u32 tag1)
{ … }
static bool be_skip_err_log(u8 opcode, u16 base_status, u16 addl_status)
{ … }
static void be_async_cmd_process(struct be_adapter *adapter,
struct be_mcc_compl *compl,
struct be_cmd_resp_hdr *resp_hdr)
{ … }
static int be_mcc_compl_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_link_state_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_port_misconfig_event_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_grp5_cos_priority_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_grp5_qos_speed_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
#define MGMT_ENABLE_MASK …
static void be_async_grp5_fw_control_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_grp5_evt_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static void be_async_dbg_evt_process(struct be_adapter *adapter,
struct be_mcc_compl *cmp)
{ … }
static void be_async_sliport_evt_process(struct be_adapter *adapter,
struct be_mcc_compl *cmp)
{ … }
static inline bool is_link_state_evt(u32 flags)
{ … }
static inline bool is_grp5_evt(u32 flags)
{ … }
static inline bool is_dbg_evt(u32 flags)
{ … }
static inline bool is_sliport_evt(u32 flags)
{ … }
static void be_mcc_event_process(struct be_adapter *adapter,
struct be_mcc_compl *compl)
{ … }
static struct be_mcc_compl *be_mcc_compl_get(struct be_adapter *adapter)
{ … }
void be_async_mcc_enable(struct be_adapter *adapter)
{ … }
void be_async_mcc_disable(struct be_adapter *adapter)
{ … }
int be_process_mcc(struct be_adapter *adapter)
{ … }
static int be_mcc_wait_compl(struct be_adapter *adapter)
{ … }
static int be_mcc_notify_wait(struct be_adapter *adapter)
{ … }
static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
{ … }
static int be_mbox_notify_wait(struct be_adapter *adapter)
{ … }
u16 be_POST_stage_get(struct be_adapter *adapter)
{ … }
static int lancer_wait_ready(struct be_adapter *adapter)
{ … }
int be_fw_wait_ready(struct be_adapter *adapter)
{ … }
static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb)
{ … }
static inline void fill_wrb_tags(struct be_mcc_wrb *wrb, unsigned long addr)
{ … }
static void be_wrb_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
u8 subsystem, u8 opcode, int cmd_len,
struct be_mcc_wrb *wrb,
struct be_dma_mem *mem)
{ … }
static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages,
struct be_dma_mem *mem)
{ … }
static inline struct be_mcc_wrb *wrb_from_mbox(struct be_adapter *adapter)
{ … }
static struct be_mcc_wrb *wrb_from_mccq(struct be_adapter *adapter)
{ … }
static bool use_mcc(struct be_adapter *adapter)
{ … }
static int be_cmd_lock(struct be_adapter *adapter)
{ … }
static void be_cmd_unlock(struct be_adapter *adapter)
{ … }
static struct be_mcc_wrb *be_cmd_copy(struct be_adapter *adapter,
struct be_mcc_wrb *wrb)
{ … }
static int be_cmd_notify_wait(struct be_adapter *adapter,
struct be_mcc_wrb *wrb)
{ … }
int be_cmd_fw_init(struct be_adapter *adapter)
{ … }
int be_cmd_fw_clean(struct be_adapter *adapter)
{ … }
int be_cmd_eq_create(struct be_adapter *adapter, struct be_eq_obj *eqo)
{ … }
int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
bool permanent, u32 if_handle, u32 pmac_id)
{ … }
int be_cmd_pmac_add(struct be_adapter *adapter, const u8 *mac_addr,
u32 if_id, u32 *pmac_id, u32 domain)
{ … }
int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, int pmac_id, u32 dom)
{ … }
int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq,
struct be_queue_info *eq, bool no_delay, int coalesce_wm)
{ … }
static u32 be_encoded_q_len(int q_len)
{ … }
static int be_cmd_mccq_ext_create(struct be_adapter *adapter,
struct be_queue_info *mccq,
struct be_queue_info *cq)
{ … }
static int be_cmd_mccq_org_create(struct be_adapter *adapter,
struct be_queue_info *mccq,
struct be_queue_info *cq)
{ … }
int be_cmd_mccq_create(struct be_adapter *adapter,
struct be_queue_info *mccq, struct be_queue_info *cq)
{ … }
int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo)
{ … }
int be_cmd_rxq_create(struct be_adapter *adapter,
struct be_queue_info *rxq, u16 cq_id, u16 frag_size,
u32 if_id, u32 rss, u8 *rss_id)
{ … }
int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
int queue_type)
{ … }
int be_cmd_rxq_destroy(struct be_adapter *adapter, struct be_queue_info *q)
{ … }
int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
u32 *if_handle, u32 domain)
{ … }
int be_cmd_if_destroy(struct be_adapter *adapter, int interface_id, u32 domain)
{ … }
int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
{ … }
int lancer_cmd_get_pport_stats(struct be_adapter *adapter,
struct be_dma_mem *nonemb_cmd)
{ … }
static int be_mac_to_link_speed(int mac_speed)
{ … }
int be_cmd_link_status_query(struct be_adapter *adapter, u16 *link_speed,
u8 *link_status, u32 dom)
{ … }
int be_cmd_get_die_temperature(struct be_adapter *adapter)
{ … }
int be_cmd_get_fat_dump_len(struct be_adapter *adapter, u32 *dump_size)
{ … }
int be_cmd_get_fat_dump(struct be_adapter *adapter, u32 buf_len, void *buf)
{ … }
int be_cmd_get_fw_ver(struct be_adapter *adapter)
{ … }
static int __be_cmd_modify_eqd(struct be_adapter *adapter,
struct be_set_eqd *set_eqd, int num)
{ … }
int be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
int num)
{ … }
int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id, u16 *vtag_array,
u32 num, u32 domain)
{ … }
static int __be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
{ … }
int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
{ … }
int be_cmd_set_flow_control(struct be_adapter *adapter, u32 tx_fc, u32 rx_fc)
{ … }
int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc)
{ … }
int be_cmd_query_fw_cfg(struct be_adapter *adapter)
{ … }
int be_cmd_reset_function(struct be_adapter *adapter)
{ … }
int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable,
u32 rss_hash_opts, u16 table_size, const u8 *rss_hkey)
{ … }
int be_cmd_set_beacon_state(struct be_adapter *adapter, u8 port_num,
u8 bcn, u8 sts, u8 state)
{ … }
int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state)
{ … }
int be_cmd_read_port_transceiver_data(struct be_adapter *adapter,
u8 page_num, u32 off, u32 len, u8 *data)
{ … }
static int lancer_cmd_write_object(struct be_adapter *adapter,
struct be_dma_mem *cmd, u32 data_size,
u32 data_offset, const char *obj_name,
u32 *data_written, u8 *change_status,
u8 *addn_status)
{ … }
int be_cmd_query_cable_type(struct be_adapter *adapter)
{ … }
int be_cmd_query_sfp_info(struct be_adapter *adapter)
{ … }
static int lancer_cmd_delete_object(struct be_adapter *adapter,
const char *obj_name)
{ … }
int lancer_cmd_read_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
u32 data_size, u32 data_offset, const char *obj_name,
u32 *data_read, u32 *eof, u8 *addn_status)
{ … }
static int be_cmd_write_flashrom(struct be_adapter *adapter,
struct be_dma_mem *cmd, u32 flash_type,
u32 flash_opcode, u32 img_offset, u32 buf_size)
{ … }
static int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc,
u16 img_optype, u32 img_offset, u32 crc_offset)
{ … }
static char flash_cookie[2][16] = …;
static bool phy_flashing_required(struct be_adapter *adapter)
{ … }
static bool is_comp_in_ufi(struct be_adapter *adapter,
struct flash_section_info *fsec, int type)
{ … }
static struct flash_section_info *get_fsec_info(struct be_adapter *adapter,
int header_size,
const struct firmware *fw)
{ … }
static int be_check_flash_crc(struct be_adapter *adapter, const u8 *p,
u32 img_offset, u32 img_size, int hdr_size,
u16 img_optype, bool *crc_match)
{ … }
static int be_flash(struct be_adapter *adapter, const u8 *img,
struct be_dma_mem *flash_cmd, int optype, int img_size,
u32 img_offset)
{ … }
#define NCSI_UPDATE_LOG …
static bool be_fw_ncsi_supported(char *ver)
{ … }
static int be_flash_BEx(struct be_adapter *adapter,
const struct firmware *fw,
struct be_dma_mem *flash_cmd, int num_of_images)
{ … }
static u16 be_get_img_optype(struct flash_section_entry fsec_entry)
{ … }
static int be_flash_skyhawk(struct be_adapter *adapter,
const struct firmware *fw,
struct be_dma_mem *flash_cmd, int num_of_images)
{ … }
int lancer_fw_download(struct be_adapter *adapter,
const struct firmware *fw)
{ … }
static bool be_check_ufi_compatibility(struct be_adapter *adapter,
struct flash_file_hdr_g3 *fhdr)
{ … }
int be_fw_download(struct be_adapter *adapter, const struct firmware *fw)
{ … }
int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac,
struct be_dma_mem *nonemb_cmd)
{ … }
int be_cmd_set_loopback(struct be_adapter *adapter, u8 port_num,
u8 loopback_type, u8 enable)
{ … }
int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
u32 loopback_type, u32 pkt_size, u32 num_pkts,
u64 pattern)
{ … }
int be_cmd_ddr_dma_test(struct be_adapter *adapter, u64 pattern,
u32 byte_cnt, struct be_dma_mem *cmd)
{ … }
int be_cmd_get_seeprom_data(struct be_adapter *adapter,
struct be_dma_mem *nonemb_cmd)
{ … }
int be_cmd_get_phy_info(struct be_adapter *adapter)
{ … }
static int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
{ … }
int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
{ … }
int be_cmd_req_native_mode(struct be_adapter *adapter)
{ … }
int be_cmd_get_fn_privileges(struct be_adapter *adapter, u32 *privilege,
u32 domain)
{ … }
int be_cmd_set_fn_privileges(struct be_adapter *adapter, u32 privileges,
u32 domain)
{ … }
int be_cmd_get_mac_from_list(struct be_adapter *adapter, u8 *mac,
bool *pmac_id_valid, u32 *pmac_id, u32 if_handle,
u8 domain)
{ … }
int be_cmd_get_active_mac(struct be_adapter *adapter, u32 curr_pmac_id,
u8 *mac, u32 if_handle, bool active, u32 domain)
{ … }
int be_cmd_get_perm_mac(struct be_adapter *adapter, u8 *mac)
{ … }
int be_cmd_set_mac_list(struct be_adapter *adapter, u8 *mac_array,
u8 mac_count, u32 domain)
{ … }
int be_cmd_set_mac(struct be_adapter *adapter, u8 *mac, int if_id, u32 dom)
{ … }
int be_cmd_set_hsw_config(struct be_adapter *adapter, u16 pvid,
u32 domain, u16 intf_id, u16 hsw_mode, u8 spoofchk)
{ … }
int be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid,
u32 domain, u16 intf_id, u8 *mode, bool *spoofchk)
{ … }
static bool be_is_wol_excluded(struct be_adapter *adapter)
{ … }
int be_cmd_get_acpi_wol_cap(struct be_adapter *adapter)
{ … }
int be_cmd_set_fw_log_level(struct be_adapter *adapter, u32 level)
{ … }
int be_cmd_get_fw_log_level(struct be_adapter *adapter)
{ … }
int be_cmd_get_ext_fat_capabilites(struct be_adapter *adapter,
struct be_dma_mem *cmd)
{ … }
int be_cmd_set_ext_fat_capabilites(struct be_adapter *adapter,
struct be_dma_mem *cmd,
struct be_fat_conf_params *configs)
{ … }
int be_cmd_query_port_name(struct be_adapter *adapter)
{ … }
static struct be_nic_res_desc *be_get_nic_desc(u8 *buf, u32 desc_count,
bool get_vft, u8 pf_num)
{ … }
static struct be_nic_res_desc *be_get_vft_desc(u8 *buf, u32 desc_count,
u8 pf_num)
{ … }
static struct be_nic_res_desc *be_get_func_nic_desc(u8 *buf, u32 desc_count,
u8 pf_num)
{ … }
static struct be_pcie_res_desc *be_get_pcie_desc(u8 *buf, u32 desc_count,
u8 pf_num)
{ … }
static struct be_port_res_desc *be_get_port_desc(u8 *buf, u32 desc_count)
{ … }
static void be_copy_nic_desc(struct be_resources *res,
struct be_nic_res_desc *desc)
{ … }
int be_cmd_get_func_config(struct be_adapter *adapter, struct be_resources *res)
{ … }
static u16 be_get_nic_pf_num_list(u8 *buf, u32 desc_count, u16 *nic_pf_nums)
{ … }
int be_cmd_get_profile_config(struct be_adapter *adapter,
struct be_resources *res,
struct be_port_resources *port_res,
u8 profile_type, u8 query, u8 domain)
{ … }
static int be_cmd_set_profile_config(struct be_adapter *adapter, void *desc,
int size, int count, u8 version, u8 domain)
{ … }
static void be_reset_nic_desc(struct be_nic_res_desc *nic)
{ … }
static void be_reset_pcie_desc(struct be_pcie_res_desc *pcie)
{ … }
int be_cmd_config_qos(struct be_adapter *adapter, u32 max_rate, u16 link_speed,
u8 domain)
{ … }
int be_cmd_set_sriov_config(struct be_adapter *adapter,
struct be_resources pool_res, u16 num_vfs,
struct be_resources *vft_res)
{ … }
int be_cmd_manage_iface(struct be_adapter *adapter, u32 iface, u8 op)
{ … }
int be_cmd_set_vxlan_port(struct be_adapter *adapter, __be16 port)
{ … }
int be_cmd_get_if_id(struct be_adapter *adapter, struct be_vf_cfg *vf_cfg,
int vf_num)
{ … }
static int lancer_wait_idle(struct be_adapter *adapter)
{ … }
int lancer_physdev_ctrl(struct be_adapter *adapter, u32 mask)
{ … }
bool dump_present(struct be_adapter *adapter)
{ … }
int lancer_initiate_dump(struct be_adapter *adapter)
{ … }
int lancer_delete_dump(struct be_adapter *adapter)
{ … }
int be_cmd_enable_vf(struct be_adapter *adapter, u8 domain)
{ … }
int be_cmd_intr_set(struct be_adapter *adapter, bool intr_enable)
{ … }
int be_cmd_get_active_profile(struct be_adapter *adapter, u16 *profile_id)
{ … }
static int
__be_cmd_set_logical_link_config(struct be_adapter *adapter,
int link_state, int version, u8 domain)
{ … }
int be_cmd_set_logical_link_config(struct be_adapter *adapter,
int link_state, u8 domain)
{ … }
int be_cmd_set_features(struct be_adapter *adapter)
{ … }
int be_roce_mcc_cmd(void *netdev_handle, void *wrb_payload,
int wrb_payload_size, u16 *cmd_status, u16 *ext_status)
{ … }
EXPORT_SYMBOL(…);