i40e base code updates
cover i40e base code updates
Small base code update for i40e driver.
Oleg Akhrem (1):
net/i40e/base: add get wake packet AQ command
Szymon T Cudzilo (1):
net/i40e/base: avoid implicit conversions
drivers/net/intel/i40e/base/i40e_adminq_cmd.h | 12 ++++++++++++ drivers/net/intel/i40e/base/i40e_nvm.c | 16 ++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/2 net/i40e/base: add get wake packet AQ command
From: Oleg Akhrem <[email protected]>
Add definitions for the Get Wake Packet Admin Queue command (opcode 0x0122), which retrieves the firmware-saved packet that caused a Wake Up event.
Define the command opcode, the command descriptor and the maximum response buffer size.
--- drivers/net/intel/i40e/base/i40e_adminq_cmd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/intel/i40e/base/i40e_adminq_cmd.h +12 -0
@@ -138,6 +138,7 @@ enum i40e_admin_queue_opc {/* WoL commands */ i40e_aqc_opc_set_wol_filter =0x0120 , i40e_aqc_opc_get_wake_reason =0x0121 , + i40e_aqc_opc_get_wake_packet =0x0122 , i40e_aqc_opc_clear_all_wol_filters = 0x025E,/* internal switch commands */
@@ -629,6 +630,17 @@ struct i40e_aqc_get_wake_reason_completion {I40E_CHECK_CMD_LENGTH (i40e_aqc_get_wake_reason_completion); +/* Get Wake Packet (0x0122) */ +#define I40E_AQC_GET_WAKE_PACKET_BUFFER_SIZE 0x600 + +struct i40e_aqc_get_wake_packet { +u8 reserved[8 ]; +__le32 address_high; +__le32 address_low; +}; + +I40E_CHECK_CMD_LENGTH (i40e_aqc_get_wake_packet); +/* Switch configuration commands (0x02xx) */ /* Used by many indirect commands that only pass an seid and a buffer in the
Signature · 1 line
2.52.0
PATCH 2/2 net/i40e/base: avoid implicit conversions
In reply to Anatoly BurakovFrom: Szymon T Cudzilo <[email protected]>
Avoid doing implicit conversion as reported by static analysis tools.
--- drivers/net/intel/i40e/base/i40e_nvm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/intel/i40e/base/i40e_nvm.c +8 -8
@@ -1414,8 +1414,8 @@ STATIC enum i40e_status_code i40e_nvmupd_state_writing(struct i40e_hw *hw,*/ if (status && (hw->aq.asq_last_status ==I40E_AQ_RC_EBUSY ) && !retry_attempt) { +enum i40e_admin_queue_err old_asq_status = hw->aq.asq_last_status;enum i40e_status_code old_status = status; -u32 old_asq_status = hw->aq.asq_last_status;u32 gtime; gtime =rd32 (hw,I40E_GLVFGEN_TIMER );
@@ -1656,7 +1656,7 @@ STATIC enum i40e_status_code i40e_nvmupd_exec_aq(struct i40e_hw *hw, }if (hw->nvm_buff.va) { - buff = hw->nvm_buff.va; + buff = (u8 *)hw->nvm_buff.va;i40e_memcpy (buff, &bytes[aq_desc_len], aq_data_len,I40E_NONDMA_TO_NONDMA ); }
@@ -1667,19 +1667,19 @@ STATIC enum i40e_status_code i40e_nvmupd_exec_aq(struct i40e_hw *hw,/* and away we go! */ status =i40e_asq_send_command (hw, aq_desc, buff, - buff_size, &cmd_details); + (u16 )buff_size, &cmd_details);if (status) {i40e_debug (hw,I40E_DEBUG_NVM , -"i40e_nvmupd_exec_aq err %s aq_err %s\n" , -i40e_stat_str (hw, status), -i40e_aq_str (hw, hw->aq.asq_last_status)); +"i40e_nvmupd_exec_aq err %d aq_err %d\n" , + status, + hw->aq.asq_last_status); *perrno =i40e_aq_rc_to_posix (status, hw->aq.asq_last_status);return status; }/* should we wait for a followup event? */ if (cmd->offset) { - hw->nvm_wait_opcode = cmd->offset; + hw->nvm_wait_opcode = (u16 )cmd->offset; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; }
@@ -1739,7 +1739,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw, bytes += len; remainder -= len; - buff = hw->nvm_buff.va; + buff = (u8 *)hw->nvm_buff.va; }else { buff = (u8 *)hw->nvm_buff.va + (cmd->offset - aq_desc_len); }
Signature · 1 line
2.52.0
Quoted 5 lines · Anatoly Burakov
Small base code update for i40e driver.
Oleg Akhrem (1):
net/i40e/base: add get wake packet AQ command
Quoted 7 lines
Szymon T Cudzilo (1):
net/i40e/base: avoid implicit conversionsdrivers/net/intel/i40e/base/i40e_adminq_cmd.h | 12 ++++++++++++ drivers/net/intel/i40e/base/i40e_nvm.c | 16 ++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-)
Series applied to dpdk-next-net-intel.
Thanks.