libie: commonize adminq structure
v3 cover libie: commonize adminq structure
Hi,
It is a prework to allow reusing some specific Intel code (eq. fwlog).
Move common *_aq_desc structure to libie header and changing it in ice, ixgbe, i40e and iavf.
Only generic adminq commands can be easily moved to common header, as rest is slightly different. Format remains the same. It will be better to correctly move it when it will be needed to commonize other part of the code.
Move *_aq_str() to new libie module (libie_adminq) and use it across drivers. The functions are exactly the same in each driver. Some more adminq helpers/functions can be moved to libie_adminq when needed.
v2 --> v3: [2]
* rebase
* fix kdoc (patch 1 and 5)
* remove space before tab (patch 1)
v1 --> v2: [1]
* add short descriptions in kdoc (patch 1, 5)
* handle all error types in switch to allow clean build (patch 3)
[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
Michal Swiatkowski (8):
ice, libie: move generic adminq descriptors to lib
ixgbe: use libie adminq descriptors
i40e: use libie adminq descriptors
iavf: use libie adminq descriptors
libie: add adminq helper for converting err to str
ice: use libie_aq_str
iavf: use libie_aq_str
i40e: use libie_aq_str
drivers/net/ethernet/intel/Kconfig | 3 + drivers/net/ethernet/intel/libie/Kconfig | 6 + drivers/net/ethernet/intel/libie/Makefile | 4 + drivers/net/ethernet/intel/i40e/i40e_adminq.h | 12 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 155 +--- .../net/ethernet/intel/i40e/i40e_prototype.h | 15 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 6 +- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 12 +- .../net/ethernet/intel/iavf/iavf_adminq_cmd.h | 83 +- .../net/ethernet/intel/iavf/iavf_prototype.h | 3 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/ice_adminq_cmd.h | 270 +------ drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 8 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 +- .../ethernet/intel/ixgbe/ixgbe_type_e610.h | 226 +----- include/linux/net/intel/libie/adminq.h | 309 ++++++++ drivers/net/ethernet/intel/i40e/i40e_adminq.c | 68 +- drivers/net/ethernet/intel/i40e/i40e_client.c | 7 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 730 ++++++++---------- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 10 +- drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 8 +- .../net/ethernet/intel/i40e/i40e_debugfs.c | 46 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 36 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 240 +++--- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 18 +- .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 27 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 62 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 110 +-- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- .../net/ethernet/intel/ice/devlink/devlink.c | 10 +- .../net/ethernet/intel/ice/devlink/health.c | 6 +- drivers/net/ethernet/intel/ice/ice_common.c | 390 +++++----- drivers/net/ethernet/intel/ice/ice_controlq.c | 53 +- drivers/net/ethernet/intel/ice/ice_dcb.c | 36 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 2 +- drivers/net/ethernet/intel/ice/ice_ddp.c | 47 +- drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 +- .../net/ethernet/intel/ice/ice_fw_update.c | 38 +- drivers/net/ethernet/intel/ice/ice_fwlog.c | 16 +- drivers/net/ethernet/intel/ice/ice_lag.c | 4 +- drivers/net/ethernet/intel/ice/ice_lib.c | 10 +- drivers/net/ethernet/intel/ice/ice_main.c | 63 +- drivers/net/ethernet/intel/ice/ice_nvm.c | 38 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 20 +- drivers/net/ethernet/intel/ice/ice_sched.c | 18 +- drivers/net/ethernet/intel/ice/ice_sriov.c | 4 +- drivers/net/ethernet/intel/ice/ice_switch.c | 55 +- drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 6 +- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 6 +- .../net/ethernet/intel/ice/ice_vlan_mode.c | 6 +- .../net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 24 +- .../net/ethernet/intel/ixgbe/devlink/region.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 272 +++---- .../ethernet/intel/ixgbe/ixgbe_fw_update.c | 4 +- drivers/net/ethernet/intel/libie/adminq.c | 52 ++ 59 files changed, 1578 insertions(+), 2140 deletions(-) create mode 100644 include/linux/net/intel/libie/adminq.h create mode 100644 drivers/net/ethernet/intel/libie/adminq.c
Signature · 1 line
2.42.0
PATCH v3 1/8 ice, libie: move generic adminq descriptors to lib
The descriptor structure is the same in ice, ixgbe and i40e. Move it to common libie header to use it across different driver.
Leave device specific adminq commands in separate folders. This lead to a change that need to be done in filling/getting descriptor:
- previous: struct specific_desc *cmd;
cmd = &desc.params.specific_desc;
- now: struct specific_desc *cmd;
cmd = libie_aq_raw(&desc);Do this changes across the driver to allow clean build. The casting only have to be done in case of specific descriptors, for generic one union can still be used.
Changes beside code moving:
- change ICE_ prefix to LIBIE_ prefix (ice_ and libie_ too)
- remove shift variables not otherwise needed (in libie_aq_flags)
- fill/get descriptor data based on desc.params.raw whenever the descriptor isn't defined in libie
- move defines from the libie_aq_sth structure outside
- add libie_aq_raw helper and use it instead of explicit casting
Reviewed by: Przemek Kitszel <[email protected]>
--- drivers/net/ethernet/intel/ice/ice.h | 2 +- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 270 +----------- drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 8 +- include/linux/net/intel/libie/adminq.h | 272 ++++++++++++ .../net/ethernet/intel/ice/devlink/health.c | 4 +- drivers/net/ethernet/intel/ice/ice_common.c | 390 +++++++++--------- drivers/net/ethernet/intel/ice/ice_controlq.c | 53 +-- drivers/net/ethernet/intel/ice/ice_dcb.c | 36 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 2 +- drivers/net/ethernet/intel/ice/ice_ddp.c | 47 +-- .../net/ethernet/intel/ice/ice_fw_update.c | 24 +- drivers/net/ethernet/intel/ice/ice_fwlog.c | 16 +- drivers/net/ethernet/intel/ice/ice_lag.c | 4 +- drivers/net/ethernet/intel/ice/ice_lib.c | 6 +- drivers/net/ethernet/intel/ice/ice_main.c | 34 +- drivers/net/ethernet/intel/ice/ice_nvm.c | 38 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 20 +- drivers/net/ethernet/intel/ice/ice_sched.c | 18 +- drivers/net/ethernet/intel/ice/ice_sriov.c | 4 +- drivers/net/ethernet/intel/ice/ice_switch.c | 55 +-- drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 6 +- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 2 +- .../net/ethernet/intel/ice/ice_vlan_mode.c | 6 +- 24 files changed, 673 insertions(+), 650 deletions(-) create mode 100644 include/linux/net/intel/libie/adminq.h
drivers/net/ethernet/intel/ice/ice.h +1 -1
@@ -971,7 +971,7 @@ int ice_plug_aux_dev(struct ice_pf *pf);void ice_unplug_aux_dev (struct ice_pf *pf);int ice_init_rdma (struct ice_pf *pf);void ice_deinit_rdma (struct ice_pf *pf); -const char *ice_aq_str (enum ice_aq_err aq_err); +const char *ice_aq_str (enum libie_aq_err aq_err);bool ice_is_wol_supported (struct ice_hw *hw);void ice_fdir_del_all_fltrs (struct ice_vsi *vsi);int
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -268
294 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_common.h +3 -3
@@ -68,7 +68,7 @@ bool ice_is_sbq_supported(struct ice_hw *hw);struct ice_ctl_q_info *ice_get_sbq (struct ice_hw *hw);int 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 libie_aq_desc *desc,void *buf,u16 buf_size,struct ice_sq_cd *cd);void ice_clear_pxe_mode (struct ice_hw *hw);int ice_get_caps (struct ice_hw *hw);
@@ -91,14 +91,14 @@ ice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,bool ice_check_sq_alive (struct ice_hw *hw,struct ice_ctl_q_info *cq);int ice_aq_q_shutdown (struct ice_hw *hw,bool unloading); -void ice_fill_dflt_direct_cmd_desc (struct ice_aq_desc *desc,u16 opcode); +void ice_fill_dflt_direct_cmd_desc (struct libie_aq_desc *desc,u16 opcode);void ice_pack_txq_ctx (const struct ice_tlan_ctx *ctx,ice_txq_ctx_buf_t *buf);extern struct mutex ice_global_cfg_lock_sw;int -ice_aq_send_cmd (struct ice_hw *hw,struct ice_aq_desc *desc, +ice_aq_send_cmd (struct ice_hw *hw,struct libie_aq_desc *desc,void *buf,u16 buf_size,struct ice_sq_cd *cd);int ice_aq_get_fw_ver (struct ice_hw *hw,struct ice_sq_cd *cd);
drivers/net/ethernet/intel/ice/ice_controlq.h +4 -4
@@ -12,7 +12,7 @@#define ICE_SBQ_MAX_BUF_LEN 512#define ICE_CTL_Q_DESC (R , i) \ - (&(((struct ice_aq_desc *)((R).desc_buf.va))[i])) + (&(((struct libie_aq_desc *)((R).desc_buf.va))[i]))#define ICE_CTL_Q_DESC_UNUSED (R ) \ ((u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
@@ -76,12 +76,12 @@ struct ice_ctl_q_ring {/* sq transaction details */ struct ice_sq_cd { -struct ice_aq_desc *wb_desc; +struct libie_aq_desc *wb_desc; };/* rq event information */ struct ice_rq_event_info { -struct ice_aq_desc desc; +struct libie_aq_desc desc;u16 msg_len;u16 buf_len;u8 *msg_buf;
@@ -96,7 +96,7 @@ struct ice_ctl_q_info {u16 num_sq_entries;/* send queue depth */ u16 rq_buf_size;/* receive queue buffer size */ u16 sq_buf_size;/* send queue buffer size */ -enum ice_aq_err sq_last_status;/* last status on send queue */ +enum libie_aq_err sq_last_status;/* last status on send queue */ struct mutex sq_lock;/* Send queue lock */ struct mutex rq_lock;/* Receive queue lock */ };
include/linux/net/intel/libie/adminq.h new file +272 -0
272 lines not on this page · raw message
drivers/net/ethernet/intel/ice/devlink/health.c +3 -1
@@ -217,10 +217,12 @@ static void ice_config_health_events(struct ice_pf *pf, bool enable)void ice_process_health_status_event (struct ice_pf *pf,struct ice_rq_event_info *event) {const struct ice_aqc_health_status_elem *health_info; +const struct ice_aqc_get_health_status *cmd;u16 count; health_info = (struct ice_aqc_health_status_elem *)event->msg_buf; - count =le16_to_cpu (event->desc.params.get_health_status.health_status_count); + cmd =libie_aq_raw (&event->desc); + count =le16_to_cpu (cmd->health_status_count);if (count > (event->buf_len /sizeof (*health_info))) {dev_err (ice_pf_to_dev (pf),"Received a health status event with invalid element count\n" );
drivers/net/ethernet/intel/ice/ice_common.c +197 -193
1,222 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_controlq.c +27 -26
153 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_dcb.c +18 -18
@@ -24,10 +24,10 @@ ice_aq_get_lldp_mib(struct ice_hw *hw, u8 bridge_type, u8 mib_type, void *buf, struct ice_sq_cd *cd) {struct ice_aqc_lldp_get_mib *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status; - cmd = &desc.params.lldp_get_mib; + cmd =libie_aq_raw (&desc);if (buf_size ==0 || !buf)return -EINVAL ;
@@ -64,9 +64,9 @@ ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update, struct ice_sq_cd *cd) {struct ice_aqc_lldp_set_mib_change *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc; - cmd = &desc.params.lldp_set_event; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_lldp_set_mib_change);
@@ -95,9 +95,9 @@ ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist, struct ice_sq_cd *cd) {struct ice_aqc_lldp_stop *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc; - cmd = &desc.params.lldp_stop; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_lldp_stop);
@@ -121,9 +121,9 @@ ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist,int ice_aq_start_lldp (struct ice_hw *hw,bool persist,struct ice_sq_cd *cd) {struct ice_aqc_lldp_start *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc; - cmd = &desc.params.lldp_start; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_lldp_start);
@@ -677,11 +677,11 @@ ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent, bool *dcbx_agent_status, struct ice_sq_cd *cd) { struct ice_aqc_lldp_stop_start_specific_agent *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;u16 opcode;int status; - cmd = &desc.params.lldp_agent_ctrl; + cmd =libie_aq_raw (&desc); opcode = ice_aqc_opc_lldp_stop_start_specific_agent;
@@ -714,7 +714,7 @@ ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,struct ice_aqc_get_cee_dcb_cfg_resp *buff, struct ice_sq_cd *cd) { - struct ice_aq_desc desc; + struct libie_aq_desc desc;ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_get_cee_dcb_cfg);
@@ -733,13 +733,13 @@ ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,int ice_aq_set_pfc_mode (struct ice_hw *hw,u8 pfc_mode,struct ice_sq_cd *cd) {struct ice_aqc_set_query_pfc_mode *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status;if (pfc_mode >ICE_AQC_PFC_DSCP_BASED_PFC )return -EINVAL ; - cmd = &desc.params.set_query_pfc_mode; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_set_pfc_mode);
@@ -914,7 +914,7 @@ static int ice_get_ieee_or_cee_dcb_cfg(struct ice_port_info *pi, u8 dcbx_mode) ret =ice_aq_get_dcb_cfg (pi->hw,ICE_AQ_LLDP_MIB_REMOTE ,ICE_AQ_LLDP_BRID_TYPE_NEAREST_BRID , dcbx_cfg);/* Don't treat ENOENT as an error for Remote MIBs */ -if (pi->hw->adminq.sq_last_status ==ICE_AQ_RC_ENOENT ) +if (pi->hw->adminq.sq_last_status ==LIBIE_AQ_RC_ENOENT ) ret =0 ; out:
@@ -941,7 +941,7 @@ int ice_get_dcb_cfg(struct ice_port_info *pi)/* CEE mode */ ret =ice_get_ieee_or_cee_dcb_cfg (pi,ICE_DCBX_MODE_CEE );ice_cee_to_dcb_cfg (&cee_cfg, pi); - }else if (pi->hw->adminq.sq_last_status ==ICE_AQ_RC_ENOENT ) { + }else if (pi->hw->adminq.sq_last_status ==LIBIE_AQ_RC_ENOENT ) {/* CEE mode not enabled try querying IEEE data */ dcbx_cfg = &pi->qos_cfg.local_dcbx_cfg; dcbx_cfg->dcbx_mode =ICE_DCBX_MODE_IEEE ;
@@ -965,7 +965,7 @@ void ice_get_dcb_cfg_from_mib_change(struct ice_port_info *pi,struct ice_aqc_lldp_get_mib *mib;u8 change_type, dcbx_mode; - mib = (struct ice_aqc_lldp_get_mib *)&event->desc.params.raw; + mib =libie_aq_raw (&event->desc); change_type =FIELD_GET (ICE_AQ_LLDP_MIB_TYPE_M , mib->type);if (change_type ==ICE_AQ_LLDP_MIB_REMOTE )
@@ -1537,12 +1537,12 @@ ice_aq_query_port_ets(struct ice_port_info *pi, struct ice_sq_cd *cd) {struct ice_aqc_query_port_ets *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status;if (!pi)return -EINVAL ; - cmd = &desc.params.port_ets; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_query_port_ets); cmd->port_teid = pi->root->info.node_teid;
drivers/net/ethernet/intel/ice/ice_dcb_lib.c +1 -1
@@ -983,7 +983,7 @@ ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf, } pi = pf->hw.port_info; - mib = (struct ice_aqc_lldp_get_mib *)&event->desc.params.raw; + mib =libie_aq_raw (&event->desc);/* Ignore if event is not for Nearest Bridge */ mib_type =FIELD_GET (ICE_AQ_LLDP_BRID_TYPE_M , mib->type);
drivers/net/ethernet/intel/ice/ice_ddp.c +24 -23
141 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_fw_update.c +14 -10
@@ -299,7 +299,8 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,struct device *dev =ice_pf_to_dev (pf);struct ice_aq_task task = {};struct ice_hw *hw = &pf->hw; -struct ice_aq_desc *desc; +struct libie_aq_desc *desc; +struct ice_aqc_nvm *cmd;u32 completion_offset;int err;
@@ -333,11 +334,12 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset, } desc = &task.event.desc; - completion_module =le16_to_cpu (desc->params.nvm.module_typeid); + cmd =libie_aq_raw (desc); + completion_module =le16_to_cpu (cmd->module_typeid); completion_retval =le16_to_cpu (desc->retval); - completion_offset =le16_to_cpu (desc->params.nvm.offset_low); - completion_offset |= desc->params.nvm.offset_high <<16 ; + completion_offset =le16_to_cpu (cmd->offset_low); + completion_offset |= cmd->offset_high <<16 ;if (completion_module != module) { dev_err(dev, "Unexpected module_typeid in write completion: got 0x%x, expected 0x%x\n",
@@ -356,7 +358,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,if (completion_retval) {dev_err (dev,"Firmware failed to flash module 0x%02x with block of size %u at offset %u, err %s\n" , module, block_size, offset, -ice_aq_str ((enum ice_aq_err )completion_retval)); +ice_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to program flash module" );return -EIO ; }
@@ -369,7 +371,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,*/ if (reset_level && last_cmd && module ==ICE_SR_1ST_NVM_BANK_PTR ) {if (hw->dev_caps.common_cap.pcie_reset_avoidance) { - *reset_level = desc->params.nvm.cmd_flags & + *reset_level = cmd->cmd_flags &ICE_AQC_NVM_RESET_LVL_M ;dev_dbg (dev,"Firmware reported required reset level as %u\n" , *reset_level);
@@ -487,7 +489,8 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,struct device *dev =ice_pf_to_dev (pf);struct ice_aq_task task = {};struct ice_hw *hw = &pf->hw; -struct ice_aq_desc *desc; +struct libie_aq_desc *desc; +struct ice_aqc_nvm *cmd;struct devlink *devlink;int err;
@@ -518,7 +521,8 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, } desc = &task.event.desc; - completion_module =le16_to_cpu (desc->params.nvm.module_typeid); + cmd =libie_aq_raw (desc); + completion_module =le16_to_cpu (cmd->module_typeid); completion_retval =le16_to_cpu (desc->retval);if (completion_module != module) {
@@ -532,7 +536,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,if (completion_retval) {dev_err (dev,"Firmware failed to erase %s (module 0x02%x), aq_err %s\n" , component, module, -ice_aq_str ((enum ice_aq_err )completion_retval)); +ice_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to erase flash" ); err = -EIO ; goto out_notify_devlink;
@@ -611,7 +615,7 @@ ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, completion_retval =le16_to_cpu (task.event.desc.retval);if (completion_retval) {dev_err (dev,"Firmware failed to switch active flash banks aq_err %s\n" , -ice_aq_str ((enum ice_aq_err )completion_retval)); +ice_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to switch active flash banks" );return -EIO ; }
drivers/net/ethernet/intel/ice/ice_fwlog.c +9 -7
@@ -240,7 +240,7 @@ ice_aq_fwlog_set(struct ice_hw *hw, struct ice_fwlog_module_entry *entries, {struct ice_aqc_fw_log_cfg_resp *fw_modules;struct ice_aqc_fw_log *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status;int i;
@@ -255,9 +255,9 @@ ice_aq_fwlog_set(struct ice_hw *hw, struct ice_fwlog_module_entry *entries, }ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_fw_logs_config); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD ); - cmd = &desc.params.fw_log; + cmd =libie_aq_raw (&desc); cmd->cmd_flags =ICE_AQC_FW_LOG_CONF_SET_VALID ; cmd->ops.cfg.log_resolution =cpu_to_le16 (log_resolution);
@@ -309,7 +309,7 @@ static int ice_aq_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg) {struct ice_aqc_fw_log_cfg_resp *fw_modules;struct ice_aqc_fw_log *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;u16 module_id_cnt;int status;void *buf;
@@ -322,7 +322,7 @@ static int ice_aq_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)return -ENOMEM ;ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_fw_logs_query); - cmd = &desc.params.fw_log; + cmd =libie_aq_raw (&desc); cmd->cmd_flags =ICE_AQC_FW_LOG_AQ_QUERY ;
@@ -384,12 +384,14 @@ int ice_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)*/ static int ice_aq_fwlog_register (struct ice_hw *hw,bool reg) { -struct ice_aq_desc desc; +struct ice_aqc_fw_log *cmd; +struct libie_aq_desc desc;ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_fw_logs_register); + cmd =libie_aq_raw (&desc);if (reg) - desc.params.fw_log.cmd_flags =ICE_AQC_FW_LOG_AQ_REGISTER ; + cmd->cmd_flags =ICE_AQC_FW_LOG_AQ_REGISTER ;return ice_aq_send_cmd (hw, &desc,NULL ,0 ,NULL ); }
drivers/net/ethernet/intel/ice/ice_lag.c +2 -2
@@ -1499,7 +1499,7 @@ ice_lag_set_swid(u16 primary_swid, struct ice_lag *local_lag, {struct ice_aqc_alloc_free_res_elem *buf;struct ice_aqc_set_port_params *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;u16 buf_len, swid;int status, i;
@@ -1547,7 +1547,7 @@ ice_lag_set_swid(u16 primary_swid, struct ice_lag *local_lag,else swid = local_lag->pf->hw.port_info->sw_id; - cmd = &desc.params.set_port_params; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_set_port_params); cmd->swid =cpu_to_le16 (ICE_AQC_PORT_SWID_VALID | swid);
drivers/net/ethernet/intel/ice/ice_lib.c +3 -3
@@ -3778,13 +3778,13 @@ int ice_set_link(struct ice_vsi *vsi, bool ena) status =ice_aq_set_link_restart_an (pi, ena,NULL ); -/* if link is owned by manageability, FW will return ICE_AQ_RC_EMODE. +/* if link is owned by manageability, FW will return LIBIE_AQ_RC_EMODE. * this is not a fatal error, so print a warning message and return * a success code. Return an error if FW returns an error code other -* than ICE_AQ_RC_EMODE +* than LIBIE_AQ_RC_EMODE */ if (status == -EIO ) { -if (hw->adminq.sq_last_status ==ICE_AQ_RC_EMODE ) +if (hw->adminq.sq_last_status ==LIBIE_AQ_RC_EMODE )dev_dbg (dev,"can't set link to %s, err %d aq_err %s. not fatal, continuing\n" , (ena ?"ON" :"OFF" ), status,ice_aq_str (hw->adminq.sq_last_status));
drivers/net/ethernet/intel/ice/ice_main.c +17 -17
@@ -379,7 +379,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)* should go into promiscuous mode. There should be some * space reserved for promiscuous filters. */ -if (hw->adminq.sq_last_status ==ICE_AQ_RC_ENOSPC && +if (hw->adminq.sq_last_status ==LIBIE_AQ_RC_ENOSPC && !test_and_set_bit (ICE_FLTR_OVERFLOW_PROMISC , vsi->state)) { promisc_forced_on = true;
@@ -7957,38 +7957,38 @@ static int ice_eth_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)* ice_aq_str - convert AQ err code to a string * @aq_err: the AQ error code to convert */ -const char *ice_aq_str (enum ice_aq_err aq_err) +const char *ice_aq_str (enum libie_aq_err aq_err) {switch (aq_err) { -case ICE_AQ_RC_OK : +case LIBIE_AQ_RC_OK :return "OK" ; -case ICE_AQ_RC_EPERM : +case LIBIE_AQ_RC_EPERM :return "ICE_AQ_RC_EPERM" ; -case ICE_AQ_RC_ENOENT : +case LIBIE_AQ_RC_ENOENT :return "ICE_AQ_RC_ENOENT" ; -case ICE_AQ_RC_ENOMEM : +case LIBIE_AQ_RC_ENOMEM :return "ICE_AQ_RC_ENOMEM" ; -case ICE_AQ_RC_EBUSY : +case LIBIE_AQ_RC_EBUSY :return "ICE_AQ_RC_EBUSY" ; -case ICE_AQ_RC_EEXIST : +case LIBIE_AQ_RC_EEXIST :return "ICE_AQ_RC_EEXIST" ; -case ICE_AQ_RC_EINVAL : +case LIBIE_AQ_RC_EINVAL :return "ICE_AQ_RC_EINVAL" ; -case ICE_AQ_RC_ENOSPC : +case LIBIE_AQ_RC_ENOSPC :return "ICE_AQ_RC_ENOSPC" ; -case ICE_AQ_RC_ENOSYS : +case LIBIE_AQ_RC_ENOSYS :return "ICE_AQ_RC_ENOSYS" ; -case ICE_AQ_RC_EMODE : +case LIBIE_AQ_RC_EMODE :return "ICE_AQ_RC_EMODE" ; -case ICE_AQ_RC_ENOSEC : +case LIBIE_AQ_RC_ENOSEC :return "ICE_AQ_RC_ENOSEC" ; -case ICE_AQ_RC_EBADSIG : +case LIBIE_AQ_RC_EBADSIG :return "ICE_AQ_RC_EBADSIG" ; -case ICE_AQ_RC_ESVN : +case LIBIE_AQ_RC_ESVN :return "ICE_AQ_RC_ESVN" ; -case ICE_AQ_RC_EBADMAN : +case LIBIE_AQ_RC_EBADMAN :return "ICE_AQ_RC_EBADMAN" ; -case ICE_AQ_RC_EBADBUF : +case LIBIE_AQ_RC_EBADBUF :return "ICE_AQ_RC_EBADBUF" ; }
drivers/net/ethernet/intel/ice/ice_nvm.c +19 -19
@@ -22,10 +22,10 @@ int ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, void *data, bool last_command, bool read_shadow_ram, struct ice_sq_cd *cd) { - struct ice_aq_desc desc; + struct libie_aq_desc desc;struct ice_aqc_nvm *cmd; - cmd = &desc.params.nvm; + cmd =libie_aq_raw (&desc);if (offset >ICE_AQC_NVM_MAX_OFFSET )return -EINVAL ;
@@ -125,10 +125,10 @@ ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, void *data, bool last_command, u8 command_flags, struct ice_sq_cd *cd) { - struct ice_aq_desc desc; + struct libie_aq_desc desc;struct ice_aqc_nvm *cmd; - cmd = &desc.params.nvm; + cmd =libie_aq_raw (&desc);/* In offset the highest byte must be zeroed. */ if (offset &0xFF000000 )
@@ -146,7 +146,7 @@ ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, cmd->offset_high = (offset >>16 ) &0xFF ; cmd->length =cpu_to_le16 (length); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD );return ice_aq_send_cmd (hw, &desc, data, length, cd); }
@@ -161,10 +161,10 @@ ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset,*/ int ice_aq_erase_nvm (struct ice_hw *hw,u16 module_typeid,struct ice_sq_cd *cd) { -struct ice_aq_desc desc; +struct libie_aq_desc desc;struct ice_aqc_nvm *cmd; - cmd = &desc.params.nvm; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_erase);
@@ -869,7 +869,7 @@ static int ice_discover_flash_size(struct ice_hw *hw) status =ice_read_flat_nvm (hw, offset, &len, &data, false);if (status == -EIO && - hw->adminq.sq_last_status ==ICE_AQ_RC_EINVAL ) { + hw->adminq.sq_last_status ==LIBIE_AQ_RC_EINVAL ) {ice_debug (hw,ICE_DBG_NVM ,"%s: New upper bound of %u bytes\n" , __func__, offset); status =0 ;
@@ -1182,14 +1182,14 @@ int ice_init_nvm(struct ice_hw *hw)int ice_nvm_validate_checksum (struct ice_hw *hw) {struct ice_aqc_nvm_checksum *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status; status =ice_acquire_nvm (hw,ICE_RES_READ );if (status)return status; - cmd = &desc.params.nvm_checksum; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_checksum); cmd->flags =ICE_AQC_NVM_CHECKSUM_VERIFY ;
@@ -1226,11 +1226,11 @@ int ice_nvm_validate_checksum(struct ice_hw *hw)*/ int ice_nvm_write_activate (struct ice_hw *hw,u16 cmd_flags,u8 *response_flags) { +struct libie_aq_desc desc;struct ice_aqc_nvm *cmd; -struct ice_aq_desc desc;int err; - cmd = &desc.params.nvm; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_write_activate); cmd->cmd_flags = (u8)(cmd_flags &0xFF );
@@ -1252,7 +1252,7 @@ int ice_nvm_write_activate(struct ice_hw *hw, u16 cmd_flags, u8 *response_flags)*/ int ice_aq_nvm_update_empr (struct ice_hw *hw) { -struct ice_aq_desc desc; +struct libie_aq_desc desc;ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_update_empr);
@@ -1278,15 +1278,15 @@ ice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data, u16 length, struct ice_sq_cd *cd) { struct ice_aqc_nvm_pkg_data *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;if (length !=0 && !data)return -EINVAL ; - cmd = &desc.params.pkg_data; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_pkg_data); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD );if (del_pkg_data_flag) cmd->cmd_flags |=ICE_AQC_NVM_PKG_DELETE ;
@@ -1316,17 +1316,17 @@ ice_nvm_pass_component_tbl(struct ice_hw *hw, u8 *data, u16 length, u8 *comp_response_code, struct ice_sq_cd *cd) { struct ice_aqc_nvm_pass_comp_tbl *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status;if (!data || !comp_response || !comp_response_code)return -EINVAL ; - cmd = &desc.params.pass_comp_tbl; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_nvm_pass_component_tbl); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD ); cmd->transfer_flag = transfer_flag; status =ice_aq_send_cmd (hw, &desc, data, length, cd);
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +10 -10
@@ -245,7 +245,7 @@ static int ice_read_cgu_reg_e82x(struct ice_hw *hw, u32 addr, u32 *val) };int err; - err =ice_sbq_rw_reg (hw, &cgu_msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &cgu_msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to read CGU register 0x%04x, err %d\n" , addr, err);
@@ -278,7 +278,7 @@ static int ice_write_cgu_reg_e82x(struct ice_hw *hw, u32 addr, u32 val) };int err; - err =ice_sbq_rw_reg (hw, &cgu_msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &cgu_msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to write CGU register 0x%04x, err %d\n" , addr, err);
@@ -966,7 +966,7 @@ static int ice_write_phy_eth56g(struct ice_hw *hw, u8 port, u32 addr, u32 val) };int err; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err)ice_debug (hw,ICE_DBG_PTP ,"PTP failed to send msg to phy %d\n" , err);
@@ -993,7 +993,7 @@ static int ice_read_phy_eth56g(struct ice_hw *hw, u8 port, u32 addr, u32 *val) };int err; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err)ice_debug (hw,ICE_DBG_PTP ,"PTP failed to send msg to phy %d\n" , err);
@@ -2904,7 +2904,7 @@ ice_read_phy_reg_e82x(struct ice_hw *hw, u8 port, u16 offset, u32 *val)ice_fill_phy_msg_e82x (hw, &msg, port, offset); msg.opcode = ice_sbq_msg_rd; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
@@ -2982,7 +2982,7 @@ ice_write_phy_reg_e82x(struct ice_hw *hw, u8 port, u16 offset, u32 val) msg.opcode = ice_sbq_msg_wr; msg.data = val; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
@@ -3143,7 +3143,7 @@ ice_read_quad_reg_e82x(struct ice_hw *hw, u8 quad, u16 offset, u32 *val) msg.opcode = ice_sbq_msg_rd; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
@@ -3178,7 +3178,7 @@ ice_write_quad_reg_e82x(struct ice_hw *hw, u8 quad, u16 offset, u32 val) msg.opcode = ice_sbq_msg_wr; msg.data = val; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
@@ -4829,7 +4829,7 @@ static int ice_read_phy_reg_e810(struct ice_hw *hw, u32 addr, u32 *val) msg.opcode = ice_sbq_msg_rd; msg.dest_dev = ice_sbq_dev_phy_0; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
@@ -4860,7 +4860,7 @@ static int ice_write_phy_reg_e810(struct ice_hw *hw, u32 addr, u32 val) msg.dest_dev = ice_sbq_dev_phy_0; msg.data = val; - err =ice_sbq_rw_reg (hw, &msg,ICE_AQ_FLAG_RD ); + err =ice_sbq_rw_reg (hw, &msg,LIBIE_AQ_FLAG_RD );if (err) {ice_debug (hw,ICE_DBG_PTP ,"Failed to send message to PHY, err %d\n" , err);
drivers/net/ethernet/intel/ice/ice_sched.c +9 -9
@@ -123,13 +123,13 @@ ice_aqc_send_sched_elem_cmd(struct ice_hw *hw, enum ice_adminq_opc cmd_opc, u16 *elems_resp, struct ice_sq_cd *cd) { struct ice_aqc_sched_elem_cmd *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status; - cmd = &desc.params.sched_elem_cmd; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, cmd_opc); cmd->num_elem_req =cpu_to_le16 (elems_req); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD ); status =ice_aq_send_cmd (hw, &desc, buf, buf_size, cd);if (!status && elems_resp) *elems_resp =le16_to_cpu (cmd->num_elem_resp);
@@ -392,10 +392,10 @@ ice_aq_get_dflt_topo(struct ice_hw *hw, u8 lport, u8 *num_branches, struct ice_sq_cd *cd) { struct ice_aqc_get_topo *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status; - cmd = &desc.params.get_topo; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_get_dflt_topo); cmd->port_num = lport; status =ice_aq_send_cmd (hw, &desc, buf, buf_size, cd);
@@ -518,7 +518,7 @@ ice_aq_query_sched_res(struct ice_hw *hw, u16 buf_size,struct ice_aqc_query_txsched_res_resp *buf, struct ice_sq_cd *cd) { - struct ice_aq_desc desc; + struct libie_aq_desc desc;ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_query_sched_res);return ice_aq_send_cmd (hw, &desc, buf, buf_size, cd);
@@ -683,13 +683,13 @@ ice_aq_rl_profile(struct ice_hw *hw, enum ice_adminq_opc opcode, u16 buf_size, u16 *num_processed, struct ice_sq_cd *cd) { struct ice_aqc_rl_profile *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;int status; - cmd = &desc.params.rl_profile; + cmd =libie_aq_raw (&desc);ice_fill_dflt_direct_cmd_desc (&desc, opcode); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD ); cmd->num_profiles =cpu_to_le16 (num_profiles); status =ice_aq_send_cmd (hw, &desc, buf, buf_size, cd);if (!status && num_processed)
drivers/net/ethernet/intel/ice/ice_sriov.c +3 -1
@@ -1166,10 +1166,12 @@ static u32 ice_globalq_to_pfq(struct ice_pf *pf, u32 globalq)void ice_vf_lan_overflow_event (struct ice_pf *pf,struct ice_rq_event_info *event) { +struct ice_aqc_event_lan_overflow *cmd;u32 gldcb_rtctq, queue;struct ice_vf *vf; - gldcb_rtctq =le32_to_cpu (event->desc.params.lan_overflow.prtdcb_ruptq); + cmd =libie_aq_raw (&event->desc); + gldcb_rtctq =le32_to_cpu (cmd->prtdcb_ruptq);dev_dbg (ice_pf_to_dev (pf),"GLDCB_RTCTQ: 0x%08x\n" , gldcb_rtctq);/* event returns device global Rx queue number */
drivers/net/ethernet/intel/ice/ice_switch.c +28 -27
152 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_vf_mbx.c +3 -3
@@ -23,18 +23,18 @@ ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval, u8 *msg, u16 msglen, struct ice_sq_cd *cd) { struct ice_aqc_pf_vf_msg *cmd; -struct ice_aq_desc desc; +struct libie_aq_desc desc;ice_fill_dflt_direct_cmd_desc (&desc, ice_mbx_opc_send_msg_to_vf); - cmd = &desc.params.virt; + cmd =libie_aq_raw (&desc); cmd->id =cpu_to_le32 (vfid); desc.cookie_high =cpu_to_le32 (v_opcode); desc.cookie_low =cpu_to_le32 (v_retval);if (msglen) - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD );return ice_sq_send_cmd (hw, &hw->mailboxq, &desc, msg, msglen, cd); }
drivers/net/ethernet/intel/ice/ice_virtchnl.c +1 -1
@@ -304,7 +304,7 @@ ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode, aq_ret =ice_aq_send_msg_to_vf (&pf->hw, vf->vf_id, v_opcode, v_retval, msg, msglen,NULL ); -if (aq_ret && pf->hw.mailboxq.sq_last_status !=ICE_AQ_RC_ENOSYS ) { +if (aq_ret && pf->hw.mailboxq.sq_last_status !=LIBIE_AQ_RC_ENOSYS ) {dev_info (dev,"Unable to send the message to VF %d ret %d aq_err %s\n" , vf->vf_id, aq_ret,ice_aq_str (pf->hw.mailboxq.sq_last_status));
drivers/net/ethernet/intel/ice/ice_vlan_mode.c +3 -3
@@ -63,7 +63,7 @@ static int ice_aq_get_vlan_mode(struct ice_hw *hw, struct ice_aqc_get_vlan_mode *get_params) { - struct ice_aq_desc desc; + struct libie_aq_desc desc;if (!get_params)return -EINVAL ;
@@ -275,7 +275,7 @@ ice_aq_set_vlan_mode(struct ice_hw *hw, struct ice_aqc_set_vlan_mode *set_params) {u8 rdma_packet, mng_vlan_prot_id; -struct ice_aq_desc desc; +struct libie_aq_desc desc;if (!set_params)return -EINVAL ;
@@ -295,7 +295,7 @@ ice_aq_set_vlan_mode(struct ice_hw *hw,ice_fill_dflt_direct_cmd_desc (&desc, ice_aqc_opc_set_vlan_mode_parameters); - desc.flags |=cpu_to_le16 (ICE_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 (LIBIE_AQ_FLAG_RD );return ice_aq_send_cmd (hw, &desc, set_params,sizeof (*set_params),NULL );
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 1/8] ice, libie: move generic adminq descriptors to lib
Quoted 8 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 25 April 2025 11:38
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 1/8] ice, libie: move generic adminq descriptors to libThe descriptor structure is the same in ice, ixgbe and i40e. Move it to
common libie header to use it across different driver.
Quoted 2 lines
Leave device specific adminq commands in separate folders. This lead to
a change that need to be done in filling/getting descriptor:
Quoted 1 line
- previous: struct
specific_desc*cmd;
cmd = &desc.params.specific_desc;
Quoted 1 line
- now: struct
specific_desc*cmd;
cmd = libie_aq_raw(&desc);
Quoted 2 lines
Do this changes across the driver to allow clean build. The casting only
have to be done in case of specific descriptors, for generic one union can still be used.
Quoted 5 lines
Changes beside code moving:
- changeICE_prefix toLIBIE_prefix (ice_andlibie_too)
- remove shift variables not otherwise needed (inlibie_aq_flags)
- fill/get descriptor data based on desc.params.raw whenever the
descriptor isn't defined in libie
Quoted 32 lines
- move defines from the
libie_aq_sthstructure outside
- addlibie_aq_rawhelper and use it instead of explicit castingReviewed by: Przemek Kitszel <[email protected]>
Reviewed-by Aleksandr Loktionov <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
drivers/net/ethernet/intel/ice/ice.h | 2 +- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 270 +----------- drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 8 +- include/linux/net/intel/libie/adminq.h | 272 ++++++++++++ .../net/ethernet/intel/ice/devlink/health.c | 4 +- drivers/net/ethernet/intel/ice/ice_common.c | 390 +++++++++--------- drivers/net/ethernet/intel/ice/ice_controlq.c | 53 +-- drivers/net/ethernet/intel/ice/ice_dcb.c | 36 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 2 +- drivers/net/ethernet/intel/ice/ice_ddp.c | 47 +-- .../net/ethernet/intel/ice/ice_fw_update.c | 24 +- drivers/net/ethernet/intel/ice/ice_fwlog.c | 16 +- drivers/net/ethernet/intel/ice/ice_lag.c | 4 +- drivers/net/ethernet/intel/ice/ice_lib.c | 6 +- drivers/net/ethernet/intel/ice/ice_main.c | 34 +- drivers/net/ethernet/intel/ice/ice_nvm.c | 38 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 20 +- drivers/net/ethernet/intel/ice/ice_sched.c | 18 +- drivers/net/ethernet/intel/ice/ice_sriov.c | 4 +- drivers/net/ethernet/intel/ice/ice_switch.c | 55 +-- drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 6 +- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 2 +- .../net/ethernet/intel/ice/ice_vlan_mode.c | 6 +- 24 files changed, 673 insertions(+), 650 deletions(-)
Quoted 2 lines
create mode 100644
include/linux/net/intel/libie/adminq.h
PATCH v3 2/8 ixgbe: use libie adminq descriptors
In reply to Michal SwiatkowskiUse libie_aq_desc instead of ixgbe_aci_desc. Do needed changes to allow clean build.
Move additional caps used in ixgbe to libie.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 +- .../ethernet/intel/ixgbe/ixgbe_type_e610.h | 226 +-------------- include/linux/net/intel/libie/adminq.h | 16 ++ .../net/ethernet/intel/ixgbe/devlink/region.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 272 +++++++++--------- .../ethernet/intel/ixgbe/ixgbe_fw_update.c | 4 +- 6 files changed, 167 insertions(+), 367 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h +6 -6
@@ -6,15 +6,15 @@#include "ixgbe_type.h" -int ixgbe_aci_send_cmd (struct ixgbe_hw *hw,struct ixgbe_aci_desc *desc, +int ixgbe_aci_send_cmd (struct ixgbe_hw *hw,struct libie_aq_desc *desc,void *buf,u16 buf_size);bool ixgbe_aci_check_event_pending (struct ixgbe_hw *hw);int ixgbe_aci_get_event (struct ixgbe_hw *hw,struct ixgbe_aci_event *e,bool *pending); -void ixgbe_fill_dflt_direct_cmd_desc (struct ixgbe_aci_desc *desc,u16 opcode); -int ixgbe_acquire_res (struct ixgbe_hw *hw,enum ixgbe_aci_res_ids res, -enum ixgbe_aci_res_access_type access,u32 timeout); -void ixgbe_release_res (struct ixgbe_hw *hw,enum ixgbe_aci_res_ids res); +void ixgbe_fill_dflt_direct_cmd_desc (struct libie_aq_desc *desc,u16 opcode); +int ixgbe_acquire_res (struct ixgbe_hw *hw,enum libie_aq_res_id res, +enum libie_aq_res_access_type access,u32 timeout); +void ixgbe_release_res (struct ixgbe_hw *hw,enum libie_aq_res_id res);int ixgbe_aci_list_caps (struct ixgbe_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ixgbe_aci_opc opc); int ixgbe_discover_dev_caps(struct ixgbe_hw *hw,
@@ -62,7 +62,7 @@ int ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,struct ixgbe_aci_cmd_get_link_topo *cmd, u8 *node_part_number, u16 *node_handle);int ixgbe_acquire_nvm (struct ixgbe_hw *hw, -enum ixgbe_aci_res_access_type access); +enum libie_aq_res_access_type access);void ixgbe_release_nvm (struct ixgbe_hw *hw); int ixgbe_aci_read_nvm(struct ixgbe_hw *hw, u16 module_typeid, u32 offset, u16 length, void *data, bool last_command,
drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h +4 -222
270 lines not on this page · raw message
include/linux/net/intel/libie/adminq.h +16 -0
@@ -146,8 +146,10 @@ LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);/* Device/Function buffer entry, repeated per reported capability */ #define LIBIE_AQC_CAPS_VALID_FUNCTIONS 0x0005 +#define LIBIE_AQC_MAX_VALID_FUNCTIONS 0x8#define LIBIE_AQC_CAPS_SRIOV 0x0012#define LIBIE_AQC_CAPS_VF 0x0013 +#define LIBIE_AQC_CAPS_VMDQ 0x0014#define LIBIE_AQC_CAPS_VSI 0x0017#define LIBIE_AQC_CAPS_DCB 0x0018#define LIBIE_AQC_CAPS_RSS 0x0040
@@ -165,9 +167,15 @@ LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);#define LIBIE_AQC_CAPS_PENDING_NET_VER 0x004D#define LIBIE_AQC_CAPS_RDMA 0x0051#define LIBIE_AQC_CAPS_SENSOR_READING 0x0067 +#define LIBIE_AQC_INLINE_IPSEC 0x0070 +#define LIBIE_AQC_CAPS_NUM_ENABLED_PORTS 0x0072#define LIBIE_AQC_CAPS_PCIE_RESET_AVOIDANCE 0x0076#define LIBIE_AQC_CAPS_POST_UPDATE_RESET_RESTRICT 0x0077#define LIBIE_AQC_CAPS_NVM_MGMT 0x0080 +#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG0 0x0081 +#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG1 0x0082 +#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG2 0x0083 +#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084#define LIBIE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085#define LIBIE_AQC_CAPS_NAC_TOPOLOGY 0x0087#define LIBIE_AQC_CAPS_FW_LAG_SUPPORT 0x0092
@@ -237,13 +245,21 @@ LIBIE_CHECK_STRUCT_LEN(32, libie_aq_desc);/* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */ #define LIBIE_AQ_LG_BUF 512 +/* Flags sub-structure +* |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 | +* |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE | +*/ #define LIBIE_AQ_FLAG_DD BIT(0)/* 0x1 */ #define LIBIE_AQ_FLAG_CMP BIT(1)/* 0x2 */ #define LIBIE_AQ_FLAG_ERR BIT(2)/* 0x4 */ +#define LIBIE_AQ_FLAG_VFE BIT(3)/* 0x8 */ #define LIBIE_AQ_FLAG_LB BIT(9)/* 0x200 */ #define LIBIE_AQ_FLAG_RD BIT(10)/* 0x400 */ +#define LIBIE_AQ_FLAG_VFC BIT(11)/* 0x800 */ #define LIBIE_AQ_FLAG_BUF BIT(12)/* 0x1000 */ #define LIBIE_AQ_FLAG_SI BIT(13)/* 0x2000 */ +#define LIBIE_AQ_FLAG_EI BIT(14)/* 0x4000 */ +#define LIBIE_AQ_FLAG_FE BIT(15)/* 0x8000 */ /* error codes */ enum libie_aq_err {
drivers/net/ethernet/intel/ixgbe/devlink/region.c +2 -2
@@ -74,7 +74,7 @@ static int ixgbe_devlink_nvm_snapshot(struct devlink *devlink,* period of reading whole NVM is longer than the maximum period * the lock can be taken defined by the IXGBE_NVM_TIMEOUT. */ - err =ixgbe_acquire_nvm (hw,IXGBE_RES_READ ); + err =ixgbe_acquire_nvm (hw,LIBIE_AQC_RES_ACCESS_READ );if (err) {NL_SET_ERR_MSG_MOD (extack,"Failed to acquire NVM semaphore" );
@@ -184,7 +184,7 @@ static int ixgbe_devlink_nvm_read(struct devlink *devlink,return -ERANGE ; } - err =ixgbe_acquire_nvm (hw,IXGBE_RES_READ ); + err =ixgbe_acquire_nvm (hw,LIBIE_AQC_RES_ACCESS_READ );if (err) {NL_SET_ERR_MSG_MOD (extack,"Failed to acquire NVM semaphore" );return -EBUSY ;
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +137 -135
789 lines not on this page · raw message
drivers/net/ethernet/intel/ixgbe/ixgbe_fw_update.c +2 -2
@@ -593,7 +593,7 @@ static int ixgbe_cancel_pending_update(struct ixgbe_adapter *adapter,"Canceling previous pending update" , component, 0, 0); - err =ixgbe_acquire_nvm (hw,IXGBE_RES_WRITE ); + err =ixgbe_acquire_nvm (hw,LIBIE_AQC_RES_ACCESS_WRITE );if (err) {NL_SET_ERR_MSG_MOD (extack,"Failed to acquire device flash lock" );
@@ -686,7 +686,7 @@ int ixgbe_flash_pldm_image(struct devlink *devlink,if (err)return err; - err =ixgbe_acquire_nvm (hw,IXGBE_RES_WRITE ); + err =ixgbe_acquire_nvm (hw,LIBIE_AQC_RES_ACCESS_WRITE );if (err) {NL_SET_ERR_MSG_MOD (extack,"Failed to acquire device flash lock" );
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 2/8] ixgbe: use libie adminq descriptors
Quoted 14 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 25 April 2025 11:38
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 2/8] ixgbe: use libie adminq descriptorsUse
libie_aq_descinstead ofixgbe_aci_desc. Do needed changes to allow clean build.Move additional caps used in ixgbe to libie.
Reviewed-by Przemek Kitszel <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>
Quoted 9 lines
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 +- .../ethernet/intel/ixgbe/ixgbe_type_e610.h | 226 +-------------- include/linux/net/intel/libie/adminq.h | 16 ++ .../net/ethernet/intel/ixgbe/devlink/region.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 272 +++++++++--------- .../ethernet/intel/ixgbe/ixgbe_fw_update.c | 4 +- 6 files changed, 167 insertions(+), 367 deletions(-)
PATCH v3 3/8 i40e: use libie adminq descriptors
In reply to Michal SwiatkowskiUse libie_aq_desc instead of i40e_aq_desc. Do needed changes to allow clean build.
Get version descriptor is a little less detailed on i40e. To not mess up with shifting or union inside libie desc use get version descriptor from i40e.
Move additional caps for i40e to libie.
Fix RCT in declaration that is using libie_aq_desc;
Use libie_aq_raw() wherever it can be used.
The libie aq error is extended, cover it in ice driver just to clean build. In next patches the libie code for that will be used in each of intel driver.
--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 12 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 155 +--- .../net/ethernet/intel/i40e/i40e_prototype.h | 16 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 6 +- include/linux/net/intel/libie/adminq.h | 19 + drivers/net/ethernet/intel/i40e/i40e_adminq.c | 68 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 754 +++++++++--------- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 10 +- .../net/ethernet/intel/i40e/i40e_debugfs.c | 46 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 31 +- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 16 +- drivers/net/ethernet/intel/ice/ice_main.c | 8 + 13 files changed, 505 insertions(+), 650 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.h +6 -6
@@ -9,7 +9,7 @@#include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC (R , i) \ - (&(((struct i40e_aq_desc *)((R).desc_buf.va))[i])) + (&(((struct libie_aq_desc *)((R).desc_buf.va))[i]))#define I40E_ADMINQ_DESC_ALIGNMENT 4096
@@ -39,7 +39,7 @@ struct i40e_asq_cmd_details {u16 flags_dis;bool async;bool postpone; -struct i40e_aq_desc *wb_desc; +struct libie_aq_desc *wb_desc; };#define I40E_ADMINQ_DETAILS (R , i) \
@@ -47,7 +47,7 @@ struct i40e_asq_cmd_details {/* ARQ event information */ struct i40e_arq_event_info { -struct i40e_aq_desc desc; +struct libie_aq_desc desc;u16 msg_len;u16 buf_len;u8 *msg_buf;
@@ -72,8 +72,8 @@ struct i40e_adminq_info {struct mutex arq_mutex;/* Receive queue lock */ /* last status values on send and receive queues */ -enum i40e_admin_queue_err asq_last_status; -enum i40e_admin_queue_err arq_last_status; +enum libie_aq_err asq_last_status; +enum libie_aq_err arq_last_status; };/**
@@ -119,7 +119,7 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)#define I40E_AQ_LARGE_BUF 512#define I40E_ASQ_CMD_TIMEOUT 250000/* usecs */ -void i40e_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc, +void i40e_fill_default_direct_cmd_desc (struct libie_aq_desc *desc,u16 opcode);#endif /* _I40E_ADMINQ_H_ */
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +2 -153
179 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_prototype.h +8 -8
@@ -23,22 +23,22 @@ int i40e_clean_arq_element(struct i40e_hw *hw,struct i40e_arq_event_info *e, u16 *events_pending);int -i40e_asq_send_command (struct i40e_hw *hw,struct i40e_aq_desc *desc, +i40e_asq_send_command (struct i40e_hw *hw,struct libie_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct i40e_asq_cmd_details *cmd_details);int -i40e_asq_send_command_atomic (struct i40e_hw *hw,struct i40e_aq_desc *desc, +i40e_asq_send_command_atomic (struct i40e_hw *hw,struct libie_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct i40e_asq_cmd_details *cmd_details,bool is_atomic_context);int i40e_asq_send_command_atomic_v2 (struct i40e_hw *hw, -struct i40e_aq_desc *desc, +struct libie_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct i40e_asq_cmd_details *cmd_details,bool is_atomic_context, -enum i40e_admin_queue_err *aq_status); +enum libie_aq_err *aq_status);/* debug function for adminq */ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
@@ -46,7 +46,7 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,bool i40e_check_asq_alive (struct i40e_hw *hw);int i40e_aq_queue_shutdown (struct i40e_hw *hw,bool unloading); -const char *i40e_aq_str (struct i40e_hw *hw,enum i40e_admin_queue_err aq_err); +const char *i40e_aq_str (struct i40e_hw *hw,enum libie_aq_err aq_err);int i40e_aq_get_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size);
@@ -155,7 +155,7 @@ int i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details, - enum i40e_admin_queue_err *aq_status); + enum libie_aq_err *aq_status);int i40e_aq_remove_macvlan (struct i40e_hw *hw,u16 vsi_id,struct i40e_aqc_remove_macvlan_element_data *mv_list,u16 count,struct i40e_asq_cmd_details *cmd_details);
@@ -163,7 +163,7 @@ int i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details, - enum i40e_admin_queue_err *aq_status); + enum libie_aq_err *aq_status); int i40e_aq_send_msg_to_vf(struct i40e_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval, u8 *msg, u16 msglen,
@@ -339,7 +339,7 @@ int i40e_nvmupd_command(struct i40e_hw *hw,struct i40e_nvm_access *cmd, u8 *bytes, int *errno);void i40e_nvmupd_check_wait_event (struct i40e_hw *hw,u16 opcode, -struct i40e_aq_desc *desc); +struct libie_aq_desc *desc);void i40e_nvmupd_clear_wait_state (struct i40e_hw *hw);void i40e_set_pci_config_data (struct i40e_hw *hw,u16 link_status);
drivers/net/ethernet/intel/i40e/i40e_type.h +3 -3
@@ -24,7 +24,7 @@/* forward declaration */ struct i40e_hw ; -typedef void (*I40E_ADMINQ_CALLBACK )(struct i40e_hw *,struct i40e_aq_desc *); +typedef void (*I40E_ADMINQ_CALLBACK )(struct i40e_hw *,struct libie_aq_desc *);/* Data type manipulation macros. */
@@ -555,8 +555,8 @@ struct i40e_hw {/* state of nvm update process */ enum i40e_nvmupd_state nvmupd_state; -struct i40e_aq_desc nvm_wb_desc; -struct i40e_aq_desc nvm_aq_event_desc; +struct libie_aq_desc nvm_wb_desc; +struct libie_aq_desc nvm_aq_event_desc;struct i40e_virt_mem nvm_buff;bool nvm_release_on_done;u16 nvm_wait_opcode;
include/linux/net/intel/libie/adminq.h +19 -0
@@ -145,17 +145,26 @@ struct libie_aqc_list_caps {LIBIE_CHECK_STRUCT_LEN (16 , libie_aqc_list_caps);/* Device/Function buffer entry, repeated per reported capability */ +#define LIBIE_AQC_CAPS_SWITCH_MODE 0x0001 +#define LIBIE_AQC_CAPS_MNG_MODE 0x0002 +#define LIBIE_AQC_CAPS_NPAR_ACTIVE 0x0003 +#define LIBIE_AQC_CAPS_OS2BMC_CAP 0x0004#define LIBIE_AQC_CAPS_VALID_FUNCTIONS 0x0005#define LIBIE_AQC_MAX_VALID_FUNCTIONS 0x8#define LIBIE_AQC_CAPS_SRIOV 0x0012#define LIBIE_AQC_CAPS_VF 0x0013#define LIBIE_AQC_CAPS_VMDQ 0x0014 +#define LIBIE_AQC_CAPS_8021QBG 0x0015 +#define LIBIE_AQC_CAPS_8021QBR 0x0016#define LIBIE_AQC_CAPS_VSI 0x0017#define LIBIE_AQC_CAPS_DCB 0x0018 +#define LIBIE_AQC_CAPS_FCOE 0x0021 +#define LIBIE_AQC_CAPS_ISCSI 0x0022#define LIBIE_AQC_CAPS_RSS 0x0040#define LIBIE_AQC_CAPS_RXQS 0x0041#define LIBIE_AQC_CAPS_TXQS 0x0042#define LIBIE_AQC_CAPS_MSIX 0x0043 +#define LIBIE_AQC_CAPS_VF_MSIX 0x0044#define LIBIE_AQC_CAPS_FD 0x0045#define LIBIE_AQC_CAPS_1588 0x0046#define LIBIE_AQC_CAPS_MAX_MTU 0x0047
@@ -166,6 +175,10 @@ LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);#define LIBIE_AQC_CAPS_NET_VER 0x004C#define LIBIE_AQC_CAPS_PENDING_NET_VER 0x004D#define LIBIE_AQC_CAPS_RDMA 0x0051 +#define LIBIE_AQC_CAPS_LED 0x0061 +#define LIBIE_AQC_CAPS_SDP 0x0062 +#define LIBIE_AQC_CAPS_MDIO 0x0063 +#define LIBIE_AQC_CAPS_WSR_PROT 0x0064#define LIBIE_AQC_CAPS_SENSOR_READING 0x0067#define LIBIE_AQC_INLINE_IPSEC 0x0070#define LIBIE_AQC_CAPS_NUM_ENABLED_PORTS 0x0072
@@ -179,6 +192,8 @@ LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);#define LIBIE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085#define LIBIE_AQC_CAPS_NAC_TOPOLOGY 0x0087#define LIBIE_AQC_CAPS_FW_LAG_SUPPORT 0x0092 +#define LIBIE_AQC_CAPS_FLEX10 0x00F1 +#define LIBIE_AQC_CAPS_CEM 0x00F2#define LIBIE_AQC_BIT_ROCEV2_LAG BIT(0)#define LIBIE_AQC_BIT_SRIOV_LAG BIT(1)#define LIBIE_AQC_BIT_SRIOV_AA_LAG BIT(2)
@@ -266,7 +281,11 @@ enum libie_aq_err {LIBIE_AQ_RC_OK =0 ,/* Success */ LIBIE_AQ_RC_EPERM =1 ,/* Operation not permitted */ LIBIE_AQ_RC_ENOENT =2 ,/* No such element */ +LIBIE_AQ_RC_ESRCH =3 ,/* Bad opcode */ +LIBIE_AQ_RC_EIO =5 ,/* I/O error */ +LIBIE_AQ_RC_EAGAIN =8 ,/* Try again */ LIBIE_AQ_RC_ENOMEM =9 ,/* Out of memory */ +LIBIE_AQ_RC_EACCES =10 ,/* Permission denied */ LIBIE_AQ_RC_EBUSY =12 ,/* Device or resource busy */ LIBIE_AQ_RC_EEXIST =13 ,/* Object already exists */ LIBIE_AQ_RC_EINVAL = 14, /* Invalid argument */
drivers/net/ethernet/intel/i40e/i40e_adminq.c +34 -34
196 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_common.c +368 -386
1,827 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_dcb.c +5 -5
@@ -750,7 +750,7 @@ static int i40e_get_ieee_dcb_config(struct i40e_hw *hw)I40E_AQ_LLDP_BRIDGE_TYPE_NEAREST_BRIDGE , &hw->remote_dcbx_config);/* Don't treat ENOENT as an error for Remote MIBs */ -if (hw->aq.asq_last_status ==I40E_AQ_RC_ENOENT ) +if (hw->aq.asq_last_status ==LIBIE_AQ_RC_ENOENT ) ret =0 ; out:
@@ -799,7 +799,7 @@ int i40e_get_dcb_config(struct i40e_hw *hw) }/* CEE mode not enabled try querying IEEE data */ -if (hw->aq.asq_last_status ==I40E_AQ_RC_ENOENT ) +if (hw->aq.asq_last_status ==LIBIE_AQ_RC_ENOENT )return i40e_get_ieee_dcb_config (hw);if (ret)
@@ -816,7 +816,7 @@ int i40e_get_dcb_config(struct i40e_hw *hw)I40E_AQ_LLDP_BRIDGE_TYPE_NEAREST_BRIDGE , &hw->remote_dcbx_config);/* Don't treat ENOENT as an error for Remote MIBs */ -if (hw->aq.asq_last_status ==I40E_AQ_RC_ENOENT ) +if (hw->aq.asq_last_status ==LIBIE_AQ_RC_ENOENT ) ret =0 ; out:
@@ -925,11 +925,11 @@ i40e_get_fw_lldp_status(struct i40e_hw *hw,if (!ret) { *lldp_status =I40E_GET_FW_LLDP_STATUS_ENABLED ; - }else if (hw->aq.asq_last_status ==I40E_AQ_RC_ENOENT ) { + }else if (hw->aq.asq_last_status ==LIBIE_AQ_RC_ENOENT ) {/* MIB is not available yet but the agent is running */ *lldp_status =I40E_GET_FW_LLDP_STATUS_ENABLED ; ret =0 ; - }else if (hw->aq.asq_last_status ==I40E_AQ_RC_EPERM ) { + }else if (hw->aq.asq_last_status ==LIBIE_AQ_RC_EPERM ) { *lldp_status =I40E_GET_FW_LLDP_STATUS_DISABLED ; ret =0 ; }
drivers/net/ethernet/intel/i40e/i40e_debugfs.c +23 -23
103 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +7 -7
@@ -1917,13 +1917,13 @@ static int i40e_get_eeprom(struct net_device *netdev, ret_val =i40e_aq_read_nvm (hw,0x0 , offset, len, (u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i), last,NULL ); -if (ret_val && hw->aq.asq_last_status ==I40E_AQ_RC_EPERM ) { +if (ret_val && hw->aq.asq_last_status ==LIBIE_AQ_RC_EPERM ) {dev_info (&pf->pdev->dev,"read NVM failed, invalid offset 0x%x\n" , offset);break ; }else if (ret_val && - hw->aq.asq_last_status ==I40E_AQ_RC_EACCES ) { + hw->aq.asq_last_status ==LIBIE_AQ_RC_EACCES ) {dev_info (&pf->pdev->dev,"read NVM failed, access, offset 0x%x\n" , offset);
@@ -5251,9 +5251,9 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)DECLARE_BITMAP (orig_flags,I40E_PF_FLAGS_NBITS );DECLARE_BITMAP (new_flags,I40E_PF_FLAGS_NBITS );struct i40e_netdev_priv *np =netdev_priv (dev); -enum i40e_admin_queue_err adq_err;struct i40e_vsi *vsi = np->vsi;struct i40e_pf *pf = vsi->back; +enum libie_aq_err adq_err;u32 reset_needed =0 ;int status;u32 i, j;
@@ -5373,7 +5373,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags) valid_flags =I40E_AQ_SET_SWITCH_CFG_PROMISC ; ret =i40e_aq_set_switch_config (&pf->hw, sw_flags, valid_flags,0 ,NULL ); -if (ret && pf->hw.aq.asq_last_status !=I40E_AQ_RC_ESRCH ) { +if (ret && pf->hw.aq.asq_last_status !=LIBIE_AQ_RC_ESRCH ) { dev_info(&pf->pdev->dev, "couldn't set switch config bits, err %pe aq_err %s\n", ERR_PTR(ret),
@@ -5440,16 +5440,16 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)if (status) { adq_err = pf->hw.aq.asq_last_status;switch (adq_err) { -case I40E_AQ_RC_EEXIST : +case LIBIE_AQ_RC_EEXIST :dev_warn (&pf->pdev->dev,"FW LLDP agent is already running\n" ); reset_needed =0 ;break ; -case I40E_AQ_RC_EPERM : +case LIBIE_AQ_RC_EPERM :dev_warn (&pf->pdev->dev,"Device configuration forbids SW from starting the LLDP agent.\n" );return -EINVAL ; -case I40E_AQ_RC_EAGAIN : +case LIBIE_AQ_RC_EAGAIN :dev_warn (&pf->pdev->dev,"Stop FW LLDP agent command is still being processed, please try again in a second.\n" );return -EBUSY ;
drivers/net/ethernet/intel/i40e/i40e_main.c +14 -17
@@ -2339,14 +2339,14 @@ void i40e_aqc_del_filters(struct i40e_vsi *vsi, const char *vsi_name, int num_del, int *retval) { struct i40e_hw *hw = &vsi->back->hw; -enum i40e_admin_queue_err aq_status; +enum libie_aq_err aq_status;int aq_ret; aq_ret =i40e_aq_remove_macvlan_v2 (hw, vsi->seid, list, num_del,NULL , &aq_status);/* Explicitly ignore and do not report when firmware returns ENOENT */ -if (aq_ret && !(aq_status ==I40E_AQ_RC_ENOENT )) { +if (aq_ret && !(aq_status ==LIBIE_AQ_RC_ENOENT )) { *retval = -EIO ; dev_info(&vsi->back->pdev->dev, "ignoring delete macvlan error on %s, err %pe, aq_err %s\n",
@@ -2374,7 +2374,7 @@ void i40e_aqc_add_filters(struct i40e_vsi *vsi, const char *vsi_name, int num_add) {struct i40e_hw *hw = &vsi->back->hw; -enum i40e_admin_queue_err aq_status; +enum libie_aq_err aq_status;int fcnt;i40e_aq_add_macvlan_v2 (hw, vsi->seid, list, num_add,NULL , &aq_status);
@@ -6017,8 +6017,8 @@ int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 seid, u64 max_tx_rate)**/ static void i40e_remove_queue_channels (struct i40e_vsi *vsi) { -enum i40e_admin_queue_err last_aq_status;struct i40e_cloud_filter *cfilter; +enum libie_aq_err last_aq_status;struct i40e_channel *ch, *ch_tmp;struct i40e_pf *pf = vsi->back;struct hlist_node *node;
@@ -6559,7 +6559,7 @@ static int i40e_validate_and_set_switch_mode(struct i40e_vsi *vsi) ret =i40e_aq_set_switch_config (hw, pf->last_sw_conf_flags, pf->last_sw_conf_valid_flags, mode,NULL ); -if (ret && hw->aq.asq_last_status !=I40E_AQ_RC_ESRCH ) +if (ret && hw->aq.asq_last_status !=LIBIE_AQ_RC_ESRCH ) dev_err(&pf->pdev->dev, "couldn't set switch config bits, err %pe aq_err %s\n", ERR_PTR(ret),
@@ -7234,7 +7234,7 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf)dev_dbg (&pf->pdev->dev,"DCBX offload is supported for this PF.\n" ); } - }else if (pf->hw.aq.asq_last_status ==I40E_AQ_RC_EPERM ) { + }else if (pf->hw.aq.asq_last_status ==LIBIE_AQ_RC_EPERM ) {dev_info (&pf->pdev->dev,"FW LLDP disabled for this PF.\n" );set_bit (I40E_FLAG_FW_LLDP_DIS , pf->flags); }else {
@@ -9439,8 +9439,7 @@ bool i40e_dcb_need_reconfig(struct i40e_pf *pf,static int i40e_handle_lldp_event (struct i40e_pf *pf,struct i40e_arq_event_info *e) { -struct i40e_aqc_lldp_get_mib *mib = - (struct i40e_aqc_lldp_get_mib *)&e->desc.params.raw; +struct i40e_aqc_lldp_get_mib *mib =libie_aq_raw (&e->desc);struct i40e_hw *hw = &pf->hw;struct i40e_dcbx_config tmp_dcbx_cfg;bool need_reconfig = false;
@@ -9579,8 +9578,7 @@ void i40e_do_reset_safe(struct i40e_pf *pf, u32 reset_flags)static void i40e_handle_lan_overflow_event (struct i40e_pf *pf,struct i40e_arq_event_info *e) { -struct i40e_aqc_lan_overflow *data = - (struct i40e_aqc_lan_overflow *)&e->desc.params.raw; +struct i40e_aqc_lan_overflow *data =libie_aq_raw (&e->desc);u32 queue =le32_to_cpu (data->prtdcb_rupto);u32 qtx_ctl =le32_to_cpu (data->otx_ctl);struct i40e_hw *hw = &pf->hw;
@@ -10097,8 +10095,7 @@ static void i40e_reset_subtask(struct i40e_pf *pf)static void i40e_handle_link_event (struct i40e_pf *pf,struct i40e_arq_event_info *e) { -struct i40e_aqc_get_link_status *status = - (struct i40e_aqc_get_link_status *)&e->desc.params.raw; +struct i40e_aqc_get_link_status *status =libie_aq_raw (&e->desc);/* Do a new status request to re-enable LSE reporting * and load new status information into the hw struct
@@ -10470,12 +10467,12 @@ static int i40e_reconstitute_veb(struct i40e_veb *veb)static int i40e_get_capabilities (struct i40e_pf *pf,enum i40e_admin_queue_opc list_type) { -struct i40e_aqc_list_capabilities_element_resp *cap_buf; +struct libie_aqc_list_caps_elem *cap_buf;u16 data_size;int buf_len;int err; - buf_len =40 *sizeof (struct i40e_aqc_list_capabilities_element_resp ); + buf_len =40 *sizeof (struct libie_aqc_list_caps_elem ); do { cap_buf = kzalloc(buf_len, GFP_KERNEL); if (!cap_buf)
@@ -10488,10 +10485,10 @@ static int i40e_get_capabilities(struct i40e_pf *pf,/* data loaded, buffer no longer needed */ kfree (cap_buf); -if (pf->hw.aq.asq_last_status ==I40E_AQ_RC_ENOMEM ) { +if (pf->hw.aq.asq_last_status ==LIBIE_AQ_RC_ENOMEM ) {/* retry with a larger buffer */ buf_len = data_size; - }else if (pf->hw.aq.asq_last_status !=I40E_AQ_RC_OK || err) { + }else if (pf->hw.aq.asq_last_status !=LIBIE_AQ_RC_OK || err) { dev_info(&pf->pdev->dev, "capability discovery failed, err %pe aq_err %s\n", ERR_PTR(err),
@@ -15045,7 +15042,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit, bool lock_acqui valid_flags =I40E_AQ_SET_SWITCH_CFG_PROMISC ; ret =i40e_aq_set_switch_config (&pf->hw, flags, valid_flags,0 ,NULL ); -if (ret && pf->hw.aq.asq_last_status !=I40E_AQ_RC_ESRCH ) { +if (ret && pf->hw.aq.asq_last_status !=LIBIE_AQ_RC_ESRCH ) { dev_info(&pf->pdev->dev, "couldn't set switch config bits, err %pe aq_err %s\n", ERR_PTR(ret),
drivers/net/ethernet/intel/i40e/i40e_nvm.c +8 -8
@@ -997,7 +997,7 @@ static int i40e_nvmupd_exec_aq(struct i40e_hw *hw, u8 *bytes, int *perrno) {struct i40e_asq_cmd_details cmd_details; -struct i40e_aq_desc *aq_desc; +struct libie_aq_desc *aq_desc;u32 buff_size =0 ;u8 *buff =NULL ;u32 aq_desc_len;
@@ -1011,7 +1011,7 @@ static int i40e_nvmupd_exec_aq(struct i40e_hw *hw,memset (&cmd_details,0 ,sizeof (cmd_details)); cmd_details.wb_desc = &hw->nvm_wb_desc; - aq_desc_len =sizeof (struct i40e_aq_desc ); + aq_desc_len =sizeof (struct libie_aq_desc );memset (&hw->nvm_wb_desc,0 , aq_desc_len);/* get the aq descriptor */
@@ -1022,7 +1022,7 @@ static int i40e_nvmupd_exec_aq(struct i40e_hw *hw, *perrno = -EINVAL ;return -EINVAL ; } - aq_desc = (struct i40e_aq_desc *)bytes; + aq_desc = (struct libie_aq_desc *)bytes;/* if data buffer needed, make sure it's ready */ aq_data_len = cmd->data_size - aq_desc_len;
@@ -1087,7 +1087,7 @@ static int i40e_nvmupd_get_aq_result(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_NVM ,"NVMUPD: %s\n" , __func__); - aq_desc_len =sizeof (struct i40e_aq_desc ); + aq_desc_len =sizeof (struct libie_aq_desc ); aq_total_len = aq_desc_len +le16_to_cpu (hw->nvm_wb_desc.datalen);/* check offset range */
@@ -1154,7 +1154,7 @@ static int i40e_nvmupd_get_aq_event(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_NVM ,"NVMUPD: %s\n" , __func__); - aq_desc_len =sizeof (struct i40e_aq_desc ); + aq_desc_len =sizeof (struct libie_aq_desc ); aq_total_len = aq_desc_len +le16_to_cpu (hw->nvm_aq_event_desc.datalen);/* check copylength range */
@@ -1442,7 +1442,7 @@ static int i40e_nvmupd_state_writing(struct i40e_hw *hw,* so here we try to reacquire the semaphore then retry the write. * We only do one retry, then give up. */ -if (status && hw->aq.asq_last_status ==I40E_AQ_RC_EBUSY && +if (status && hw->aq.asq_last_status ==LIBIE_AQ_RC_EBUSY && !retry_attempt) {u32 old_asq_status = hw->aq.asq_last_status;int old_status = status;
@@ -1628,9 +1628,9 @@ void i40e_nvmupd_clear_wait_state(struct i40e_hw *hw)* @desc: AdminQ descriptor **/ void i40e_nvmupd_check_wait_event (struct i40e_hw *hw,u16 opcode, -struct i40e_aq_desc *desc) +struct libie_aq_desc *desc) { -u32 aq_desc_len =sizeof (struct i40e_aq_desc ); +u32 aq_desc_len =sizeof (struct libie_aq_desc );if (opcode == hw->nvm_wait_opcode) {memcpy (&hw->nvm_aq_event_desc, desc, aq_desc_len);
drivers/net/ethernet/intel/ice/ice_main.c +8 -0
@@ -7990,6 +7990,14 @@ const char *ice_aq_str(enum libie_aq_err aq_err)return "ICE_AQ_RC_EBADMAN" ;case LIBIE_AQ_RC_EBADBUF :return "ICE_AQ_RC_EBADBUF" ; +case LIBIE_AQ_RC_ESRCH : +return "ICE_AQ_RC_ESRCH" ; +case LIBIE_AQ_RC_EIO : +return "ICE_AQ_RC_EIO" ; +case LIBIE_AQ_RC_EAGAIN : +return "ICE_AQ_RC_EAGAIN" ; +case LIBIE_AQ_RC_EACCES : +return "ICE_AQ_RC_EACCES" ; }return "ICE_AQ_RC_UNKNOWN" ;
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 3/8] i40e: use libie adminq descriptors
Quoted 8 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 25 April 2025 11:38
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 3/8] i40e: use libie adminq descriptorsUse
libie_aq_descinstead ofi40e_aq_desc. Do needed changes to allow
clean build.
Quoted 2 lines
Get version descriptor is a little less detailed on i40e. To not mess up
with shifting or union inside libie desc use get version descriptor from i40e.
Quoted 8 lines
Move additional caps for i40e to libie.
Fix RCT in declaration that is using
libie_aq_desc;Use
libie_aq_raw()wherever it can be used.The libie aq error is extended, cover it in ice driver just to clean
build. In next patches the libie code for that will be used in each of intel driver.
Quoted 4 lines
Reviewed-by Przemek Kitszel <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
Quoted 15 lines
drivers/net/ethernet/intel/i40e/i40e_adminq.h | 12 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 155 +--- .../net/ethernet/intel/i40e/i40e_prototype.h | 16 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 6 +- include/linux/net/intel/libie/adminq.h | 19 + drivers/net/ethernet/intel/i40e/i40e_adminq.c | 68 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 754 +++++++++--------- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 10 +- .../net/ethernet/intel/i40e/i40e_debugfs.c | 46 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 31 +- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 16 +- drivers/net/ethernet/intel/ice/ice_main.c | 8 + 13 files changed, 505 insertions(+), 650 deletions(-)
PATCH v3 4/8 iavf: use libie adminq descriptors
In reply to Michal SwiatkowskiUse libie_aq_desc instead of iavf_aq_desc. Do needed changes to allow clean build
Use libie_aq_raw() wherever it can be used.
--- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 12 +- .../net/ethernet/intel/iavf/iavf_adminq_cmd.h | 83 +---------- .../net/ethernet/intel/iavf/iavf_prototype.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 62 ++++---- drivers/net/ethernet/intel/iavf/iavf_common.c | 134 +++++++++--------- 6 files changed, 106 insertions(+), 191 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_adminq.h +6 -6
@@ -9,7 +9,7 @@#include "iavf_adminq_cmd.h" #define IAVF_ADMINQ_DESC (R , i) \ - (&(((struct iavf_aq_desc *)((R).desc_buf.va))[i])) + (&(((struct libie_aq_desc *)((R).desc_buf.va))[i]))#define IAVF_ADMINQ_DESC_ALIGNMENT 4096
@@ -39,7 +39,7 @@ struct iavf_asq_cmd_details {u16 flags_dis;bool async;bool postpone; -struct iavf_aq_desc *wb_desc; +struct libie_aq_desc *wb_desc; };#define IAVF_ADMINQ_DETAILS (R , i) \
@@ -47,7 +47,7 @@ struct iavf_asq_cmd_details {/* ARQ event information */ struct iavf_arq_event_info { -struct iavf_aq_desc desc; +struct libie_aq_desc desc;u16 msg_len;u16 buf_len;u8 *msg_buf;
@@ -72,8 +72,8 @@ struct iavf_adminq_info {struct mutex arq_mutex;/* Receive queue lock */ /* last status values on send and receive queues */ -enum iavf_admin_queue_err asq_last_status; -enum iavf_admin_queue_err arq_last_status; +enum libie_aq_err asq_last_status; +enum libie_aq_err arq_last_status; };/**
@@ -123,6 +123,6 @@ static inline int iavf_aq_rc_to_posix(int aq_ret, int aq_rc)#define IAVF_AQ_LARGE_BUF 512#define IAVF_ASQ_CMD_TIMEOUT 250000/* usecs */ -void iavf_fill_default_direct_cmd_desc (struct iavf_aq_desc *desc,u16 opcode); +void iavf_fill_default_direct_cmd_desc (struct libie_aq_desc *desc,u16 opcode);#endif /* _IAVF_ADMINQ_H_ */
drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +2 -81
95 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_prototype.h +2 -2
@@ -22,7 +22,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,struct iavf_arq_event_info *e, u16 *events_pending);enum iavf_status iavf_asq_send_command (struct iavf_hw *hw, -struct iavf_aq_desc *desc, +struct libie_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct iavf_asq_cmd_details *cmd_details);
@@ -34,7 +34,7 @@ void iavf_debug_aq(struct iavf_hw *hw, enum iavf_debug_mask mask,bool iavf_check_asq_alive (struct iavf_hw *hw);enum iavf_status iavf_aq_queue_shutdown (struct iavf_hw *hw,bool unloading); -const char *iavf_aq_str (struct iavf_hw *hw,enum iavf_admin_queue_err aq_err); +const char *iavf_aq_str (struct iavf_hw *hw,enum libie_aq_err aq_err);const char *iavf_stat_str (struct iavf_hw *hw,enum iavf_status stat_err); enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid,
drivers/net/ethernet/intel/iavf/iavf_type.h +1 -1
@@ -19,7 +19,7 @@/* forward declaration */ struct iavf_hw ; -typedef void (*IAVF_ADMINQ_CALLBACK )(struct iavf_hw *,struct iavf_aq_desc *); +typedef void (*IAVF_ADMINQ_CALLBACK )(struct iavf_hw *,struct libie_aq_desc *);/* Data type manipulation macros. */
drivers/net/ethernet/intel/iavf/iavf_adminq.c +31 -31
173 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_common.c +64 -70
205 lines not on this page · raw message
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 4/8] iavf: use libie adminq descriptors
Quoted 665 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Friday, April 25, 2025 8:08 AM
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 4/8] iavf: use libie adminq descriptorsUse
libie_aq_descinstead ofiavf_aq_desc. Do needed changes to allow clean buildUse
libie_aq_raw()wherever it can be used.Reviewed-by Przemek Kitszel <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 12 +- .../net/ethernet/intel/iavf/iavf_adminq_cmd.h | 83 +---------- .../net/ethernet/intel/iavf/iavf_prototype.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 62 ++++---- drivers/net/ethernet/intel/iavf/iavf_common.c | 134 +++++++++--------- 6 files changed, 106 insertions(+), 191 deletions(-)drivers/net/ethernet/intel/iavf/iavf_adminq.h +7
-6@@ -9,7 +9,7 @@#include "iavf_adminq_cmd.h" #define IAVF_ADMINQ_DESC (R , i) \ - (&(((struct iavf_aq_desc *)((R).desc_buf.va))[i])) + (&(((struct libie_aq_desc *)((R).desc_buf.va))[i]))#define IAVF_ADMINQ_DESC_ALIGNMENT 4096@@ -39,7 +39,7 @@ struct iavf_asq_cmd_details {u16 flags_dis;bool async;bool postpone; -struct iavf_aq_desc *wb_desc; +struct libie_aq_desc *wb_desc; };#define IAVF_ADMINQ_DETAILS (R , i) \@@ -47,7 +47,7 @@ struct iavf_asq_cmd_details {/* ARQ event information */ struct iavf_arq_event_info { -struct iavf_aq_desc desc; +struct libie_aq_desc desc;u16 msg_len;u16 buf_len;u8 *msg_buf;@@ -72,8 +72,8 @@ struct iavf_adminq_info {struct mutex arq_mutex;/* Receive queue lock */ /* last status values on send and receive queues */ -enum iavf_admin_queue_err asq_last_status; -enum iavf_admin_queue_err arq_last_status; +enum libie_aq_err asq_last_status; +enum libie_aq_err arq_last_status; };/** @@ -123,6 +123,6 @@ static inline int iavf_aq_rc_to_posix(int aq_ret, int aq_rc)#define IAVF_AQ_LARGE_BUF 512#define IAVF_ASQ_CMD_TIMEOUT 250000/* usecs */ -void iavf_fill_default_direct_cmd_desc (struct iavf_aq_desc *desc,u16 opcode); +void iavf_fill_default_direct_cmd_desc (struct libie_aq_desc *desc,u16 +opcode);#endif /* _IAVF_ADMINQ_H_ */ drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +2
-0@@ -4,6 +4,8 @@#ifndef _IAVF_ADMINQ_CMD_H_#define _IAVF_ADMINQ_CMD_H_ +#include <linux/net/intel/libie/adminq.h> +/* This header file defines the iavf Admin Queue commands and is shared between
* iavf Firmware and Software.
*drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-0@@ -21,87 +23,6 @@ /* API version 1.7 implements additional link and PHY-specific APIs */ #define
IAVF_MINOR_VER_GET_LINK_INFO_XL7100x0007drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-43-struct iavf_aq_desc { -__le16 flags; -__le16 opcode; -__le16 datalen; -__le16 retval; -__le32 cookie_high; -__le32 cookie_low; -union { -struct { -__le32 param0; -__le32 param1; -__le32 param2; -__le32 param3; - } internal; -struct { -__le32 param0; -__le32 param1; -__le32 addr_high; -__le32 addr_low; - } external; -u8 raw[16 ]; - } params; -}; - -/* Flags sub-structure -* |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 | -* |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE | -*/ - -/* command flags and offsets*/ -#define IAVF_AQ_FLAG_DD_SHIFT 0 -#define IAVF_AQ_FLAG_CMP_SHIFT 1 -#define IAVF_AQ_FLAG_ERR_SHIFT 2 -#define IAVF_AQ_FLAG_VFE_SHIFT 3 -#define IAVF_AQ_FLAG_LB_SHIFT 9 -#define IAVF_AQ_FLAG_RD_SHIFT 10 -#define IAVF_AQ_FLAG_VFC_SHIFT 11 -#define IAVF_AQ_FLAG_BUF_SHIFT 12 -#define IAVF_AQ_FLAG_SI_SHIFT 13 -#define IAVF_AQ_FLAG_EI_SHIFT 14 -#define IAVF_AQ_FLAG_FE_SHIFT 15 - -#define IAVF_AQ_FLAG_DD BIT(IAVF_AQ_FLAG_DD_SHIFT)/* 0x1 */
drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-4-#define IAVF_AQ_FLAG_CMP BIT(IAVF_AQ_FLAG_CMP_SHIFT)/* 0x2 */ -#define IAVF_AQ_FLAG_ERR BIT(IAVF_AQ_FLAG_ERR_SHIFT)/* 0x4 */ -#define IAVF_AQ_FLAG_VFE BIT(IAVF_AQ_FLAG_VFE_SHIFT)/* 0x8 */ -#define IAVF_AQ_FLAG_LB BIT(IAVF_AQ_FLAG_LB_SHIFT)/*
0x200*/
-#defineIAVF_AQ_FLAG_RDBIT(IAVF_AQ_FLAG_RD_SHIFT)/*0x400*/drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-3-#define IAVF_AQ_FLAG_VFC BIT(IAVF_AQ_FLAG_VFC_SHIFT)/* 0x800 */ -#define IAVF_AQ_FLAG_BUF BIT(IAVF_AQ_FLAG_BUF_SHIFT)/* 0x1000 */ -#define IAVF_AQ_FLAG_SI BIT(IAVF_AQ_FLAG_SI_SHIFT)/*
0x2000*/
-#defineIAVF_AQ_FLAG_EIBIT(IAVF_AQ_FLAG_EI_SHIFT)/*0x4000*/
-#defineIAVF_AQ_FLAG_FEBIT(IAVF_AQ_FLAG_FE_SHIFT)/*0x8000*/drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-24- -/* error codes */ -enum iavf_admin_queue_err { -IAVF_AQ_RC_OK =0 ,/* success */ -IAVF_AQ_RC_EPERM =1 ,/* Operation not permitted */ -IAVF_AQ_RC_ENOENT =2 ,/* No such element */ -IAVF_AQ_RC_ESRCH =3 ,/* Bad opcode */ -IAVF_AQ_RC_EINTR =4 ,/* operation interrupted */ -IAVF_AQ_RC_EIO =5 ,/* I/O error */ -IAVF_AQ_RC_ENXIO =6 ,/* No such resource */ -IAVF_AQ_RC_E2BIG =7 ,/* Arg too long */ -IAVF_AQ_RC_EAGAIN =8 ,/* Try again */ -IAVF_AQ_RC_ENOMEM =9 ,/* Out of memory */ -IAVF_AQ_RC_EACCES =10 ,/* Permission denied */ -IAVF_AQ_RC_EFAULT =11 ,/* Bad address */ -IAVF_AQ_RC_EBUSY =12 ,/* Device or resource busy */ -IAVF_AQ_RC_EEXIST =13 ,/* object already exists */ -IAVF_AQ_RC_EINVAL =14 ,/* Invalid argument */ -IAVF_AQ_RC_ENOTTY =15 ,/* Not a typewriter */ -IAVF_AQ_RC_ENOSPC =16 ,/* No space left or alloc failure */ -IAVF_AQ_RC_ENOSYS =17 ,/* Function not implemented */ -IAVF_AQ_RC_ERANGE =18 ,/* Parameter out of range */ -IAVF_AQ_RC_EFLUSHED =19 ,/* Cmd flushed due to prev cmd error */ -IAVF_AQ_RC_BAD_ADDR =20 ,/* Descriptor contains a bad pointer */
drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +0
-4-IAVF_AQ_RC_EMODE =21 ,/* Op not allowed in current dev mode */ - IAVF_AQ_RC_EFBIG = 22, /* File too large */ -}; -/* Admin Queue command opcodes */ enum iavf_admin_queue_opc {/* aq commands */ drivers/net/ethernet/intel/iavf/iavf_prototype.h +1
-1@@ -22,7 +22,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, struct iavf_arq_event_info *e, u16 *events_pending); enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, - struct iavf_aq_desc *desc, + struct libie_aq_desc *desc, void *buff, /* can be NULL */ u16 buff_size,drivers/net/ethernet/intel/iavf/iavf_prototype.h +0
-0struct iavf_asq_cmd_details *cmd_details);@@ -34,7 +34,7 @@ void iavf_debug_aq(struct iavf_hw *hw, enumiavf_debug_mask mask, bool iavf_check_asq_alive(struct iavf_hw *hw); enum iavf_status
iavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading); -const char *iavf_aq_str(structiavf_hw*hw, enumiavf_admin_queue_erraq_err); +const char *iavf_aq_str(structiavf_hw*hw, enumlibie_aq_erraq_err);
const char *iavf_stat_str(structiavf_hw*hw, enumiavf_statusstat_err);enum
iavf_statusiavf_aq_set_rss_lut(structiavf_hw*hw, u16 seid, diff --gita/drivers/net/ethernet/intel/iavf/iavf_type.hb/drivers/net/ethernet/intel/iavf/iavf_type.h
indexf9e1319620f4..c9961a2d1217100644drivers/net/ethernet/intel/iavf/iavf_type.h +2
-1@@ -19,7 +19,7 @@/* forward declaration */ struct iavf_hw ; -typedef void (*IAVF_ADMINQ_CALLBACK )(struct iavf_hw *,struct iavf_aq_desc *); +typedef void (*IAVF_ADMINQ_CALLBACK )(struct iavf_hw *,struct +libie_aq_desc *);/* Data type manipulation macros. */ drivers/net/ethernet/intel/iavf/iavf_adminq.c +1
-1@@ -18,7 +18,7 @@ static enum iavf_status iavf_alloc_adminq_asq_ring(struct iavf_hw *hw) ret_code =iavf_allocate_dma_mem (hw, &hw->aq.asq.desc_buf, iavf_mem_atq_ring, (hw->aq.num_asq_entries * -sizeof (struct iavf_aq_desc )), +sizeof (struct libie_aq_desc )),IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code)drivers/net/ethernet/intel/iavf/iavf_adminq.c +1
-1return ret_code;@@ -45,7 +45,7 @@ static enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw) ret_code =iavf_allocate_dma_mem (hw, &hw->aq.arq.desc_buf, iavf_mem_arq_ring, (hw->aq.num_arq_entries * -sizeof (struct iavf_aq_desc )), +sizeof (struct libie_aq_desc )),IAVF_ADMINQ_DESC_ALIGNMENT );drivers/net/ethernet/intel/iavf/iavf_adminq.c +3
-3return ret_code;@@ -81,7 +81,7 @@ static void iavf_free_adminq_arq(struct iavf_hw *hw)**/ static enum iavf_status iavf_alloc_arq_bufs (struct iavf_hw *hw) { -struct iavf_aq_desc *desc; +struct libie_aq_desc *desc;struct iavf_dma_mem *bi;enum iavf_status ret_code;int i;@@ -111,9 +111,9 @@ static enum iavf_status iavf_alloc_arq_bufs(struct iavf_hw *hw)/* now configure the descriptors for use */ desc =IAVF_ADMINQ_DESC (hw->aq.arq, i); - desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_BUF ); + desc->flags =cpu_to_le16 (LIBIE_AQ_FLAG_BUF );if (hw->aq.arq_buf_size >IAVF_AQ_LARGE_BUF ) - desc->flags |=cpu_to_le16 (IAVF_AQ_FLAG_LB ); + desc->flags |=cpu_to_le16 (LIBIE_AQ_FLAG_LB ); desc->opcode =0 ;/* This is in accordance with Admin queue design, there is no * register for buffer size configuration @@ -122,12 +122,12 @@
static enumiavf_statusiavf_alloc_arq_bufs(struct iavf_hw *hw)drivers/net/ethernet/intel/iavf/iavf_adminq.c +6
-6desc->retval =0 ; desc->cookie_high =0 ; desc->cookie_low =0 ; - desc->params.external.addr_high = + desc->params.generic.addr_high =cpu_to_le32 (upper_32_bits (bi->pa)); - desc->params.external.addr_low = + desc->params.generic.addr_low =cpu_to_le32 (lower_32_bits (bi->pa)); - desc->params.external.param0 =0 ; - desc->params.external.param1 =0 ; + desc->params.generic.param0 =0 ; + desc->params.generic.param1 =0 ; } alloc_arq_bufs:@@ -558,8 +558,8 @@ static u16 iavf_clean_asq(struct iavf_hw *hw)struct iavf_adminq_ring *asq = &hw->aq.asq;struct iavf_asq_cmd_details *details;u16 ntc = asq->next_to_clean; -struct iavf_aq_desc desc_cb; -struct iavf_aq_desc *desc; +struct libie_aq_desc desc_cb; +struct libie_aq_desc *desc; desc =IAVF_ADMINQ_DESC (*asq, ntc); details = IAVF_ADMINQ_DETAILS(*asq, ntc); @@ -573,7 +573,7 @@static u16
iavf_clean_asq(struct iavf_hw *hw)drivers/net/ethernet/intel/iavf/iavf_adminq.c +4
-4desc_cb = *desc;cb_func (hw, &desc_cb); } -memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct libie_aq_desc ));memset ((void *)details,0 ,sizeof (struct iavf_asq_cmd_details )); ntc++;@@ -615,14 +615,14 @@ bool iavf_asq_done(struct iavf_hw *hw)* queue. It runs the queue, cleans the queue, etc **/ enum iavf_status iavf_asq_send_command (struct iavf_hw *hw, -struct iavf_aq_desc *desc, +struct libie_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct iavf_asq_cmd_details *cmd_details) {struct iavf_dma_mem *dma_buff =NULL ;struct iavf_asq_cmd_details *details; -struct iavf_aq_desc *desc_on_ring; +struct libie_aq_desc *desc_on_ring;bool cmd_completed = false;enum iavf_status status =0 ;u16 retval =0 ;@@ -637,7 +637,7 @@ enum iavf_status iavf_asq_send_command(structiavf_hw *hw, goto asq_send_command_error; } - hw->aq.asq_last_status =IAVF_AQ_RC_OK ; + hw->aq.asq_last_status =LIBIE_AQ_RC_OK ; val =rd32 (hw,IAVF_VF_ATQH1 );drivers/net/ethernet/intel/iavf/iavf_adminq.c +5
-5if (val >= hw->aq.num_asq_entries) {@@ -717,9 +717,9 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,/* Update the address values in the desc with the pa value * for respective buffer */ - desc_on_ring->params.external.addr_high = + desc_on_ring->params.generic.addr_high =cpu_to_le32 (upper_32_bits (dma_buff->pa)); - desc_on_ring->params.external.addr_low = + desc_on_ring->params.generic.addr_low =cpu_to_le32 (lower_32_bits (dma_buff->pa)); }@@ -766,13 +766,13 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, retval &=0xff ; } cmd_completed = true; -if ((enum iavf_admin_queue_err )retval ==IAVF_AQ_RC_OK ) +if ((enum libie_aq_err )retval ==LIBIE_AQ_RC_OK ) status =0 ; -else if ((enum iavf_admin_queue_err )retval == IAVF_AQ_RC_EBUSY) + else if ((enum libie_aq_err)retval == LIBIE_AQ_RC_EBUSY) status =IAVF_ERR_NOT_READY ;else status =IAVF_ERR_ADMIN_QUEUE_ERROR ; - hw->aq.asq_last_status = (enum iavf_admin_queue_err )retval; + hw->aq.asq_last_status = (enum libie_aq_err )retval; }drivers/net/ethernet/intel/iavf/iavf_adminq.c +5
-4iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE,@@ -809,12 +809,12 @@ enum iavf_status iavf_asq_send_command(structiavf_hw *hw, * * Fill the desc with default values **/ -void iavf_fill_default_direct_cmd_desc (struct iavf_aq_desc *desc,u16 opcode) +void iavf_fill_default_direct_cmd_desc (struct libie_aq_desc *desc,u16 +opcode) {/* zero out the desc */ -memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct libie_aq_desc )); desc->opcode =cpu_to_le16 (opcode); - desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_SI ); + desc->flags =cpu_to_le16 (LIBIE_AQ_FLAG_SI ); }/** @@ -832,7 +832,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, u16 *pending) {u16 ntc = hw->aq.arq.next_to_clean; -struct iavf_aq_desc *desc; +struct libie_aq_desc *desc;enum iavf_status ret_code =0 ;struct iavf_dma_mem *bi;drivers/net/ethernet/intel/iavf/iavf_adminq.c +2
-2u16 desc_idx;@@ -866,9 +866,9 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, desc_idx = ntc; hw->aq.arq_last_status = - (enum iavf_admin_queue_err )le16_to_cpu (desc->retval); + (enum libie_aq_err )le16_to_cpu (desc->retval); flags =le16_to_cpu (desc->flags); -if (flags &IAVF_AQ_FLAG_ERR ) { +if (flags &LIBIE_AQ_FLAG_ERR ) { ret_code =IAVF_ERR_ADMIN_QUEUE_ERROR ; iavf_debug(hw,drivers/net/ethernet/intel/iavf/iavf_adminq.c +5
-5IAVF_DEBUG_AQ_MESSAGE,@@ -892,14 +892,14 @@ enum iavf_status iavf_clean_arq_element(structiavf_hw *hw, * size */ bi = &hw->aq.arq.r.arq_bi[ntc]; -memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct libie_aq_desc )); - desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_BUF ); + desc->flags =cpu_to_le16 (LIBIE_AQ_FLAG_BUF );if (hw->aq.arq_buf_size >IAVF_AQ_LARGE_BUF ) - desc->flags |=cpu_to_le16 (IAVF_AQ_FLAG_LB ); + desc->flags |=cpu_to_le16 (LIBIE_AQ_FLAG_LB ); desc->datalen =cpu_to_le16 ((u16 )bi->size); - desc->params.external.addr_high =cpu_to_le32 (upper_32_bits (bi->pa)); - desc->params.external.addr_low =cpu_to_le32 (lower_32_bits (bi->pa)); + desc->params.generic.addr_high =cpu_to_le32 (upper_32_bits (bi->pa)); + desc->params.generic.addr_low =cpu_to_le32 (lower_32_bits (bi->pa));/* set tail = the last cleaned desc index. */ drivers/net/ethernet/intel/iavf/iavf_adminq.c +0
-0wr32 (hw,IAVF_VF_ARQT1 , ntc);drivers/net/ethernet/intel/iavf/iavf_common.c +39
-46@@ -12,55 +12,47 @@* @hw: pointer to the HW structure * @aq_err: the AQ error code to convert **/ -const char *iavf_aq_str (struct iavf_hw *hw,enum iavf_admin_queue_err aq_err) +const char *iavf_aq_str (struct iavf_hw *hw,enum libie_aq_err aq_err) {switch (aq_err) { -case IAVF_AQ_RC_OK : +case LIBIE_AQ_RC_OK :return "OK" ; -case IAVF_AQ_RC_EPERM : -return "IAVF_AQ_RC_EPERM" ; -case IAVF_AQ_RC_ENOENT : -return "IAVF_AQ_RC_ENOENT" ; -case IAVF_AQ_RC_ESRCH : -return "IAVF_AQ_RC_ESRCH" ; -case IAVF_AQ_RC_EINTR : -return "IAVF_AQ_RC_EINTR" ; -case IAVF_AQ_RC_EIO : -return "IAVF_AQ_RC_EIO" ; -case IAVF_AQ_RC_ENXIO : -return "IAVF_AQ_RC_ENXIO" ; -case IAVF_AQ_RC_E2BIG : -return "IAVF_AQ_RC_E2BIG" ; -case IAVF_AQ_RC_EAGAIN : -return "IAVF_AQ_RC_EAGAIN" ; -case IAVF_AQ_RC_ENOMEM : -return "IAVF_AQ_RC_ENOMEM" ; -case IAVF_AQ_RC_EACCES : -return "IAVF_AQ_RC_EACCES" ; -case IAVF_AQ_RC_EFAULT : -return "IAVF_AQ_RC_EFAULT" ; -case IAVF_AQ_RC_EBUSY : -return "IAVF_AQ_RC_EBUSY" ; -case IAVF_AQ_RC_EEXIST : -return "IAVF_AQ_RC_EEXIST" ; -case IAVF_AQ_RC_EINVAL : -return "IAVF_AQ_RC_EINVAL" ; -case IAVF_AQ_RC_ENOTTY : -return "IAVF_AQ_RC_ENOTTY" ; -case IAVF_AQ_RC_ENOSPC : -return "IAVF_AQ_RC_ENOSPC" ; -case IAVF_AQ_RC_ENOSYS : -return "IAVF_AQ_RC_ENOSYS" ; -case IAVF_AQ_RC_ERANGE : -return "IAVF_AQ_RC_ERANGE" ; -case IAVF_AQ_RC_EFLUSHED : -return "IAVF_AQ_RC_EFLUSHED" ; -case IAVF_AQ_RC_BAD_ADDR : -return "IAVF_AQ_RC_BAD_ADDR" ; -case IAVF_AQ_RC_EMODE : -return "IAVF_AQ_RC_EMODE" ; -case IAVF_AQ_RC_EFBIG : -return "IAVF_AQ_RC_EFBIG" ; +case LIBIE_AQ_RC_EPERM : +return "LIBIE_AQ_RC_EPERM" ; +case LIBIE_AQ_RC_ENOENT : +return "LIBIE_AQ_RC_ENOENT" ; +case LIBIE_AQ_RC_ESRCH : +return "LIBIE_AQ_RC_ESRCH" ; +case LIBIE_AQ_RC_EIO : +return "LIBIE_AQ_RC_EIO" ; +case LIBIE_AQ_RC_EAGAIN : +return "LIBIE_AQ_RC_EAGAIN" ; +case LIBIE_AQ_RC_ENOMEM : +return "LIBIE_AQ_RC_ENOMEM" ; +case LIBIE_AQ_RC_EACCES : +return "LIBIE_AQ_RC_EACCES" ; +case LIBIE_AQ_RC_EBUSY : +return "LIBIE_AQ_RC_EBUSY" ; +case LIBIE_AQ_RC_EEXIST : +return "LIBIE_AQ_RC_EEXIST" ; +case LIBIE_AQ_RC_EINVAL : +return "LIBIE_AQ_RC_EINVAL" ; +case LIBIE_AQ_RC_ENOSPC : +return "LIBIE_AQ_RC_ENOSPC" ; +case LIBIE_AQ_RC_ENOSYS : +return "LIBIE_AQ_RC_ENOSYS" ; +case LIBIE_AQ_RC_EMODE : +return "LIBIE_AQ_RC_EMODE" ; +case LIBIE_AQ_RC_ENOSEC : +return "LIBIE_AQ_RC_ENOSEC" ; +case LIBIE_AQ_RC_EBADSIG : +return "LIBIE_AQ_RC_EBADSIG" ; +case LIBIE_AQ_RC_ESVN : +return "LIBIE_AQ_RC_ESVN" ; +case LIBIE_AQ_RC_EBADMAN : +return "LIBIE_AQ_RC_EBADMAN" ; +case LIBIE_AQ_RC_EBADBUF : +return "LIBIE_AQ_RC_EBADBUF" ; } snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err); @@ -228,7 +220,7 @@ const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status
stat_err) void iavf_debug_aq(structiavf_hw*hw, enumiavf_debug_maskmask, void *desc,drivers/net/ethernet/intel/iavf/iavf_common.c +1
-1void *buffer, u16 buf_len) { -struct iavf_aq_desc *aq_desc = (struct iavf_aq_desc *)desc; +struct libie_aq_desc *aq_desc = (struct libie_aq_desc *)desc;u8 *buf = (u8 *)buffer; if ((!(mask & hw->debug_mask)) || !desc) @@ -244,11 +236,11 @@ voidiavf_debug_aq(struct
iavf_hw*hw, enumiavf_debug_maskmask, void *desc,drivers/net/ethernet/intel/iavf/iavf_common.c +4
-4le32_to_cpu (aq_desc->cookie_high), le32_to_cpu(aq_desc->cookie_low));iavf_debug (hw, mask,"\tparam (0,1) 0x%08X 0x%08X\n" , -le32_to_cpu (aq_desc->params.internal.param0), -le32_to_cpu (aq_desc->params.internal.param1)); +le32_to_cpu (aq_desc->params.generic.param0), +le32_to_cpu (aq_desc->params.generic.param1));iavf_debug (hw, mask,"\taddr (h,l) 0x%08X 0x%08X\n" , -le32_to_cpu (aq_desc->params.external.addr_high), -le32_to_cpu (aq_desc->params.external.addr_low)); +le32_to_cpu (aq_desc->params.generic.addr_high), +le32_to_cpu (aq_desc->params.generic.addr_low));if (buffer && aq_desc->datalen) { u16 len = le16_to_cpu(aq_desc->datalen); @@ -297,11 +289,11@@ bool
iavf_check_asq_alive(struct iavf_hw *hw)
**/
enumiavf_statusiavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading){drivers/net/ethernet/intel/iavf/iavf_common.c +3
-3-struct iavf_aq_desc desc; -struct iavf_aqc_queue_shutdown *cmd = - (struct iavf_aqc_queue_shutdown *)&desc.params.raw; +struct iavf_aqc_queue_shutdown *cmd; +struct libie_aq_desc desc;enum iavf_status status; + cmd =libie_aq_raw (&desc); iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_queue_shutdown);drivers/net/ethernet/intel/iavf/iavf_common.c +4
-3if (unloading)@@ -327,12 +319,13 @@ static enum iavf_status iavf_aq_get_set_rss_lut(struct iavf_hw *hw, u8 *lut, u16 lut_size, bool set) { +struct iavf_aqc_get_set_rss_lut *cmd_resp; +struct libie_aq_desc desc;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;u16 flags; + cmd_resp =libie_aq_raw (&desc); +if (set) iavf_fill_default_direct_cmd_desc(&desc,drivers/net/ethernet/intel/iavf/iavf_common.c +2
-2iavf_aqc_opc_set_rss_lut);@@ -341,8 +334,8 @@ static enum iavf_status iavf_aq_get_set_rss_lut(structiavf_hw *hw, iavf_aqc_opc_get_rss_lut);/* Indirect command */ - desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_BUF ); - desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_BUF ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_RD ); vsi_id = FIELD_PREP(IAVF_AQC_SET_RSS_LUT_VSI_ID_MASK, vsi_id) |
FIELD_PREP(IAVF_AQC_SET_RSS_LUT_VSI_VALID, 1); @@ -
392,11 +385,12 @@iavf_statusiavf_aq_get_set_rss_key(structiavf_hw*hw, u16vsi_id,drivers/net/ethernet/intel/iavf/iavf_common.c +7
-6struct iavf_aqc_get_set_rss_key_data *key, bool set) { -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;u16 key_size =sizeof (struct iavf_aqc_get_set_rss_key_data ); +struct iavf_aqc_get_set_rss_key *cmd_resp; +struct libie_aq_desc desc; +enum iavf_status status; + + cmd_resp =libie_aq_raw (&desc);if (set) iavf_fill_default_direct_cmd_desc(&desc,@@ -406,8 +400,8 @@ iavf_status iavf_aq_get_set_rss_key(struct iavf_hw *hw,u16 vsi_id, iavf_aqc_opc_get_rss_key);/* Indirect command */ - desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_BUF ); - desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_RD ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_BUF ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_RD ); vsi_id = FIELD_PREP(IAVF_AQC_SET_RSS_KEY_VSI_ID_MASK, vsi_id) |
FIELD_PREP(IAVF_AQC_SET_RSS_KEY_VSI_VALID, 1); @@ -
452,18 +446,18 @@ enumiavf_statusiavf_aq_send_msg_to_pf(structiavf_hw*hw,
structiavf_asq_cmd_details*cmd_details) {drivers/net/ethernet/intel/iavf/iavf_common.c +1
-1struct iavf_asq_cmd_details details; -struct iavf_aq_desc desc; +struct libie_aq_desc desc;enum iavf_status status; iavf_fill_default_direct_cmd_desc(&desc,
iavf_aqc_opc_send_msg_to_pf);drivers/net/ethernet/intel/iavf/iavf_common.c +4
-5- desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_SI ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_SI ); desc.cookie_high =cpu_to_le32 (v_opcode); desc.cookie_low =cpu_to_le32 (v_retval);if (msglen) { - desc.flags |=cpu_to_le16 ((u16)(IAVF_AQ_FLAG_BUF - |IAVF_AQ_FLAG_RD )); + desc.flags |=cpu_to_le16 ((u16)(LIBIE_AQ_FLAG_BUF + |LIBIE_AQ_FLAG_RD ));if (msglen >IAVF_AQ_LARGE_BUF ) - desc.flags |=cpu_to_le16 ((u16 )IAVF_AQ_FLAG_LB ); + desc.flags |=cpu_to_le16 ((u16 )LIBIE_AQ_FLAG_LB ); desc.datalen =cpu_to_le16 (msglen); }if (!cmd_details) { --
Quoted 1 line
2.42.0
PATCH v3 5/8 libie: add adminq helper for converting err to str
In reply to Michal SwiatkowskiAdd a new module for common handling of Admin Queue related logic. Start by a helper for error to string conversion. This lives inside libie/, but is a separate module what follows our logic of splitting into topical modules, to avoid pulling in not needed stuff, and have better organization in general.
Olek suggested how to better solve the error to string conversion.
It will be used in follow-up patches in ice, i40e and iavf.
--- drivers/net/ethernet/intel/libie/Kconfig | 6 +++ drivers/net/ethernet/intel/libie/Makefile | 4 ++ include/linux/net/intel/libie/adminq.h | 2 + drivers/net/ethernet/intel/libie/adminq.c | 52 +++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 drivers/net/ethernet/intel/libie/adminq.c
drivers/net/ethernet/intel/libie/Kconfig +6 -0
@@ -8,3 +8,9 @@ config LIBIE libie (Intel Ethernet library) is a common library built on top of libeth and containing vendor-specific routines shared between several Intel Ethernet drivers. + +config LIBIE_ADMINQ + tristate + help + Helper functions used by Intel Ethernet drivers for administration + queue command interface (aka adminq).
drivers/net/ethernet/intel/libie/Makefile +4 -0
@@ -4,3 +4,7 @@ obj-$(CONFIG_LIBIE) += libie.o libie-y := rx.o + +obj-$(CONFIG_LIBIE_ADMINQ) += libie_adminq.o + +libie_adminq-y := adminq.o
include/linux/net/intel/libie/adminq.h +2 -0
@@ -304,4 +304,6 @@ static inline void *libie_aq_raw(struct libie_aq_desc *desc) return &desc->params.raw; } +const char *libie_aq_str (enum libie_aq_err err); +#endif /* __LIBIE_ADMINQ_H */
drivers/net/ethernet/intel/libie/adminq.c new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH v3 6/8 ice: use libie_aq_str
In reply to Michal SwiatkowskiSimple:
s/ice_aq_str/libie_aq_str
Add libie_aminq module in ice Kconfig.
--- drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/devlink/devlink.c | 10 +-- .../net/ethernet/intel/ice/devlink/health.c | 2 +- drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 ++-- .../net/ethernet/intel/ice/ice_fw_update.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_main.c | 69 +++---------------- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 4 +- .../net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 24 +++---- 11 files changed, 59 insertions(+), 108 deletions(-)
drivers/net/ethernet/intel/Kconfig +1 -0
@@ -294,6 +294,7 @@ config ICE select AUXILIARY_BUS select DIMLIB select LIBIE + select LIBIE_ADMINQ select NET_DEVLINK select PACKING select PLDMFW
drivers/net/ethernet/intel/ice/ice.h +0 -1
@@ -971,7 +971,6 @@ int ice_plug_aux_dev(struct ice_pf *pf);void ice_unplug_aux_dev (struct ice_pf *pf);int ice_init_rdma (struct ice_pf *pf);void ice_deinit_rdma (struct ice_pf *pf); -const char *ice_aq_str (enum libie_aq_err aq_err);bool ice_is_wol_supported (struct ice_hw *hw);void ice_fdir_del_all_fltrs (struct ice_vsi *vsi);int
drivers/net/ethernet/intel/ice/devlink/devlink.c +5 -5
@@ -293,7 +293,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_discover_dev_caps (hw, &ctx->dev_caps);if (err) {dev_dbg (dev,"Failed to discover device capabilities, status %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Unable to discover device capabilities" ); goto out_free_ctx; }
@@ -302,7 +302,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_get_inactive_orom_ver (hw, &ctx->pending_orom);if (err) {dev_dbg (dev,"Unable to read inactive Option ROM version data, status %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx->dev_caps.common_cap.nvm_update_pending_orom = false;
@@ -313,7 +313,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_get_inactive_nvm_ver (hw, &ctx->pending_nvm);if (err) {dev_dbg (dev,"Unable to read inactive NVM version data, status %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx->dev_caps.common_cap.nvm_update_pending_nvm = false;
@@ -324,7 +324,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_get_inactive_netlist_ver (hw, &ctx->pending_netlist);if (err) {dev_dbg (dev,"Unable to read inactive Netlist version data, status %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx->dev_caps.common_cap.nvm_update_pending_netlist = false;
@@ -440,7 +440,7 @@ ice_devlink_reload_empr_start(struct ice_pf *pf, err =ice_aq_nvm_update_empr (hw);if (err) {dev_err (dev,"Failed to trigger EMP device reset to reload firmware, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to trigger EMP device reset to reload firmware" );return err; }
drivers/net/ethernet/intel/ice/devlink/health.c +1 -1
@@ -204,7 +204,7 @@ static void ice_config_health_events(struct ice_pf *pf, bool enable)if (ret)dev_err (ice_pf_to_dev (pf),"Failed to %s firmware health events, err %d aq_err %s\n" ,str_enable_disable (enable), ret, -ice_aq_str (pf->hw.adminq.sq_last_status)); +libie_aq_str (pf->hw.adminq.sq_last_status)); }/**
drivers/net/ethernet/intel/ice/ice_dpll.c +10 -10
@@ -155,7 +155,7 @@ ice_dpll_pin_freq_set(struct ice_pf *pf, struct ice_dpll_pin *pin,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to set pin freq:%u on pin:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), freq, pin->idx);return ret; }
@@ -462,7 +462,7 @@ ice_dpll_pin_enable(struct ice_hw *hw, struct ice_dpll_pin *pin,if (ret)NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to enable %s pin:%u" , - ret,ice_aq_str (hw->adminq.sq_last_status), + ret,libie_aq_str (hw->adminq.sq_last_status), pin_type_name[pin_type], pin->idx);return ret;
@@ -507,7 +507,7 @@ ice_dpll_pin_disable(struct ice_hw *hw, struct ice_dpll_pin *pin,if (ret)NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to disable %s pin:%u" , - ret,ice_aq_str (hw->adminq.sq_last_status), + ret,libie_aq_str (hw->adminq.sq_last_status), pin_type_name[pin_type], pin->idx);return ret;
@@ -686,13 +686,13 @@ ice_dpll_pin_state_update(struct ice_pf *pf, struct ice_dpll_pin *pin,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to update %s pin:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), pin_type_name[pin_type], pin->idx); else dev_err_ratelimited(ice_pf_to_dev(pf),"err:%d %s failed to update %s pin:%u\n" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), pin_type_name[pin_type], pin->idx);return ret; }
@@ -725,7 +725,7 @@ ice_dpll_hw_input_prio_set(struct ice_pf *pf, struct ice_dpll *dpll,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to set pin prio:%u on pin:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), prio, pin->idx); else dpll->input_prio[pin->idx] = prio;
@@ -1586,7 +1586,7 @@ ice_dpll_pin_phase_adjust_set(const struct dpll_pin *pin, void *pin_priv,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), phase_adjust, p->idx, d->dpll_idx);return ret;
@@ -2092,7 +2092,7 @@ ice_dpll_rclk_state_on_pin_set(const struct dpll_pin *pin, void *pin_priv,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to set pin state:%u for pin:%u on parent:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), state, p->idx, parent->idx); unlock:mutex_unlock (&pf->dplls.lock);
@@ -2291,7 +2291,7 @@ ice_dpll_update_state(struct ice_pf *pf, struct ice_dpll *d, bool init)dev_err (ice_pf_to_dev (pf),"update dpll=%d state failed, ret=%d %s\n" , d->dpll_idx, ret, -ice_aq_str (pf->hw.adminq.sq_last_status)); +libie_aq_str (pf->hw.adminq.sq_last_status));return ret; }if (init) {
@@ -3205,7 +3205,7 @@ static int ice_dpll_init_info(struct ice_pf *pf, bool cgu)if (ret) {dev_err (ice_pf_to_dev (pf),"err:%d %s failed to read cgu abilities\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status));return ret; }
drivers/net/ethernet/intel/ice/ice_ethtool.c +6 -6
@@ -878,7 +878,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, ret =ice_acquire_nvm (hw,ICE_RES_READ );if (ret) {dev_err (dev,"ice_acquire_nvm failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status)); goto out; }
@@ -886,7 +886,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, false);if (ret) {dev_err (dev,"ice_read_flat_nvm failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status)); goto release; }
@@ -3613,15 +3613,15 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)if (aq_failures &ICE_SET_FC_AQ_FAIL_GET ) {netdev_info (netdev,"Set fc failed on the get_phy_capabilities call with err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); err = -EAGAIN ; }else if (aq_failures &ICE_SET_FC_AQ_FAIL_SET ) {netdev_info (netdev,"Set fc failed on the set_phy_config call with err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); err = -EAGAIN ; }else if (aq_failures &ICE_SET_FC_AQ_FAIL_UPDATE ) {netdev_info (netdev,"Set fc failed on the get_link_info call with err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); err = -EAGAIN ; }
@@ -3952,7 +3952,7 @@ static int ice_vsi_set_dflt_rss_lut(struct ice_vsi *vsi, int req_rss_size) err =ice_set_rss_lut (vsi, lut, vsi->rss_table_size);if (err)dev_err (dev,"Cannot set RSS lut, err %d aq_err %s\n" , err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));kfree (lut);return err;
drivers/net/ethernet/intel/ice/ice_fw_update.c +10 -10
@@ -68,7 +68,7 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length)if (status) {dev_err (dev,"Failed to send record package data to firmware, err %d aq_err %s\n" , - status,ice_aq_str (hw->adminq.sq_last_status)); + status,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to record package data to firmware" );return -EIO ; }
@@ -257,7 +257,7 @@ ice_send_component_table(struct pldmfw *context, struct pldmfw_component *componif (status) {dev_err (dev,"Failed to transfer component table to firmware, err %d aq_err %s\n" , - status,ice_aq_str (hw->adminq.sq_last_status)); + status,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to transfer component table to firmware" );return -EIO ; }
@@ -314,7 +314,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,if (err) {dev_err (dev,"Failed to flash module 0x%02x with block of size %u at offset %u, err %d aq_err %s\n" , module, block_size, offset, err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to program flash module" );return -EIO ; }
@@ -358,7 +358,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,if (completion_retval) {dev_err (dev,"Firmware failed to flash module 0x%02x with block of size %u at offset %u, err %s\n" , module, block_size, offset, -ice_aq_str ((enum libie_aq_err )completion_retval)); +libie_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to program flash module" );return -EIO ; }
@@ -506,7 +506,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,if (err) {dev_err (dev,"Failed to erase %s (module 0x%02x), err %d aq_err %s\n" , component, module, err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to erase flash module" ); err = -EIO ; goto out_notify_devlink;
@@ -536,7 +536,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,if (completion_retval) {dev_err (dev,"Firmware failed to erase %s (module 0x02%x), aq_err %s\n" , component, module, -ice_aq_str ((enum libie_aq_err )completion_retval)); +libie_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to erase flash" ); err = -EIO ; goto out_notify_devlink;
@@ -583,7 +583,7 @@ ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, err =ice_nvm_write_activate (hw, activate_flags, &response_flags);if (err) {dev_err (dev,"Failed to switch active flash banks, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to switch active flash banks" );return -EIO ; }
@@ -615,7 +615,7 @@ ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, completion_retval =le16_to_cpu (task.event.desc.retval);if (completion_retval) {dev_err (dev,"Firmware failed to switch active flash banks aq_err %s\n" , -ice_aq_str ((enum libie_aq_err )completion_retval)); +libie_aq_str ((enum libie_aq_err )completion_retval));NL_SET_ERR_MSG_MOD (extack,"Firmware failed to switch active flash banks" );return -EIO ; }
@@ -953,7 +953,7 @@ ice_cancel_pending_update(struct ice_pf *pf, const char *component, err =ice_acquire_nvm (hw,ICE_RES_WRITE );if (err) {dev_err (dev,"Failed to acquire device flash lock, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to acquire device flash lock" );return err; }
@@ -1046,7 +1046,7 @@ int ice_devlink_flash_update(struct devlink *devlink, err =ice_acquire_nvm (hw,ICE_RES_WRITE );if (err) {dev_err (dev,"Failed to acquire device flash lock, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Failed to acquire device flash lock" );return err; }
drivers/net/ethernet/intel/ice/ice_lib.c +2 -2
@@ -3787,11 +3787,11 @@ int ice_set_link(struct ice_vsi *vsi, bool ena)if (hw->adminq.sq_last_status ==LIBIE_AQ_RC_EMODE )dev_dbg (dev,"can't set link to %s, err %d aq_err %s. not fatal, continuing\n" , (ena ?"ON" :"OFF" ), status, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status)); }else if (status) {dev_err (dev,"can't set link to %s, err %d aq_err %s\n" , (ena ?"ON" :"OFF" ), status, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));return status; }
drivers/net/ethernet/intel/ice/ice_main.c +10 -59
135 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_virtchnl.c +2 -2
@@ -307,7 +307,7 @@ ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode,if (aq_ret && pf->hw.mailboxq.sq_last_status !=LIBIE_AQ_RC_ENOSYS ) {dev_info (dev,"Unable to send the message to VF %d ret %d aq_err %s\n" , vf->vf_id, aq_ret, -ice_aq_str (pf->hw.mailboxq.sq_last_status)); +libie_aq_str (pf->hw.mailboxq.sq_last_status));return -EIO ; }
@@ -852,7 +852,7 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add) status =ice_update_vsi (hw, vsi->idx, ctx,NULL );if (status) {dev_err (dev,"update VSI for RSS failed, err %d aq_err %s\n" , - status,ice_aq_str (hw->adminq.sq_last_status)); + status,libie_aq_str (hw->adminq.sq_last_status)); v_ret =VIRTCHNL_STATUS_ERR_PARAM ; }else { vsi->info.q_opt_rss = ctx->info.q_opt_rss;
drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +12 -12
@@ -113,7 +113,7 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) {dev_err (ice_pf_to_dev (vsi->back),"update VSI for VLAN insert failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); goto out; }
@@ -169,7 +169,7 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) {dev_err (ice_pf_to_dev (vsi->back),"update VSI for VLAN strip failed, ena = %d err %d aq_err %s\n" , - ena, err,ice_aq_str (hw->adminq.sq_last_status)); + ena, err,libie_aq_str (hw->adminq.sq_last_status)); goto out; }
@@ -258,7 +258,7 @@ static int __ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, u16 pvid_info) ret =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (ret) {dev_info (ice_hw_to_dev (hw),"update VSI for port VLAN failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status)); goto out; }
@@ -306,7 +306,7 @@ int ice_vsi_clear_inner_port_vlan(struct ice_vsi *vsi) ret =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (ret)dev_err (ice_hw_to_dev (hw),"update VSI for port VLAN failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status));kfree (ctxt);return ret;
@@ -353,7 +353,7 @@ static int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena)if (status) {netdev_err (vsi->netdev,"%sabling VLAN pruning on VSI handle: %d, VSI HW ID: %d failed, err = %d, aq_err = %s\n" , ena ?"En" :"Dis" , vsi->idx, vsi->vsi_num, status, -ice_aq_str (pf->hw.adminq.sq_last_status)); +libie_aq_str (pf->hw.adminq.sq_last_status)); goto err_out; }
@@ -497,7 +497,7 @@ int ice_vsi_ena_outer_stripping(struct ice_vsi *vsi, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err)dev_err (ice_pf_to_dev (vsi->back),"update VSI for enabling outer VLAN stripping failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;
@@ -544,7 +544,7 @@ int ice_vsi_dis_outer_stripping(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err)dev_err (ice_pf_to_dev (vsi->back),"update VSI for disabling outer VLAN stripping failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;
@@ -604,7 +604,7 @@ int ice_vsi_ena_outer_insertion(struct ice_vsi *vsi, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err)dev_err (ice_pf_to_dev (vsi->back),"update VSI for enabling outer VLAN insertion failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;
@@ -654,7 +654,7 @@ int ice_vsi_dis_outer_insertion(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err)dev_err (ice_pf_to_dev (vsi->back),"update VSI for disabling outer VLAN insertion failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;
@@ -720,7 +720,7 @@ __ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, u16 vlan_info, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) {dev_err (ice_pf_to_dev (vsi->back),"update VSI for setting outer port based VLAN failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); }else { vsi->info.port_based_outer_vlan = ctxt->info.port_based_outer_vlan; vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;
@@ -782,7 +782,7 @@ int ice_vsi_clear_outer_port_vlan(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err)dev_err (ice_pf_to_dev (vsi->back),"update VSI for clearing outer port based VLAN failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status));kfree (ctxt);return err;
@@ -830,7 +830,7 @@ int ice_vsi_clear_port_vlan(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) {dev_err (ice_pf_to_dev (vsi->back),"update VSI for clearing port based VLAN failed, err %d aq_err %s\n" , - err,ice_aq_str (hw->adminq.sq_last_status)); + err,libie_aq_str (hw->adminq.sq_last_status)); }else { vsi->info.port_based_outer_vlan = ctxt->info.port_based_outer_vlan;
Signature · 1 line
2.42.0
RE: [iwl-next v3 6/8] ice: use libie_aq_str
Quoted 15 lines
-----Original Message-----
From: Michal Swiatkowski <[email protected]>
Sent: Friday, April 25, 2025 8:08 AM
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [iwl-next v3 6/8] ice: uselibie_aq_str
Quoted 7 lines
Simple:
s/ice_aq_str/libie_aq_strAdd
libie_aminqmodule in iceKconfig.Reviewed-by Przemek Kitszel <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>
Quoted 759 lines
--- drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/devlink/devlink.c | 10 +-- .../net/ethernet/intel/ice/devlink/health.c | 2 +- drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 ++-- .../net/ethernet/intel/ice/ice_fw_update.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_main.c | 69 +++---------------- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 4 +- .../net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 24 +++---- 11 files changed, 59 insertions(+), 108 deletions(-)drivers/net/ethernet/intel/Kconfig +1
-0@@ -294,6 +294,7 @@ config ICE select AUXILIARY_BUS select DIMLIB select LIBIE + select LIBIE_ADMINQ select NET_DEVLINK select PACKING select PLDMFWdrivers/net/ethernet/intel/ice/ice.h +0
-0@@ -971,7 +971,6 @@ int ice_plug_aux_dev(struct ice_pf *pf); void ice_unplug_aux_dev(struct ice_pf *pf); int ice_init_rdma(struct ice_pf *pf);void
ice_deinit_rdma(struct ice_pf *pf); -const char *ice_aq_str(enumlibie_aq_erraq_err); boolice_is_wol_supported(struct ice_hw *hw); voidice_fdir_del_all_fltrs(struct ice_vsi *vsi); int diff --gita/drivers/net/ethernet/intel/ice/devlink/devlink.cb/drivers/net/ethernet/intel/ice/devlink/devlink.c
indexfcb199efbea5..ca24714c8131100644drivers/net/ethernet/intel/ice/devlink/devlink.c +1
-1@@ -293,7 +293,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_discover_dev_caps (hw, &ctx->dev_caps);if (err) { dev_dbg(dev, "Failed to discover device capabilities, status %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));NL_SET_ERR_MSG_MOD (extack,"Unable to discover device capabilities");drivers/net/ethernet/intel/ice/devlink/devlink.c +1
-1goto out_free_ctx; }@@ -302,7 +302,7 @@ static int ice_devlink_info_get(struct devlink *devlink, err =ice_get_inactive_orom_ver (hw, &ctx->pending_orom);if (err) { dev_dbg(dev, "Unable to read inactive Option ROM version data, status %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx-
Quoted 1 line
dev_caps.common_cap.nvm_update_pending_orom = false; @@ -313,7
+313,7 @@ static int ice_devlink_info_get(struct devlink *devlink,
drivers/net/ethernet/intel/ice/devlink/devlink.c +0
-0err =ice_get_inactive_nvm_ver (hw, &ctx->pending_nvm);if (err) { dev_dbg(dev, "Unable to read inactive NVM versiondata, status %d
aq_err%s\n",drivers/net/ethernet/intel/ice/devlink/devlink.c +1
-1- err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx-Quoted 1 line
dev_caps.common_cap.nvm_update_pending_nvm = false; @@ -324,7
+324,7 @@ static int ice_devlink_info_get(struct devlink *devlink,
drivers/net/ethernet/intel/ice/devlink/devlink.c +0
-0err =ice_get_inactive_netlist_ver (hw, &ctx->pending_netlist);if (err) { dev_dbg(dev, "Unable to read inactive Netlist versiondata, status %d
aq_err%s\n",drivers/net/ethernet/intel/ice/devlink/devlink.c +1
-1- err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));/* disable display of pending Option ROM */ ctx-Quoted 1 line
dev_caps.common_cap.nvm_update_pending_netlist = false; @@ -440,7
+440,7 @@ ice_devlink_reload_empr_start(struct
ice_pf*pf,drivers/net/ethernet/intel/ice/devlink/devlink.c +0
-0err =ice_aq_nvm_update_empr (hw);if (err) { dev_err(dev, "Failed to trigger EMP device reset to reloadfirmware, err %d
aq_err%s\n",drivers/net/ethernet/intel/ice/devlink/devlink.c +1
-1- err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to trigger EMP devicereset to reload firmware");
drivers/net/ethernet/intel/ice/devlink/devlink.c +0
-0return err; }drivers/net/ethernet/intel/ice/devlink/health.c +1
-1@@ -204,7 +204,7 @@ static void ice_config_health_events(struct ice_pf *pf, bool enable)if (ret) dev_err(ice_pf_to_dev(pf), "Failed to %s firmware health events, err %d aq_err %s\n", str_enable_disable(enable), ret, -ice_aq_str (pf->hw.adminq.sq_last_status)); +libie_aq_str (pf->hw.adminq.sq_last_status)); }/**
drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1@@ -155,7 +155,7 @@ ice_dpll_pin_freq_set(struct ice_pf *pf, struct ice_dpll_pin *pin,NL_SET_ERR_MSG_FMT (extack, "err:%d %s failed to set pin freq:%u on pin:%u", ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), freq, pin->idx);drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1return ret; }@@ -462,7 +462,7 @@ ice_dpll_pin_enable(struct ice_hw *hw, struct ice_dpll_pin *pin, if (ret) NL_SET_ERR_MSG_FMT(extack,"err:%d %s failed to enable %s pin:%u" , - ret, ice_aq_str(hw->adminq.sq_last_status), + ret,libie_aq_str (hw- >adminq.sq_last_status), pin_type_name[pin_type], pin->idx);drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1return ret;@@ -507,7 +507,7 @@ ice_dpll_pin_disable(struct ice_hw *hw, struct ice_dpll_pin *pin, if (ret) NL_SET_ERR_MSG_FMT(extack,"err:%d %s failed to disable %s pin:%u" , - ret, ice_aq_str(hw->adminq.sq_last_status), + ret,libie_aq_str (hw- >adminq.sq_last_status), pin_type_name[pin_type], pin->idx);drivers/net/ethernet/intel/ice/ice_dpll.c +2
-2return ret;@@ -686,13 +686,13 @@ ice_dpll_pin_state_update(struct ice_pf *pf, struct ice_dpll_pin *pin,NL_SET_ERR_MSG_FMT (extack,"err:%d %s failed to update %s pin:%u" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), pin_type_name[pin_type], pin->idx); else dev_err_ratelimited(ice_pf_to_dev(pf),"err:%d %s failed to update %s pin:%u\n" , ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), pin_type_name[pin_type], pin->idx);return ret;}
drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1@@ -725,7 +725,7 @@ ice_dpll_hw_input_prio_set(struct ice_pf *pf, struct ice_dpll *dpll,NL_SET_ERR_MSG_FMT (extack, "err:%d %s failed to set pin prio:%u on pin:%u", ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), prio, pin->idx);drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1else dpll->input_prio[pin->idx] = prio;@@ -1586,7 +1586,7 @@ ice_dpll_pin_phase_adjust_set(const struct dpll_pin *pin, void *pin_priv,NL_SET_ERR_MSG_FMT (extack, "err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u", ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), phase_adjust, p->idx, d->dpll_idx);drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1return ret;@@ -2092,7 +2092,7 @@ ice_dpll_rclk_state_on_pin_set(const struct dpll_pin *pin, void *pin_priv,NL_SET_ERR_MSG_FMT (extack, "err:%d %s failed to set pin state:%u for pin:%u on parent:%u", ret, -ice_aq_str (pf->hw.adminq.sq_last_status), +libie_aq_str (pf->hw.adminq.sq_last_status), state, p->idx, parent->idx);unlock:
drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1mutex_unlock (&pf->dplls.lock);@@ -2291,7 +2291,7 @@ ice_dpll_update_state(struct ice_pf *pf, struct ice_dpll *d, bool init) dev_err(ice_pf_to_dev(pf),"update dpll=%d state failed, ret=%d %s\n" , d->dpll_idx, ret, - ice_aq_str(pf->hw.adminq.sq_last_status)); + libie_aq_str(pf->hw.adminq.sq_last_status));return ret; }drivers/net/ethernet/intel/ice/ice_dpll.c +1
-1if (init) {@@ -3205,7 +3205,7 @@ static int ice_dpll_init_info(struct ice_pf *pf, bool cgu)if (ret) {dev_err (ice_pf_to_dev (pf),"err:%d %s failed to read cgu abilities\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status));return ret; }drivers/net/ethernet/intel/ice/ice_ethtool.c +6
-6@@ -878,7 +878,7 @@ ice_get_eeprom(struct net_device *netdev, structethtool_eeprom *eeprom, ret =ice_acquire_nvm (hw,ICE_RES_READ );if (ret) {dev_err (dev,"ice_acquire_nvm failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status)); goto out; }@@ -886,7 +886,7 @@ ice_get_eeprom(struct net_device *netdev, structethtool_eeprom *eeprom, false);if (ret) {dev_err (dev,"ice_read_flat_nvm failed, err %d aq_err %s\n" , - ret,ice_aq_str (hw->adminq.sq_last_status)); + ret,libie_aq_str (hw->adminq.sq_last_status)); goto release; }@@ -3613,15 +3613,15 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)if (aq_failures &ICE_SET_FC_AQ_FAIL_GET ) { netdev_info(netdev, "Set fc failed on the get_phy_capabilities call with err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); err = -EAGAIN ; }else if (aq_failures &ICE_SET_FC_AQ_FAIL_SET ) { netdev_info(netdev, "Set fc failed on the set_phy_config call with err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); err = -EAGAIN ; }else if (aq_failures &ICE_SET_FC_AQ_FAIL_UPDATE ) { netdev_info(netdev, "Set fc failed on the get_link_info call with err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); err = -EAGAIN ; }@@ -3952,7 +3952,7 @@ static int ice_vsi_set_dflt_rss_lut(struct ice_vsi *vsi, int req_rss_size) err =ice_set_rss_lut (vsi, lut, vsi->rss_table_size);if (err)dev_err (dev,"Cannot set RSS lut, err %d aq_err %s\n" , err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));kfree (lut);drivers/net/ethernet/intel/ice/ice_ethtool.c +0
-0return err;drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1@@ -68,7 +68,7 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length) if (status) { dev_err(dev, "Failed to send record package data to firmware, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to record packagedata to firmware");
drivers/net/ethernet/intel/ice/ice_fw_update.c +0
-0return -EIO ; }@@ -257,7 +257,7 @@ ice_send_component_table(struct pldmfw *context,struct
pldmfw_component*compondrivers/net/ethernet/intel/ice/ice_fw_update.c +0
-0if (status) { dev_err(dev, "Failed to transfer component table to firmware,err %d
aq_err%s\n",drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1- status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to transfercomponent table to firmware");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return -EIO ; }@@ -314,7 +314,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset, if (err) { dev_err(dev, "Failed to flash module 0x%02x with block of size %u at offset %u, err %d aq_err %s\n", module, block_size, offset, err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to program flashmodule");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return -EIO ; }@@ -358,7 +358,7 @@ int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset, if (completion_retval) { dev_err(dev, "Firmware failed to flash module 0x%02x with block of size %u at offset %u, err %s\n", module, block_size, offset, -ice_aq_str ((enum libie_aq_err )completion_retval)); +libie_aq_str ((enum libie_aq_err )completion_retval)); NL_SET_ERR_MSG_MOD(extack, "Firmware failed to programflash module");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return -EIO ; }@@ -506,7 +506,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, if (err) { dev_err(dev, "Failed to erase %s (module 0x%02x), err %d aq_err %s\n", component, module, err, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to erase flashmodule");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1err = -EIO ; goto out_notify_devlink;@@ -536,7 +536,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, if (completion_retval) { dev_err(dev, "Firmware failed to erase %s (module 0x02%x), aq_err %s\n", component, module, -ice_aq_str ((enum libie_aq_err )completion_retval)); +libie_aq_str ((enum libie_aq_err )completion_retval)); NL_SET_ERR_MSG_MOD(extack, "Firmware failed to eraseflash");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1err = -EIO ; goto out_notify_devlink;@@ -583,7 +583,7 @@ ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, err =ice_nvm_write_activate (hw, activate_flags, &response_flags);if (err) { dev_err(dev, "Failed to switch active flash banks, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to switch active flashbanks");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return -EIO ; }@@ -615,7 +615,7 @@ ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, completion_retval =le16_to_cpu (task.event.desc.retval);if (completion_retval) { dev_err(dev, "Firmware failed to switch active flash banks aq_err %s\n", - ice_aq_str((enum libie_aq_err )completion_retval)); + libie_aq_str((enum libie_aq_err )completion_retval)); NL_SET_ERR_MSG_MOD(extack, "Firmware failed to switchactive flash banks");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return -EIO ; }@@ -953,7 +953,7 @@ ice_cancel_pending_update(struct ice_pf *pf, constchar *component, err =ice_acquire_nvm (hw,ICE_RES_WRITE );if (err) { dev_err(dev, "Failed to acquire device flash lock, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to acquire deviceflash lock");
drivers/net/ethernet/intel/ice/ice_fw_update.c +1
-1return err; }@@ -1046,7 +1046,7 @@ int ice_devlink_flash_update(struct devlink *devlink, err =ice_acquire_nvm (hw,ICE_RES_WRITE );if (err) { dev_err(dev, "Failed to acquire device flash lock, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); NL_SET_ERR_MSG_MOD(extack, "Failed to acquire deviceflash lock");
drivers/net/ethernet/intel/ice/ice_fw_update.c +0
-0return err; }drivers/net/ethernet/intel/ice/ice_lib.c +2
-2@@ -3787,11 +3787,11 @@ int ice_set_link(struct ice_vsi *vsi, bool ena)if (hw->adminq.sq_last_status ==LIBIE_AQ_RC_EMODE ) dev_dbg(dev, "can't set link to %s, err %d aq_err %s. not fatal, continuing\n", (ena ?"ON" :"OFF" ), status, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status)); }else if (status) {dev_err (dev,"can't set link to %s, err %d aq_err %s\n" , (ena ?"ON" :"OFF" ), status, -ice_aq_str (hw->adminq.sq_last_status)); +libie_aq_str (hw->adminq.sq_last_status));return status; }drivers/net/ethernet/intel/ice/ice_main.c +2
-1@@ -38,6 +38,7 @@ static const char ice_copyright[] = "Copyright (c) 2018, Intel Corporation.";MODULE_DESCRIPTION (DRV_SUMMARY );MODULE_IMPORT_NS ("LIBIE" ); +MODULE_IMPORT_NS ("LIBIE_ADMINQ" );MODULE_LICENSE ("GPL v2" );MODULE_FIRMWARE (ICE_DDP_PKG_FILE );@@ -1119,7 +1120,7 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up, if (status) dev_dbg(dev, "Failed to update link status on port %d, err %d aq_err %s\n", pi->lport, status, - ice_aq_str(pi->hw->adminq.sq_last_status)); + libie_aq_str(pi->hw->adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +1
-1ice_check_link_cfg_err (pf, pi->phy.link_info.link_cfg_err);@@ -4224,7 +4225,7 @@ static void ice_set_safe_mode_vlan_cfg(struct ice_pf *pf) status =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (status) { dev_err(ice_pf_to_dev(vsi->back), "Failed to update VSI for safe mode VLANs, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status)); }else {drivers/net/ethernet/intel/ice/ice_main.c +1
-0vsi->info.sec_flags = ctxt->info.sec_flags; vsi->info.sw_flags2 = ctxt->info.sw_flags2; @@ -5439,7 +5440,7 @@ static void ice_setup_mc_magic_wake(struct ice_pf *pf) status =ice_aq_manage_mac_write (hw, mac_addr, flags,NULL );if (status) dev_err(dev, "Failed to enable Multicast Magic Packet wake,err %d
aq_err%s\n",drivers/net/ethernet/intel/ice/ice_main.c +2
-51- status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status)); }/** @@ -7953,56 +7954,6 @@ static int ice_eth_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) } } -/** -* ice_aq_str - convert AQ err code to a string -* @aq_err: the AQ error code to convert -*/ -const char *ice_aq_str(enum libie_aq_err aq_err) -{ -switch (aq_err) { -case LIBIE_AQ_RC_OK : -return "OK" ; -case LIBIE_AQ_RC_EPERM : -return "ICE_AQ_RC_EPERM" ; -case LIBIE_AQ_RC_ENOENT : -return "ICE_AQ_RC_ENOENT" ; -case LIBIE_AQ_RC_ENOMEM : -return "ICE_AQ_RC_ENOMEM" ; -case LIBIE_AQ_RC_EBUSY : -return "ICE_AQ_RC_EBUSY" ; -case LIBIE_AQ_RC_EEXIST : -return "ICE_AQ_RC_EEXIST" ; -case LIBIE_AQ_RC_EINVAL : -return "ICE_AQ_RC_EINVAL" ; -case LIBIE_AQ_RC_ENOSPC : -return "ICE_AQ_RC_ENOSPC" ; -case LIBIE_AQ_RC_ENOSYS : -return "ICE_AQ_RC_ENOSYS" ; -case LIBIE_AQ_RC_EMODE : -return "ICE_AQ_RC_EMODE" ; -case LIBIE_AQ_RC_ENOSEC : -return "ICE_AQ_RC_ENOSEC" ; -case LIBIE_AQ_RC_EBADSIG : -return "ICE_AQ_RC_EBADSIG" ; -case LIBIE_AQ_RC_ESVN : -return "ICE_AQ_RC_ESVN" ; -case LIBIE_AQ_RC_EBADMAN : -return "ICE_AQ_RC_EBADMAN" ; -case LIBIE_AQ_RC_EBADBUF : -return "ICE_AQ_RC_EBADBUF" ; -case LIBIE_AQ_RC_ESRCH : -return "ICE_AQ_RC_ESRCH" ; -case LIBIE_AQ_RC_EIO : -return "ICE_AQ_RC_EIO" ; -case LIBIE_AQ_RC_EAGAIN : -return "ICE_AQ_RC_EAGAIN" ; -case LIBIE_AQ_RC_EACCES : -return "ICE_AQ_RC_EACCES" ; - } - -return "ICE_AQ_RC_UNKNOWN" ; -} -/** * ice_set_rss_lut - Set RSS LUT * @vsi: Pointer to VSI structure @@ -8028,7 +7979,7 @@ int ice_set_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size) status =ice_aq_set_rss_lut (hw, ¶ms);if (status) dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS lut, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +1
-1return status; }@@ -8051,7 +8002,7 @@ int ice_set_rss_key(struct ice_vsi *vsi, u8 *seed) status =ice_aq_set_rss_key (hw, vsi->idx, (struct ice_aqc_get_set_rss_keys *)seed);if (status) dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS key, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +1
-1return status; }@@ -8081,7 +8032,7 @@ int ice_get_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size) status =ice_aq_get_rss_lut (hw, ¶ms);if (status) dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS lut, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +1
-1return status; }@@ -8104,7 +8055,7 @@ int ice_get_rss_key(struct ice_vsi *vsi, u8 *seed) status =ice_aq_get_rss_key (hw, vsi->idx, (struct ice_aqc_get_set_rss_keys *)seed);if (status) dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS key, err %d aq_err %s\n", - status, ice_aq_str(hw->adminq.sq_last_status)); + status, libie_aq_str(hw->adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +1
-1return status; }@@ -8221,7 +8172,7 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode) ret =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (ret) { dev_err(ice_pf_to_dev(vsi->back), "update VSI for bridge mode failed, bmode = %d err %d aq_err %s\n", - bmode, ret, ice_aq_str(hw->adminq.sq_last_status)); + bmode, ret, libie_aq_str(hw- >adminq.sq_last_status));drivers/net/ethernet/intel/ice/ice_main.c +0
-0goto out; } /* Update sw flags for book keeping */ @@ -8289,7 +8240,7 @@ice_bridge_setlink(struct
net_device*dev, struct nlmsghdr *nlh,drivers/net/ethernet/intel/ice/ice_main.c +0
-0if (err) { netdev_err(dev, "switch rule update failed, mode = %derr %d
aq_err%s\n",drivers/net/ethernet/intel/ice/ice_main.c +1
-1mode, err, - ice_aq_str(hw->adminq.sq_last_status)); + libie_aq_str(hw->adminq.sq_last_status));/* revert hw->evb_veb */ hw->evb_veb = (pf_sw->bridge_mode ==
BRIDGE_MODE_VEB);drivers/net/ethernet/intel/ice/ice_main.c +0
-0return err;drivers/net/ethernet/intel/ice/ice_virtchnl.c +1
-1@@ -307,7 +307,7 @@ ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode, if (aq_ret && pf->hw.mailboxq.sq_last_status != LIBIE_AQ_RC_ENOSYS) { dev_info(dev, "Unable to send the message to VF %d ret %d aq_err %s\n", vf->vf_id, aq_ret, -ice_aq_str (pf->hw.mailboxq.sq_last_status)); +libie_aq_str (pf->hw.mailboxq.sq_last_status));drivers/net/ethernet/intel/ice/ice_virtchnl.c +1
-1return -EIO ; }@@ -852,7 +852,7 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add) status =ice_update_vsi (hw, vsi->idx, ctx,NULL );if (status) { dev_err(dev, "update VSI for RSS failed, err %d aq_err %s\n", - status, ice_aq_str(hw- >adminq.sq_last_status)); + status, libie_aq_str(hw-Quoted 1 line
adminq.sq_last_status));
drivers/net/ethernet/intel/ice/ice_virtchnl.c +0
-0v_ret =VIRTCHNL_STATUS_ERR_PARAM ; }else { vsi->info.q_opt_rss = ctx->info.q_opt_rss; diff --git
a/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.cb/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.cindex5291f2888ef8..ada78f83b3ac100644drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1@@ -113,7 +113,7 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) { dev_err(ice_pf_to_dev(vsi->back), "update VSI for VLAN insert failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); goto out;drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1}@@ -169,7 +169,7 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) { dev_err(ice_pf_to_dev(vsi->back), "update VSI for VLAN strip failed, ena = %d err %d aq_err %s\n", - ena, err, ice_aq_str(hw->adminq.sq_last_status)); + ena, err, libie_aq_str(hw->adminq.sq_last_status)); goto out;drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1}@@ -258,7 +258,7 @@ static int __ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, u16 pvid_info) ret =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (ret) { dev_info(ice_hw_to_dev(hw), "update VSI for port VLAN failed, err %d aq_err %s\n", - ret, ice_aq_str(hw->adminq.sq_last_status)); + ret, libie_aq_str(hw->adminq.sq_last_status)); goto out;drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1}@@ -306,7 +306,7 @@ int ice_vsi_clear_inner_port_vlan(struct ice_vsi *vsi) ret =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (ret) dev_err(ice_hw_to_dev(hw), "update VSI for port VLAN failed, err %d aq_err %s\n", - ret, ice_aq_str(hw->adminq.sq_last_status)); + ret, libie_aq_str(hw->adminq.sq_last_status));kfree (ctxt);drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1return ret;@@ -353,7 +353,7 @@ static int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena)if (status) { netdev_err(vsi->netdev, "%sabling VLAN pruning on VSI handle: %d, VSI HW ID: %d failed, err = %d, aq_err = %s\n", ena ? "En" : "Dis", vsi->idx, vsi->vsi_num, status, -ice_aq_str (pf->hw.adminq.sq_last_status)); +libie_aq_str (pf->hw.adminq.sq_last_status)); goto err_out;drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +1
-1}@@ -497,7 +497,7 @@ int ice_vsi_ena_outer_stripping(struct ice_vsi *vsi, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) dev_err(ice_pf_to_dev(vsi->back), "update VSI for enabling outer VLAN stripping failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));else drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +2
-2vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;@@ -544,7 +544,7 @@ int ice_vsi_dis_outer_stripping(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) dev_err(ice_pf_to_dev(vsi->back), "update VSI for disabling outer VLAN stripping failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;@@ -604,7 +604,7 @@ int ice_vsi_ena_outer_insertion(struct ice_vsi *vsi, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) dev_err(ice_pf_to_dev(vsi->back), "update VSI for enabling outer VLAN insertion failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));else drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +2
-2vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;@@ -654,7 +654,7 @@ int ice_vsi_dis_outer_insertion(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) dev_err(ice_pf_to_dev(vsi->back), "update VSI for disabling outer VLAN insertion failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));else vsi->info.outer_vlan_flags = ctxt->info.outer_vlan_flags;@@ -720,7 +720,7 @@ __ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, u16 vlan_info, u16 tpid) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) { dev_err(ice_pf_to_dev(vsi->back), "update VSI for setting outer port based VLAN failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); }else {
vsi->info.port_based_outer_vlan= ctxt-Quoted 1 line
info.port_based_outer_vlan;
vsi->info.outer_vlan_flags=ctxt->info.outer_vlan_flags; @@ -
782,7 +782,7 @@ intice_vsi_clear_outer_port_vlan(struct ice_vsi *vsi)drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +0
-0err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) dev_err(ice_pf_to_dev(vsi->back), "update VSI for clearingouter port based VLAN failed, err %d
aq_err%s\n",drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c +2
-2- err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status));kfree (ctxt);return err;@@ -830,7 +830,7 @@ int ice_vsi_clear_port_vlan(struct ice_vsi *vsi) err =ice_update_vsi (hw, vsi->idx, ctxt,NULL );if (err) { dev_err(ice_pf_to_dev(vsi->back), "update VSI for clearing port based VLAN failed, err %d aq_err %s\n", - err, ice_aq_str(hw->adminq.sq_last_status)); + err, libie_aq_str(hw->adminq.sq_last_status)); }else { vsi->info.port_based_outer_vlan =
ctxt->info.port_based_outer_vlan;
--
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 6/8] ice: use libie_aq_str
In reply to Michal SwiatkowskiQuoted 15 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 25 April 2025 11:38
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 6/8] ice: uselibie_aq_strSimple:
s/ice_aq_str/libie_aq_strAdd
libie_aminqmodule in iceKconfig.Reviewed-by Przemek Kitszel <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
Quoted 12 lines
drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/devlink/devlink.c | 10 +-- .../net/ethernet/intel/ice/devlink/health.c | 2 +- drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 ++-- .../net/ethernet/intel/ice/ice_fw_update.c | 20 +++--- drivers/net/ethernet/intel/ice/ice_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_main.c | 69 +++---------------- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 4 +- .../net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 24 +++---- 11 files changed, 59 insertions(+), 108 deletions(-)
PATCH v3 7/8 iavf: use libie_aq_str
In reply to Michal SwiatkowskiThere is no need to store the err string in hw->err_str. Simplify it and use common helper. hw->err_str is still used for other purpouse.
It should be marked that previously for unknown error the numeric value was passed as a string. Now the "LIBIE_AQ_RC_UNKNOWN" is used for such cases.
Add libie_aminq module in iavf Kconfig.
--- drivers/net/ethernet/intel/Kconfig | 1 + .../net/ethernet/intel/iavf/iavf_prototype.h | 1 - drivers/net/ethernet/intel/iavf/iavf_common.c | 52 ------------------- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 5 files changed, 5 insertions(+), 56 deletions(-)
drivers/net/ethernet/intel/Kconfig +1 -0
@@ -260,6 +260,7 @@ config I40E_DCB config IAVF tristate select LIBIE + select LIBIE_ADMINQ select NET_SHAPER config I40EVF
drivers/net/ethernet/intel/iavf/iavf_prototype.h +0 -1
@@ -34,7 +34,6 @@ void iavf_debug_aq(struct iavf_hw *hw, enum iavf_debug_mask mask,bool iavf_check_asq_alive (struct iavf_hw *hw);enum iavf_status iavf_aq_queue_shutdown (struct iavf_hw *hw,bool unloading); -const char *iavf_aq_str (struct iavf_hw *hw,enum libie_aq_err aq_err);const char *iavf_stat_str (struct iavf_hw *hw,enum iavf_status stat_err); enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid,
drivers/net/ethernet/intel/iavf/iavf_common.c +0 -52
58 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_main.c +3 -2
@@ -50,6 +50,7 @@ MODULE_ALIAS("i40evf");MODULE_DESCRIPTION ("Intel(R) Ethernet Adaptive Virtual Function Network Driver" );MODULE_IMPORT_NS ("LIBETH" );MODULE_IMPORT_NS ("LIBIE" ); +MODULE_IMPORT_NS ("LIBIE_ADMINQ" );MODULE_LICENSE ("GPL v2" );static const struct net_device_ops iavf_netdev_ops;
@@ -1734,7 +1735,7 @@ static int iavf_config_rss_aq(struct iavf_adapter *adapter)if (status) {dev_err (&adapter->pdev->dev,"Cannot set RSS key, err %s aq_err %s\n" ,iavf_stat_str (hw, status), -iavf_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status));return iavf_status_to_errno (status); }
@@ -1744,7 +1745,7 @@ static int iavf_config_rss_aq(struct iavf_adapter *adapter)if (status) {dev_err (&adapter->pdev->dev,"Cannot set RSS lut, err %s aq_err %s\n" ,iavf_stat_str (hw, status), -iavf_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status));return iavf_status_to_errno (status); }
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +1 -1
@@ -29,7 +29,7 @@ static int iavf_send_pf_msg(struct iavf_adapter *adapter,if (status)dev_dbg (&adapter->pdev->dev,"Unable to send opcode %d to PF, status %s, aq_err %s\n" , op,iavf_stat_str (hw, status), -iavf_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status));return iavf_status_to_errno (status); }
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 7/8] iavf: use libie_aq_str
drivers/net/ethernet/intel/Kconfig config I40E_DCB
Quoted 39 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Friday, April 25, 2025 8:08 AM
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 7/8] iavf: uselibie_aq_strThere is no need to store the err string in
hw->err_str. Simplify it and use common helper.hw->err_stris still used for other purpouse.It should be marked that previously for unknown error the numeric value was passed as a string. Now the "
LIBIE_AQ_RC_UNKNOWN" is used for such cases.Add
libie_aminqmodule in iavfKconfig.Reviewed-by Przemek Kitszel <[email protected]>Reviewed-by Larysa Zaremba <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>--- drivers/net/ethernet/intel/Kconfig | 1 + .../net/ethernet/intel/iavf/iavf_prototype.h | 1 - drivers/net/ethernet/intel/iavf/iavf_common.c | 52 ------------------- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 5 files changed, 5 insertions(+), 56 deletions(-)drivers/net/ethernet/intel/Kconfig +0
-0@@ -260,6 +260,7 @@ config I40E_DCB
Loktionov, Aleksandr
Reviewed-byRE: [Intel-wired-lan] [iwl-next v3 7/8] iavf: use libie_aq_str
Quoted 55 lines
-----Original Message-----
From: Romanowski, Rafal <[email protected]>
Sent: Thursday, July 24, 2025 9:12 AM
To: Michal Swiatkowski <[email protected]>; intel- [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: RE: [Intel-wired-lan] [iwl-next v3 7/8] iavf: uselibie_aq_strQuoted 15 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Friday, April 25, 2025 8:08 AM
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 7/8] iavf: uselibie_aq_strQuoted 5 lines
There is no need to store the err string in
hw->err_str. Simplify it and use common helper.hw->err_stris still used for other purpouse.It should be marked that previously for unknown error the numeric value was passed as a string. Now the "
LIBIE_AQ_RC_UNKNOWN" is usedfor such cases.
Quoted 6 lines
Add
libie_aminqmodule in iavfKconfig.Reviewed-by Przemek Kitszel <[email protected]>Reviewed-by Larysa Zaremba <[email protected]>Signed-off-by Michal SwiatkowskiQuoted 4 lines
--- drivers/net/ethernet/intel/Kconfig | 1 + .../net/ethernet/intel/iavf/iavf_prototype.h | 1 -
drivers/net/ethernet/intel/iavf/iavf_common.c| 52 -------------------
Quoted 4 lines
drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 5 files changed, 5 insertions(+), 56 deletions(-)
Quoted 10 lines
drivers/net/ethernet/intel/Kconfig config I40E_DCB
Quoted 6 lines
drivers/net/ethernet/intel/Kconfig +0
-0@@ -260,6 +260,7 @@ config I40E_DCBTested-by Rafal Romanowski <[email protected]>
PATCH v3 8/8 i40e: use libie_aq_str
In reply to Michal SwiatkowskiThere is no need to store the err string in hw->err_str. Simplify it and use common helper. hw->err_str is still used for other purpouse.
It should be marked that previously for unknown error the numeric value was passed as a string. Now the "LIBIE_AQ_RC_UNKNOWN" is used for such cases.
Add libie_aminq module in i40e Kconfig.
--- drivers/net/ethernet/intel/Kconfig | 1 + .../net/ethernet/intel/i40e/i40e_prototype.h | 1 - drivers/net/ethernet/intel/i40e/i40e_client.c | 7 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 52 ----- drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 8 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 22 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 209 +++++++----------- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 +- .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 27 +-- 9 files changed, 105 insertions(+), 224 deletions(-)
drivers/net/ethernet/intel/Kconfig +1 -0
@@ -231,6 +231,7 @@ config I40E depends on PCI select AUXILIARY_BUS select LIBIE + select LIBIE_ADMINQ select NET_DEVLINK help This driver supports Intel(R) Ethernet Controller XL710 Family of
drivers/net/ethernet/intel/i40e/i40e_prototype.h +0 -1
@@ -46,7 +46,6 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,bool i40e_check_asq_alive (struct i40e_hw *hw);int i40e_aq_queue_shutdown (struct i40e_hw *hw,bool unloading); -const char *i40e_aq_str (struct i40e_hw *hw,enum libie_aq_err aq_err);int i40e_aq_get_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size);
drivers/net/ethernet/intel/i40e/i40e_client.c +2 -5
@@ -682,9 +682,7 @@ static int i40e_client_update_vsi_ctxt(struct i40e_info *ldev,if (err) {dev_info (&pf->pdev->dev,"couldn't get PF vsi config, err %pe aq_err %s\n" , -ERR_PTR (err), -i40e_aq_str (&pf->hw, - pf->hw.aq.asq_last_status)); +ERR_PTR (err),libie_aq_str (pf->hw.aq.asq_last_status));return -ENOENT ; }
@@ -711,8 +709,7 @@ static int i40e_client_update_vsi_ctxt(struct i40e_info *ldev,dev_info (&pf->pdev->dev,"update VSI ctxt for PE failed, err %pe aq_err %s\n" ,ERR_PTR (err), -i40e_aq_str (&pf->hw, - pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status)); } }return err;
drivers/net/ethernet/intel/i40e/i40e_common.c +0 -52
58 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c +4 -4
@@ -136,7 +136,7 @@ static int i40e_dcbnl_ieee_setets(struct net_device *netdev,dev_info (&pf->pdev->dev,"Failed setting DCB ETS configuration err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));return -EINVAL ; }
@@ -175,7 +175,7 @@ static int i40e_dcbnl_ieee_setpfc(struct net_device *netdev,dev_info (&pf->pdev->dev,"Failed setting DCB PFC configuration err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));return -EINVAL ; }
@@ -226,7 +226,7 @@ static int i40e_dcbnl_ieee_setapp(struct net_device *netdev,dev_info (&pf->pdev->dev,"Failed setting DCB configuration err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));return -EINVAL ; }
@@ -291,7 +291,7 @@ static int i40e_dcbnl_ieee_delapp(struct net_device *netdev,dev_info (&pf->pdev->dev,"Failed setting DCB configuration err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));return -EINVAL ; }
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +10 -12
@@ -1461,7 +1461,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,netdev_info (netdev,"Set phy config failed, err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); err = -EAGAIN ; goto done; }
@@ -1471,7 +1471,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,netdev_dbg (netdev,"Updating link info failed with err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); }else {netdev_info (netdev,"Nothing changed, exiting without setting anything.\n" );
@@ -1519,7 +1519,7 @@ static int i40e_set_fec_cfg(struct net_device *netdev, u8 fec_cfg)netdev_info (netdev,"Set phy config failed, err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); err = -EAGAIN ; goto done; }
@@ -1533,7 +1533,7 @@ static int i40e_set_fec_cfg(struct net_device *netdev, u8 fec_cfg)netdev_dbg (netdev,"Updating link info failed with err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); } done:
@@ -1640,7 +1640,7 @@ static int i40e_nway_reset(struct net_device *netdev)if (ret) {netdev_info (netdev,"link restart failed, err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status));return -EIO ; }
@@ -1757,19 +1757,19 @@ static int i40e_set_pauseparam(struct net_device *netdev,if (aq_failures &I40E_SET_FC_AQ_FAIL_GET ) {netdev_info (netdev,"Set fc failed on the get_phy_capabilities call with err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); err = -EAGAIN ; }if (aq_failures &I40E_SET_FC_AQ_FAIL_SET ) {netdev_info (netdev,"Set fc failed on the set_phy_config call with err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); err = -EAGAIN ; }if (aq_failures &I40E_SET_FC_AQ_FAIL_UPDATE ) {netdev_info (netdev,"Set fc failed on the get_link_info call with err %pe aq_err %s\n" ,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); err = -EAGAIN ; }
@@ -5377,8 +5377,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)dev_info (&pf->pdev->dev,"couldn't set switch config bits, err %pe aq_err %s\n" ,ERR_PTR (ret), -i40e_aq_str (&pf->hw, - pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));/* not a fatal problem, just keep going */ } }
@@ -5457,8 +5456,7 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)dev_warn (&pf->pdev->dev,"Starting FW LLDP agent failed: error: %pe, %s\n" ,ERR_PTR (status), -i40e_aq_str (&pf->hw, - adq_err)); +libie_aq_str (adq_err));return -EINVAL ; } }
drivers/net/ethernet/intel/i40e/i40e_main.c +76 -133
661 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_nvm.c +1 -1
@@ -1053,7 +1053,7 @@ static int i40e_nvmupd_exec_aq(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_NVM ,"%s err %pe aq_err %s\n" , __func__,ERR_PTR (status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +libie_aq_str (hw->aq.asq_last_status)); *perrno =i40e_aq_rc_to_posix (status, hw->aq.asq_last_status);return status; }
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +11 -16
@@ -1289,9 +1289,8 @@ i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,dev_err (&pf->pdev->dev,"VF %d failed to set multicast promiscuous mode err %pe aq_err %s\n" , - vf->vf_id, -ERR_PTR (aq_ret), -i40e_aq_str (&pf->hw, aq_err)); + vf->vf_id,ERR_PTR (aq_ret), +libie_aq_str (aq_err));return aq_ret; }
@@ -1305,9 +1304,8 @@ i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,dev_err (&pf->pdev->dev,"VF %d failed to set unicast promiscuous mode err %pe aq_err %s\n" , - vf->vf_id, -ERR_PTR (aq_ret), -i40e_aq_str (&pf->hw, aq_err)); + vf->vf_id,ERR_PTR (aq_ret), +libie_aq_str (aq_err)); }return aq_ret;
@@ -1322,9 +1320,8 @@ i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,dev_err (&pf->pdev->dev,"VF %d failed to set multicast promiscuous mode err %pe aq_err %s\n" , - vf->vf_id, -ERR_PTR (aq_ret), -i40e_aq_str (&pf->hw, aq_err)); + vf->vf_id,ERR_PTR (aq_ret), +libie_aq_str (aq_err));if (!aq_tmp) aq_tmp = aq_ret;
@@ -1338,9 +1335,8 @@ i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,dev_err (&pf->pdev->dev,"VF %d failed to set unicast promiscuous mode err %pe aq_err %s\n" , - vf->vf_id, -ERR_PTR (aq_ret), -i40e_aq_str (&pf->hw, aq_err)); + vf->vf_id,ERR_PTR (aq_ret), +libie_aq_str (aq_err));if (!aq_tmp) aq_tmp = aq_ret;
@@ -3746,8 +3742,7 @@ static void i40e_del_all_cloud_filters(struct i40e_vf *vf)dev_err (&pf->pdev->dev,"VF %d: Failed to delete cloud filter, err %pe aq_err %s\n" , vf->vf_id,ERR_PTR (ret), -i40e_aq_str (&pf->hw, - pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status));hlist_del (&cfilter->cloud_node);kfree (cfilter);
@@ -3849,7 +3844,7 @@ static int i40e_vc_del_cloud_filter(struct i40e_vf *vf, u8 *msg)dev_err (&pf->pdev->dev,"VF %d: Failed to delete cloud filter, err %pe aq_err %s\n" , vf->vf_id,ERR_PTR (ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status)); goto err; }
@@ -3985,7 +3980,7 @@ static int i40e_vc_add_cloud_filter(struct i40e_vf *vf, u8 *msg)dev_err (&pf->pdev->dev,"VF %d: Failed to add cloud filter, err %pe aq_err %s\n" , vf->vf_id,ERR_PTR (aq_ret), -i40e_aq_str (&pf->hw, pf->hw.aq.asq_last_status)); +libie_aq_str (pf->hw.aq.asq_last_status)); goto err_free; }
Signature · 1 line
2.42.0
RE: [Intel-wired-lan] [iwl-next v3 8/8] i40e: use libie_aq_str
Quoted 17 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 25 April 2025 11:38
To: [email protected]
Cc: [email protected]; Lobakin, Aleksander <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Kwapulinski, Piotr <[email protected]>; Loktionov, Aleksandr <[email protected]>; Jagielski, Jedrzej <[email protected]>; Zaremba, Larysa <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [iwl-next v3 8/8] i40e: uselibie_aq_strThere is no need to store the err string in
hw->err_str. Simplify it and use common helper.hw->err_stris still used for other purpouse.It should be marked that previously for unknown error the numeric value was passed as a string. Now the "
LIBIE_AQ_RC_UNKNOWN" is used for such cases.Add
libie_aminqmodule in i40eKconfig.Reviewed-by Przemek Kitszel <[email protected]>Reviewed-by Larysa Zaremba <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
Quoted 11 lines
drivers/net/ethernet/intel/Kconfig | 1 + .../net/ethernet/intel/i40e/i40e_prototype.h | 1 - drivers/net/ethernet/intel/i40e/i40e_client.c | 7 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 52 ----- drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 8 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 22 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 209 +++++++----------- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 +- .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 27 +-- 9 files changed, 105 insertions(+), 224 deletions(-)