From: Guinan Sun <guinanx.sun@intel.com> To: dev@dpdk.org Cc: Beilei Xing <beilei.xing@intel.com>, Qi Zhang <qi.z.zhang@intel.com>, Qiming Yang <qiming.yang@intel.com>, Guinan Sun <guinanx.sun@intel.com>, Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com> Subject: [dpdk-dev] [PATCH 5/9] net/i40e/base: add support for minimum rollback revision Date: Sat, 5 Sep 2020 02:49:34 +0000 Message-ID: <20200905024938.14609-6-guinanx.sun@intel.com> (raw) In-Reply-To: <20200905024938.14609-1-guinanx.sun@intel.com> Add support for minimum rollback revision. Signed-off-by: Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com> Signed-off-by: Guinan Sun <guinanx.sun@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 18 +++++++++++++++ drivers/net/i40e/base/i40e_common.c | 29 +++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 4 ++++ 3 files changed, 51 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 9ef01f371..4db8cdd8c 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -241,6 +241,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_nvm_config_read = 0x0704, i40e_aqc_opc_nvm_config_write = 0x0705, i40e_aqc_opc_nvm_update_in_process = 0x0706, + i40e_aqc_opc_rollback_revision_update = 0x0707, i40e_aqc_opc_oem_post_update = 0x0720, i40e_aqc_opc_thermal_sensor = 0x0721, @@ -2419,6 +2420,23 @@ struct i40e_aqc_nvm_config_data_immediate_field { I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); +/* Minimal Rollback Revision Update (direct 0x0707) */ +struct i40e_aqc_rollback_revision_update { + u8 optin_mode; /* bool */ +#define I40E_AQ_RREV_OPTIN_MODE 0x01 + u8 module_selected; +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 + u8 reserved1[2]; + u32 min_rrev; + u8 reserved2[8]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_rollback_revision_update); + /* OEM Post Update (indirect 0x0720) * no command data struct used */ diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 6c6fb4de4..15f4e91a4 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3717,6 +3717,35 @@ i40e_aq_nvm_update_in_process(struct i40e_hw *hw, return status; } +/** + * i40e_aq_min_rollback_rev_update - triggers an ow after update + * @hw: pointer to the hw struct + * @mode: opt-in mode, 1b for single module update, 0b for bulk update + * @module: module to be updated. Ignored if mode is 0b + * @min_rrev: value of the new minimal version. Ignored if mode is 0b + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code +i40e_aq_min_rollback_rev_update(struct i40e_hw *hw, u8 mode, u8 module, + u32 min_rrev, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_rollback_revision_update *cmd = + (struct i40e_aqc_rollback_revision_update *)&desc.params.raw; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_rollback_revision_update); + cmd->optin_mode = mode; + cmd->module_selected = module; + cmd->min_rrev = min_rrev; + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + /** * i40e_aq_oem_post_update - triggers an OEM specific flow after update * @hw: pointer to the hw struct diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 9a89f3002..124222e47 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -240,6 +240,10 @@ enum i40e_status_code i40e_aq_write_nvm_config(struct i40e_hw *hw, u8 cmd_flags, void *data, u16 buf_size, u16 element_count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_min_rollback_rev_update(struct i40e_hw *hw, u8 mode, u8 module, + u32 min_rrev, + struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_oem_post_update(struct i40e_hw *hw, void *buff, u16 buff_size, struct i40e_asq_cmd_details *cmd_details); -- 2.17.1
next prev parent reply other threads:[~2020-09-05 3:00 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-05 2:49 [dpdk-dev] [PATCH 0/9] update i40e base code Guinan Sun 2020-09-05 2:49 ` [dpdk-dev] [PATCH 1/9] net/i40e/base: add VLAN field for input set Guinan Sun 2020-09-07 11:09 ` Ferruh Yigit 2020-09-05 2:49 ` [dpdk-dev] [PATCH 2/9] net/i40e/base: update FW API version Guinan Sun 2020-09-07 11:10 ` Ferruh Yigit 2020-09-05 2:49 ` [dpdk-dev] [PATCH 3/9] net/i40e/base: enable pipe monitor thresholds Guinan Sun 2020-09-07 11:11 ` Ferruh Yigit 2020-09-05 2:49 ` [dpdk-dev] [PATCH 4/9] net/i40e/base: fix missing function header arguments Guinan Sun 2020-09-08 8:03 ` Yang, Qiming 2020-09-05 2:49 ` Guinan Sun [this message] 2020-09-05 2:49 ` [dpdk-dev] [PATCH 6/9] net/i40e/base: fix Rx only for unicast promisc on VLAN Guinan Sun 2020-09-05 2:49 ` [dpdk-dev] [PATCH 7/9] net/i40e/base: add EEE LPI status check for X722 adapters Guinan Sun 2020-09-05 2:49 ` [dpdk-dev] [PATCH 8/9] net/i40e/base: fix PHY config param when enabling EEE Guinan Sun 2020-09-05 2:49 ` [dpdk-dev] [PATCH 9/9] net/i40e/base: update version Guinan Sun 2020-09-07 6:27 ` [dpdk-dev] [PATCH 0/9] update i40e base code Zhang, Qi Z 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 0/7] " Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 1/7] net/i40e/base: update FW API version Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 2/7] net/i40e/base: fix missing function header arguments Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 3/7] net/i40e/base: add support for minimum rollback revision Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 4/7] net/i40e/base: fix Rx only for unicast promisc on VLAN Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 5/7] net/i40e/base: add EEE LPI status check for X722 adapters Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 6/7] net/i40e/base: fix PHY config param when enabling EEE Guinan Sun 2020-09-12 3:00 ` [dpdk-dev] [PATCH v2 7/7] net/i40e/base: update version Guinan Sun 2020-09-13 1:56 ` [dpdk-dev] [PATCH v2 0/7] update i40e base code Zhang, Qi Z
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200905024938.14609-6-guinanx.sun@intel.com \ --to=guinanx.sun@intel.com \ --cc=beilei.xing@intel.com \ --cc=dev@dpdk.org \ --cc=przemyslaw.ciesielski@intel.com \ --cc=qi.z.zhang@intel.com \ --cc=qiming.yang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git