Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_common.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | enum ice_fw_modes { | ||||
ICE_FW_MODE_DBG, | ICE_FW_MODE_DBG, | ||||
ICE_FW_MODE_REC, | ICE_FW_MODE_REC, | ||||
ICE_FW_MODE_ROLLBACK | ICE_FW_MODE_ROLLBACK | ||||
}; | }; | ||||
void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq); | void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq); | ||||
bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq); | bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq); | ||||
void ice_set_umac_shared(struct ice_hw *hw); | |||||
enum ice_status ice_init_hw(struct ice_hw *hw); | enum ice_status ice_init_hw(struct ice_hw *hw); | ||||
void ice_deinit_hw(struct ice_hw *hw); | void ice_deinit_hw(struct ice_hw *hw); | ||||
enum ice_status ice_check_reset(struct ice_hw *hw); | enum ice_status ice_check_reset(struct ice_hw *hw); | ||||
enum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req); | enum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req); | ||||
enum ice_status ice_create_all_ctrlq(struct ice_hw *hw); | enum ice_status ice_create_all_ctrlq(struct ice_hw *hw); | ||||
enum ice_status ice_init_all_ctrlq(struct ice_hw *hw); | enum ice_status ice_init_all_ctrlq(struct ice_hw *hw); | ||||
void ice_shutdown_all_ctrlq(struct ice_hw *hw); | void ice_shutdown_all_ctrlq(struct ice_hw *hw); | ||||
Show All 21 Lines | ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq, | ||||
struct ice_aq_desc *desc, void *buf, u16 buf_size, | struct ice_aq_desc *desc, void *buf, u16 buf_size, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
void ice_clear_pxe_mode(struct ice_hw *hw); | void ice_clear_pxe_mode(struct ice_hw *hw); | ||||
enum ice_status ice_get_caps(struct ice_hw *hw); | enum ice_status ice_get_caps(struct ice_hw *hw); | ||||
void ice_set_safe_mode_caps(struct ice_hw *hw); | void ice_set_safe_mode_caps(struct ice_hw *hw); | ||||
enum ice_status | |||||
ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id, | |||||
u32 start, void *buf, u16 buf_size, u16 *ret_buf_size, | |||||
u16 *ret_next_table, u32 *ret_next_index, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status ice_set_mac_type(struct ice_hw *hw); | enum ice_status ice_set_mac_type(struct ice_hw *hw); | ||||
/* Define a macro that will align a pointer to point to the next memory address | /* Define a macro that will align a pointer to point to the next memory address | ||||
* that falls on the given power of 2 (i.e., 2, 4, 8, 16, 32, 64...). For | * that falls on the given power of 2 (i.e., 2, 4, 8, 16, 32, 64...). For | ||||
* example, given the variable pointer = 0x1006, then after the following call: | * example, given the variable pointer = 0x1006, then after the following call: | ||||
* | * | ||||
* pointer = ICE_ALIGN(pointer, 4) | * pointer = ICE_ALIGN(pointer, 4) | ||||
* | * | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
enum ice_status | enum ice_status | ||||
ice_aq_set_port_params(struct ice_port_info *pi, u16 bad_frame_vsi, | ice_aq_set_port_params(struct ice_port_info *pi, u16 bad_frame_vsi, | ||||
bool save_bad_pac, bool pad_short_pac, bool double_vlan, | bool save_bad_pac, bool pad_short_pac, bool double_vlan, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, | ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, | ||||
struct ice_aqc_get_phy_caps_data *caps, | struct ice_aqc_get_phy_caps_data *caps, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | |||||
ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd, | |||||
u8 *node_part_number, u16 *node_handle); | |||||
enum ice_status | |||||
ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, | |||||
u16 *node_handle); | |||||
void | void | ||||
ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high, | ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high, | ||||
u16 link_speeds_bitmap); | u16 link_speeds_bitmap); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, | ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags, | ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags, | ||||
Show All 23 Lines | ice_copy_phy_caps_to_cfg(struct ice_port_info *pi, | ||||
struct ice_aqc_set_phy_cfg_data *cfg); | struct ice_aqc_set_phy_cfg_data *cfg); | ||||
enum ice_status | enum ice_status | ||||
ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, | ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, | ||||
enum ice_fec_mode fec); | enum ice_fec_mode fec); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, | ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_mac_cfg(struct ice_hw *hw, u16 max_frame_size, struct ice_sq_cd *cd); | ice_aq_set_mac_cfg(struct ice_hw *hw, u16 max_frame_size, bool auto_drop, | ||||
struct ice_sq_cd *cd); | |||||
enum ice_status | enum ice_status | ||||
ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, | ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, | ||||
struct ice_link_status *link, struct ice_sq_cd *cd); | struct ice_link_status *link, struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask, | ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd); | ice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode, | ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr, | ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr, | ||||
u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length, | u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length, | ||||
bool write, struct ice_sq_cd *cd); | bool write, struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_prog_topo_dev_nvm(struct ice_hw *hw, | |||||
struct ice_aqc_link_topo_params *topo_params, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status | |||||
ice_aq_read_topo_dev_nvm(struct ice_hw *hw, | |||||
struct ice_aqc_link_topo_params *topo_params, | |||||
u32 start_address, u8 *buf, u8 buf_size, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status | |||||
ice_aq_get_port_options(struct ice_hw *hw, | ice_aq_get_port_options(struct ice_hw *hw, | ||||
struct ice_aqc_get_port_options_elem *options, | struct ice_aqc_get_port_options_elem *options, | ||||
u8 *option_count, u8 lport, bool lport_valid, | u8 *option_count, u8 lport, bool lport_valid, | ||||
u8 *active_option_idx, bool *active_option_valid); | u8 *active_option_idx, bool *active_option_valid); | ||||
enum ice_status | enum ice_status | ||||
ice_get_ctx(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info); | ice_get_ctx(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info); | ||||
enum ice_status | enum ice_status | ||||
__ice_write_sr_word(struct ice_hw *hw, u32 offset, const u16 *data); | __ice_write_sr_word(struct ice_hw *hw, u32 offset, const u16 *data); | ||||
enum ice_status | enum ice_status | ||||
__ice_write_sr_buf(struct ice_hw *hw, u32 offset, u16 words, const u16 *data); | __ice_write_sr_buf(struct ice_hw *hw, u32 offset, u16 words, const u16 *data); | ||||
enum ice_status | enum ice_status | ||||
ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues, | ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues, | ||||
u16 *q_handle, u16 *q_ids, u32 *q_teids, | u16 *q_handle, u16 *q_ids, u32 *q_teids, | ||||
enum ice_disq_rst_src rst_src, u16 vmvf_num, | enum ice_disq_rst_src rst_src, u16 vmvf_num, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u16 tc_bitmap, | ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u16 tc_bitmap, | ||||
u16 *max_lanqs); | u16 *max_lanqs); | ||||
enum ice_status | enum ice_status | ||||
ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, | ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, | ||||
u8 num_qgrps, struct ice_aqc_add_tx_qgrp *buf, u16 buf_size, | u8 num_qgrps, struct ice_aqc_add_tx_qgrp *buf, u16 buf_size, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | |||||
ice_replay_pre_init(struct ice_hw *hw, struct ice_switch_info *sw); | |||||
enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle); | enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle); | ||||
void ice_replay_post(struct ice_hw *hw); | void ice_replay_post(struct ice_hw *hw); | ||||
struct ice_q_ctx * | struct ice_q_ctx * | ||||
ice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle); | ice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle); | ||||
void | void | ||||
ice_stat_update40(struct ice_hw *hw, u32 reg, bool prev_stat_loaded, | ice_stat_update40(struct ice_hw *hw, u32 reg, bool prev_stat_loaded, | ||||
u64 *prev_stat, u64 *cur_stat); | u64 *prev_stat, u64 *cur_stat); | ||||
void | void | ||||
ice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded, | ice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded, | ||||
u64 *prev_stat, u64 *cur_stat); | u64 *prev_stat, u64 *cur_stat); | ||||
void | void | ||||
ice_stat_update_repc(struct ice_hw *hw, u16 vsi_handle, bool prev_stat_loaded, | ice_stat_update_repc(struct ice_hw *hw, u16 vsi_handle, bool prev_stat_loaded, | ||||
struct ice_eth_stats *cur_stats); | struct ice_eth_stats *cur_stats); | ||||
enum ice_fw_modes ice_get_fw_mode(struct ice_hw *hw); | enum ice_fw_modes ice_get_fw_mode(struct ice_hw *hw); | ||||
void ice_print_rollback_msg(struct ice_hw *hw); | void ice_print_rollback_msg(struct ice_hw *hw); | ||||
bool ice_is_e810(struct ice_hw *hw); | |||||
bool ice_is_e810t(struct ice_hw *hw); | |||||
enum ice_status | enum ice_status | ||||
ice_aq_alternate_write(struct ice_hw *hw, u32 reg_addr0, u32 reg_val0, | ice_aq_alternate_write(struct ice_hw *hw, u32 reg_addr0, u32 reg_val0, | ||||
u32 reg_addr1, u32 reg_val1); | u32 reg_addr1, u32 reg_val1); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_alternate_read(struct ice_hw *hw, u32 reg_addr0, u32 *reg_val0, | ice_aq_alternate_read(struct ice_hw *hw, u32 reg_addr0, u32 *reg_val0, | ||||
u32 reg_addr1, u32 *reg_val1); | u32 reg_addr1, u32 *reg_val1); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_alternate_write_done(struct ice_hw *hw, u8 bios_mode, | ice_aq_alternate_write_done(struct ice_hw *hw, u8 bios_mode, | ||||
bool *reset_needed); | bool *reset_needed); | ||||
enum ice_status ice_aq_alternate_clear(struct ice_hw *hw); | enum ice_status ice_aq_alternate_clear(struct ice_hw *hw); | ||||
enum ice_status | enum ice_status | ||||
ice_sched_query_elem(struct ice_hw *hw, u32 node_teid, | ice_sched_query_elem(struct ice_hw *hw, u32 node_teid, | ||||
struct ice_aqc_txsched_elem_data *buf); | struct ice_aqc_txsched_elem_data *buf); | ||||
enum ice_status | enum ice_status | ||||
ice_get_cur_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); | ice_get_cur_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); | ||||
enum ice_status | enum ice_status | ||||
ice_get_dflt_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); | ice_get_dflt_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); | ||||
enum ice_status | |||||
ice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status | |||||
ice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, | |||||
bool *value, struct ice_sq_cd *cd); | |||||
bool ice_is_100m_speed_supported(struct ice_hw *hw); | |||||
enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw, struct ice_netlist_info *netlist); | enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw, struct ice_netlist_info *netlist); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size, | ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
bool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw); | bool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw); | ||||
enum ice_status | enum ice_status | ||||
ice_lldp_fltr_add_remove(struct ice_hw *hw, u16 vsi_num, bool add); | ice_lldp_fltr_add_remove(struct ice_hw *hw, u16 vsi_num, bool add); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, | |||||
u16 bus_addr, __le16 addr, u8 params, u8 *data, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status | |||||
ice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr, | |||||
u16 bus_addr, __le16 addr, u8 params, u8 *data, | |||||
struct ice_sq_cd *cd); | |||||
enum ice_status | |||||
ice_aq_set_health_status_config(struct ice_hw *hw, u8 event_source, | ice_aq_set_health_status_config(struct ice_hw *hw, u8 event_source, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
bool ice_is_fw_health_report_supported(struct ice_hw *hw); | bool ice_is_fw_health_report_supported(struct ice_hw *hw); | ||||
bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw); | bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw); | ||||
/* AQ API version for FW auto drop reports */ | |||||
bool ice_is_fw_auto_drop_supported(struct ice_hw *hw); | |||||
#endif /* _ICE_COMMON_H_ */ | #endif /* _ICE_COMMON_H_ */ |