#include "qlcnic_sriov.h"
#include "qlcnic.h"
#include "qlcnic_hw.h"
#define QLC_83XX_RESTART_TEMPLATE_SIZE …
#define QLC_83XX_RESET_TEMPLATE_ADDR …
#define QLC_83XX_RESET_SEQ_VERSION …
#define QLC_83XX_OPCODE_NOP …
#define QLC_83XX_OPCODE_WRITE_LIST …
#define QLC_83XX_OPCODE_READ_WRITE_LIST …
#define QLC_83XX_OPCODE_POLL_LIST …
#define QLC_83XX_OPCODE_POLL_WRITE_LIST …
#define QLC_83XX_OPCODE_READ_MODIFY_WRITE …
#define QLC_83XX_OPCODE_SEQ_PAUSE …
#define QLC_83XX_OPCODE_SEQ_END …
#define QLC_83XX_OPCODE_TMPL_END …
#define QLC_83XX_OPCODE_POLL_READ_LIST …
#define QLC_83XX_RESET_CONTROL …
#define QLC_83XX_RESET_REG …
#define QLC_83XX_RESET_PORT0 …
#define QLC_83XX_RESET_PORT1 …
#define QLC_83XX_RESET_PORT2 …
#define QLC_83XX_RESET_PORT3 …
#define QLC_83XX_RESET_SRESHIM …
#define QLC_83XX_RESET_EPGSHIM …
#define QLC_83XX_RESET_ETHERPCS …
static int qlcnic_83xx_init_default_driver(struct qlcnic_adapter *adapter);
static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev);
static int qlcnic_83xx_restart_hw(struct qlcnic_adapter *adapter);
static int qlcnic_83xx_check_hw_status(struct qlcnic_adapter *p_dev);
static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *);
static void qlcnic_83xx_stop_hw(struct qlcnic_adapter *);
struct qlc_83xx_reset_hdr { … } __packed;
struct qlc_83xx_entry_hdr { … } __packed;
struct qlc_83xx_poll { … } __packed;
struct qlc_83xx_rmw { … } __packed;
struct qlc_83xx_entry { … } __packed;
struct qlc_83xx_quad_entry { … } __packed;
static const char *const qlc_83xx_idc_states[] = …;
static int
qlcnic_83xx_idc_check_driver_presence_reg(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_idc_log_state_history(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_update_audit_reg(struct qlcnic_adapter *adapter,
u8 mode, int lock)
{ … }
static void qlcnic_83xx_idc_update_minor_version(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_update_major_version(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int
qlcnic_83xx_idc_update_drv_presence_reg(struct qlcnic_adapter *adapter,
int status, int lock)
{ … }
static int qlcnic_83xx_idc_check_major_version(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_clear_registers(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int qlcnic_83xx_idc_update_drv_ack_reg(struct qlcnic_adapter *adapter,
int flag, int lock)
{ … }
static int qlcnic_83xx_idc_check_timeout(struct qlcnic_adapter *adapter,
int time_limit)
{ … }
static int qlcnic_83xx_idc_check_reset_ack_reg(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_tx_soft_reset(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_idc_detach_driver(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_idc_attach_driver(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_enter_failed_state(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int qlcnic_83xx_idc_enter_init_state(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int qlcnic_83xx_idc_enter_need_quiesce(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int
qlcnic_83xx_idc_enter_need_reset_state(struct qlcnic_adapter *adapter, int lock)
{ … }
static int qlcnic_83xx_idc_enter_ready_state(struct qlcnic_adapter *adapter,
int lock)
{ … }
static int qlcnic_83xx_idc_find_reset_owner_id(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_restart_hw(struct qlcnic_adapter *adapter, int lock)
{ … }
static int qlcnic_83xx_idc_check_fan_failure(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_idc_update_idc_params(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_idc_ready_state_entry(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_idc_vnic_pf_entry(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_unknown_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_cold_state_handler(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_init_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_ready_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_need_reset_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_need_quiesce_state(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_idc_failed_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_quiesce_state(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_idc_check_state_validity(struct qlcnic_adapter *adapter,
u32 state)
{ … }
#define QLC_83XX_ENCAP_TYPE_VXLAN …
#define QLC_83XX_MATCH_ENCAP_ID …
#define QLC_83XX_SET_VXLAN_UDP_DPORT …
#define QLC_83XX_VXLAN_UDP_DPORT(PORT) …
#define QLCNIC_ENABLE_INGRESS_ENCAP_PARSING …
#define QLCNIC_DISABLE_INGRESS_ENCAP_PARSING …
int qlcnic_set_vxlan_port(struct qlcnic_adapter *adapter, u16 port)
{ … }
int qlcnic_set_vxlan_parsing(struct qlcnic_adapter *adapter, u16 port)
{ … }
static void qlcnic_83xx_periodic_tasks(struct qlcnic_adapter *adapter)
{ … }
void qlcnic_83xx_idc_poll_dev_state(struct work_struct *work)
{ … }
static void qlcnic_83xx_setup_idc_parameters(struct qlcnic_adapter *adapter)
{ … }
static int
qlcnic_83xx_idc_first_to_load_function_handler(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_idc_init(struct qlcnic_adapter *adapter)
{ … }
void qlcnic_83xx_idc_exit(struct qlcnic_adapter *adapter)
{ … }
void qlcnic_83xx_idc_request_reset(struct qlcnic_adapter *adapter, u32 key)
{ … }
static int qlcnic_83xx_copy_bootloader(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_dump_pause_control_regs(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_disable_pause_frames(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_take_eport_out_of_reset(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_check_heartbeat(struct qlcnic_adapter *p_dev)
{ … }
static int qlcnic_83xx_check_cmd_peg_status(struct qlcnic_adapter *p_dev)
{ … }
static int qlcnic_83xx_check_hw_status(struct qlcnic_adapter *p_dev)
{ … }
static int qlcnic_83xx_poll_reg(struct qlcnic_adapter *p_dev, u32 addr,
int duration, u32 mask, u32 status)
{ … }
static int qlcnic_83xx_reset_template_checksum(struct qlcnic_adapter *p_dev)
{ … }
static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_dev)
{ … }
static void qlcnic_83xx_read_write_crb_reg(struct qlcnic_adapter *p_dev,
u32 raddr, u32 waddr)
{ … }
static void qlcnic_83xx_rmw_crb_reg(struct qlcnic_adapter *p_dev,
u32 raddr, u32 waddr,
struct qlc_83xx_rmw *p_rmw_hdr)
{ … }
static void qlcnic_83xx_write_list(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_read_write_list(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_poll_list(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_poll_write_list(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_read_modify_write(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_pause(struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static void qlcnic_83xx_poll_read_list(struct qlcnic_adapter *p_dev,
struct qlc_83xx_entry_hdr *p_hdr)
{ … }
static inline void qlcnic_83xx_seq_end(struct qlcnic_adapter *p_dev)
{ … }
static void qlcnic_83xx_template_end(struct qlcnic_adapter *p_dev)
{ … }
static void qlcnic_83xx_exec_template_cmd(struct qlcnic_adapter *p_dev,
char *p_buff)
{ … }
static void qlcnic_83xx_stop_hw(struct qlcnic_adapter *p_dev)
{ … }
static void qlcnic_83xx_start_hw(struct qlcnic_adapter *p_dev)
{ … }
static void qlcnic_83xx_init_hw(struct qlcnic_adapter *p_dev)
{ … }
#define QLC_83XX_POST_SIGNATURE_REG …
#define QLC_83XX_POST_MODE_REG …
#define QLC_83XX_POST_FAST_MODE …
#define QLC_83XX_POST_MEDIUM_MODE …
#define QLC_83XX_POST_SLOW_MODE …
#define QLC_83XX_POST_FAST_MODE_TIMEOUT …
#define QLC_83XX_POST_MED_MODE_TIMEOUT …
#define QLC_83XX_POST_SLOW_MODE_TIMEOUT …
#define QLC_83XX_POST_PASS …
#define QLC_83XX_POST_ASIC_STRESS_TEST_FAIL …
#define QLC_83XX_POST_DDR_TEST_FAIL …
#define QLC_83XX_POST_ASIC_MEMORY_TEST_FAIL …
#define QLC_83XX_POST_FLASH_TEST_FAIL …
static int qlcnic_83xx_run_post(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_load_fw_image_from_host(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_restart_hw(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_get_nic_configuration(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_config_buff_descriptors(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_init_default_driver(struct qlcnic_adapter *adapter)
{ … }
#define IS_QLC_83XX_USED(a, b, c) …
static void qlcnic_83xx_clear_function_resources(struct qlcnic_adapter *adapter)
{ … }
static int qlcnic_83xx_get_fw_info(struct qlcnic_adapter *adapter)
{ … }
static void qlcnic_83xx_init_rings(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_init(struct qlcnic_adapter *adapter)
{ … }
void qlcnic_83xx_aer_stop_poll_work(struct qlcnic_adapter *adapter)
{ … }
int qlcnic_83xx_aer_reset(struct qlcnic_adapter *adapter)
{ … }
void qlcnic_83xx_aer_start_poll_work(struct qlcnic_adapter *adapter)
{ … }