提交 5518ac2a 编写于 作者: T Tony Nguyen

ice: Cleanup after ice_status removal

Clean up code after changing ice_status to int. Rearrange to fix reverse
Christmas tree and pull lines up where applicable.
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: NGurucharan G <gurucharanx.g@intel.com>
上级 d54699e2
...@@ -183,8 +183,8 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ...@@ -183,8 +183,8 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
struct ice_aqc_get_phy_caps *cmd; struct ice_aqc_get_phy_caps *cmd;
u16 pcaps_size = sizeof(*pcaps); u16 pcaps_size = sizeof(*pcaps);
struct ice_aq_desc desc; struct ice_aq_desc desc;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
cmd = &desc.params.get_phy; cmd = &desc.params.get_phy;
...@@ -428,9 +428,9 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, ...@@ -428,9 +428,9 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,
struct ice_fc_info *hw_fc_info; struct ice_fc_info *hw_fc_info;
bool tx_pause, rx_pause; bool tx_pause, rx_pause;
struct ice_aq_desc desc; struct ice_aq_desc desc;
int status;
struct ice_hw *hw; struct ice_hw *hw;
u16 cmd_flags; u16 cmd_flags;
int status;
if (!pi) if (!pi)
return -EINVAL; return -EINVAL;
...@@ -668,8 +668,8 @@ static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) ...@@ -668,8 +668,8 @@ static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)
static int ice_get_fw_log_cfg(struct ice_hw *hw) static int ice_get_fw_log_cfg(struct ice_hw *hw)
{ {
struct ice_aq_desc desc; struct ice_aq_desc desc;
int status;
__le16 *config; __le16 *config;
int status;
u16 size; u16 size;
size = sizeof(*config) * ICE_AQC_FW_LOG_ID_MAX; size = sizeof(*config) * ICE_AQC_FW_LOG_ID_MAX;
...@@ -740,12 +740,12 @@ static int ice_get_fw_log_cfg(struct ice_hw *hw) ...@@ -740,12 +740,12 @@ static int ice_get_fw_log_cfg(struct ice_hw *hw)
static int ice_cfg_fw_log(struct ice_hw *hw, bool enable) static int ice_cfg_fw_log(struct ice_hw *hw, bool enable)
{ {
struct ice_aqc_fw_logging *cmd; struct ice_aqc_fw_logging *cmd;
int status = 0;
u16 i, chgs = 0, len = 0; u16 i, chgs = 0, len = 0;
struct ice_aq_desc desc; struct ice_aq_desc desc;
__le16 *data = NULL; __le16 *data = NULL;
u8 actv_evnts = 0; u8 actv_evnts = 0;
void *buf = NULL; void *buf = NULL;
int status = 0;
if (!hw->fw_log.cq_en && !hw->fw_log.uart_en) if (!hw->fw_log.cq_en && !hw->fw_log.uart_en)
return 0; return 0;
...@@ -906,9 +906,9 @@ static void ice_get_itr_intrl_gran(struct ice_hw *hw) ...@@ -906,9 +906,9 @@ static void ice_get_itr_intrl_gran(struct ice_hw *hw)
int ice_init_hw(struct ice_hw *hw) int ice_init_hw(struct ice_hw *hw)
{ {
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
int status;
u16 mac_buf_len; u16 mac_buf_len;
void *mac_buf; void *mac_buf;
int status;
/* Set MAC type based on DeviceID */ /* Set MAC type based on DeviceID */
status = ice_set_mac_type(hw); status = ice_set_mac_type(hw);
...@@ -1457,11 +1457,11 @@ ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq, ...@@ -1457,11 +1457,11 @@ ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq,
struct ice_sq_cd *cd) struct ice_sq_cd *cd)
{ {
struct ice_aq_desc desc_cpy; struct ice_aq_desc desc_cpy;
int status;
bool is_cmd_for_retry; bool is_cmd_for_retry;
u8 *buf_cpy = NULL; u8 *buf_cpy = NULL;
u8 idx = 0; u8 idx = 0;
u16 opcode; u16 opcode;
int status;
opcode = le16_to_cpu(desc->opcode); opcode = le16_to_cpu(desc->opcode);
is_cmd_for_retry = ice_should_retry_sq_send_cmd(opcode); is_cmd_for_retry = ice_should_retry_sq_send_cmd(opcode);
...@@ -1820,16 +1820,15 @@ ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res, ...@@ -1820,16 +1820,15 @@ ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res,
*/ */
void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res) void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
{ {
int status;
u32 total_delay = 0; u32 total_delay = 0;
int status;
status = ice_aq_release_res(hw, res, 0, NULL); status = ice_aq_release_res(hw, res, 0, NULL);
/* there are some rare cases when trying to release the resource /* there are some rare cases when trying to release the resource
* results in an admin queue timeout, so handle them correctly * results in an admin queue timeout, so handle them correctly
*/ */
while ((status == -EIO) && while ((status == -EIO) && (total_delay < hw->adminq.sq_cmd_timeout)) {
(total_delay < hw->adminq.sq_cmd_timeout)) {
mdelay(1); mdelay(1);
status = ice_aq_release_res(hw, res, 0, NULL); status = ice_aq_release_res(hw, res, 0, NULL);
total_delay++; total_delay++;
...@@ -1884,8 +1883,8 @@ int ...@@ -1884,8 +1883,8 @@ int
ice_alloc_hw_res(struct ice_hw *hw, u16 type, u16 num, bool btm, u16 *res) ice_alloc_hw_res(struct ice_hw *hw, u16 type, u16 num, bool btm, u16 *res)
{ {
struct ice_aqc_alloc_free_res_elem *buf; struct ice_aqc_alloc_free_res_elem *buf;
int status;
u16 buf_len; u16 buf_len;
int status;
buf_len = struct_size(buf, elem, num); buf_len = struct_size(buf, elem, num);
buf = kzalloc(buf_len, GFP_KERNEL); buf = kzalloc(buf_len, GFP_KERNEL);
...@@ -1921,8 +1920,8 @@ ice_alloc_hw_res(struct ice_hw *hw, u16 type, u16 num, bool btm, u16 *res) ...@@ -1921,8 +1920,8 @@ ice_alloc_hw_res(struct ice_hw *hw, u16 type, u16 num, bool btm, u16 *res)
int ice_free_hw_res(struct ice_hw *hw, u16 type, u16 num, u16 *res) int ice_free_hw_res(struct ice_hw *hw, u16 type, u16 num, u16 *res)
{ {
struct ice_aqc_alloc_free_res_elem *buf; struct ice_aqc_alloc_free_res_elem *buf;
int status;
u16 buf_len; u16 buf_len;
int status;
buf_len = struct_size(buf, elem, num); buf_len = struct_size(buf, elem, num);
buf = kzalloc(buf_len, GFP_KERNEL); buf = kzalloc(buf_len, GFP_KERNEL);
...@@ -2518,9 +2517,9 @@ ice_aq_list_caps(struct ice_hw *hw, void *buf, u16 buf_size, u32 *cap_count, ...@@ -2518,9 +2517,9 @@ ice_aq_list_caps(struct ice_hw *hw, void *buf, u16 buf_size, u32 *cap_count,
int int
ice_discover_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_caps) ice_discover_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_caps)
{ {
int status;
u32 cap_count = 0; u32 cap_count = 0;
void *cbuf; void *cbuf;
int status;
cbuf = kzalloc(ICE_AQ_MAX_BUF_LEN, GFP_KERNEL); cbuf = kzalloc(ICE_AQ_MAX_BUF_LEN, GFP_KERNEL);
if (!cbuf) if (!cbuf)
...@@ -2552,9 +2551,9 @@ ice_discover_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_caps) ...@@ -2552,9 +2551,9 @@ ice_discover_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_caps)
static int static int
ice_discover_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_caps) ice_discover_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_caps)
{ {
int status;
u32 cap_count = 0; u32 cap_count = 0;
void *cbuf; void *cbuf;
int status;
cbuf = kzalloc(ICE_AQ_MAX_BUF_LEN, GFP_KERNEL); cbuf = kzalloc(ICE_AQ_MAX_BUF_LEN, GFP_KERNEL);
if (!cbuf) if (!cbuf)
...@@ -3120,8 +3119,8 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update) ...@@ -3120,8 +3119,8 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update)
{ {
struct ice_aqc_set_phy_cfg_data cfg = { 0 }; struct ice_aqc_set_phy_cfg_data cfg = { 0 };
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
if (!pi || !aq_failures) if (!pi || !aq_failures)
return -EINVAL; return -EINVAL;
...@@ -3261,8 +3260,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, ...@@ -3261,8 +3260,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
enum ice_fec_mode fec) enum ice_fec_mode fec)
{ {
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
if (!pi || !cfg) if (!pi || !cfg)
return -EINVAL; return -EINVAL;
...@@ -3652,9 +3651,9 @@ ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *set_ ...@@ -3652,9 +3651,9 @@ ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *set_
* *
* get (0x0B04) or set (0x0B02) the RSS key per VSI * get (0x0B04) or set (0x0B02) the RSS key per VSI
*/ */
static int __ice_aq_get_set_rss_key(struct ice_hw *hw, u16 vsi_id, static int
struct ice_aqc_get_set_rss_keys *key, __ice_aq_get_set_rss_key(struct ice_hw *hw, u16 vsi_id,
bool set) struct ice_aqc_get_set_rss_keys *key, bool set)
{ {
struct ice_aqc_get_set_rss_key *cmd_resp; struct ice_aqc_get_set_rss_key *cmd_resp;
u16 key_size = sizeof(*key); u16 key_size = sizeof(*key);
...@@ -3793,8 +3792,8 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps, ...@@ -3793,8 +3792,8 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
struct ice_aqc_dis_txq_item *item; struct ice_aqc_dis_txq_item *item;
struct ice_aqc_dis_txqs *cmd; struct ice_aqc_dis_txqs *cmd;
struct ice_aq_desc desc; struct ice_aq_desc desc;
int status;
u16 i, sz = 0; u16 i, sz = 0;
int status;
cmd = &desc.params.dis_txqs; cmd = &desc.params.dis_txqs;
ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_dis_txqs); ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_dis_txqs);
...@@ -4189,8 +4188,8 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, ...@@ -4189,8 +4188,8 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle,
struct ice_aqc_txsched_elem_data node = { 0 }; struct ice_aqc_txsched_elem_data node = { 0 };
struct ice_sched_node *parent; struct ice_sched_node *parent;
struct ice_q_ctx *q_ctx; struct ice_q_ctx *q_ctx;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY) if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY)
return -EIO; return -EIO;
...@@ -4292,9 +4291,9 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues, ...@@ -4292,9 +4291,9 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues,
enum ice_disq_rst_src rst_src, u16 vmvf_num, enum ice_disq_rst_src rst_src, u16 vmvf_num,
struct ice_sq_cd *cd) struct ice_sq_cd *cd)
{ {
int status = -ENOENT;
struct ice_aqc_dis_txq_item *qg_list; struct ice_aqc_dis_txq_item *qg_list;
struct ice_q_ctx *q_ctx; struct ice_q_ctx *q_ctx;
int status = -ENOENT;
struct ice_hw *hw; struct ice_hw *hw;
u16 i, buf_size; u16 i, buf_size;
...@@ -4446,9 +4445,9 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc, ...@@ -4446,9 +4445,9 @@ ice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
struct ice_aqc_txsched_elem_data node = { 0 }; struct ice_aqc_txsched_elem_data node = { 0 };
struct ice_aqc_add_rdma_qset_data *buf; struct ice_aqc_add_rdma_qset_data *buf;
struct ice_sched_node *parent; struct ice_sched_node *parent;
int status;
struct ice_hw *hw; struct ice_hw *hw;
u16 i, buf_size; u16 i, buf_size;
int status;
int ret; int ret;
if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY) if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY)
...@@ -4523,8 +4522,8 @@ ice_dis_vsi_rdma_qset(struct ice_port_info *pi, u16 count, u32 *qset_teid, ...@@ -4523,8 +4522,8 @@ ice_dis_vsi_rdma_qset(struct ice_port_info *pi, u16 count, u32 *qset_teid,
u16 *q_id) u16 *q_id)
{ {
struct ice_aqc_dis_txq_item *qg_list; struct ice_aqc_dis_txq_item *qg_list;
int status = 0;
struct ice_hw *hw; struct ice_hw *hw;
int status = 0;
u16 qg_size; u16 qg_size;
int i; int i;
......
...@@ -295,8 +295,7 @@ ice_cfg_cq_regs(struct ice_hw *hw, struct ice_ctl_q_ring *ring, u16 num_entries) ...@@ -295,8 +295,7 @@ ice_cfg_cq_regs(struct ice_hw *hw, struct ice_ctl_q_ring *ring, u16 num_entries)
* *
* Configure base address and length registers for the transmit queue * Configure base address and length registers for the transmit queue
*/ */
static int static int ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
{ {
return ice_cfg_cq_regs(hw, &cq->sq, cq->num_sq_entries); return ice_cfg_cq_regs(hw, &cq->sq, cq->num_sq_entries);
} }
...@@ -308,8 +307,7 @@ ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq) ...@@ -308,8 +307,7 @@ ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
* *
* Configure base address and length registers for the receive (event queue) * Configure base address and length registers for the receive (event queue)
*/ */
static int static int ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
{ {
int status; int status;
...@@ -474,8 +472,7 @@ static int ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq) ...@@ -474,8 +472,7 @@ static int ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
* *
* The main shutdown routine for the Control Transmit Queue * The main shutdown routine for the Control Transmit Queue
*/ */
static int static int ice_shutdown_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
ice_shutdown_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
{ {
int ret_code = 0; int ret_code = 0;
...@@ -541,8 +538,7 @@ static bool ice_aq_ver_check(struct ice_hw *hw) ...@@ -541,8 +538,7 @@ static bool ice_aq_ver_check(struct ice_hw *hw)
* *
* The main shutdown routine for the Control Receive Queue * The main shutdown routine for the Control Receive Queue
*/ */
static int static int ice_shutdown_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
ice_shutdown_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
{ {
int ret_code = 0; int ret_code = 0;
...@@ -753,8 +749,8 @@ void ice_shutdown_all_ctrlq(struct ice_hw *hw) ...@@ -753,8 +749,8 @@ void ice_shutdown_all_ctrlq(struct ice_hw *hw)
*/ */
int ice_init_all_ctrlq(struct ice_hw *hw) int ice_init_all_ctrlq(struct ice_hw *hw)
{ {
int status;
u32 retry = 0; u32 retry = 0;
int status;
/* Init FW admin queue */ /* Init FW admin queue */
do { do {
...@@ -970,9 +966,9 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq, ...@@ -970,9 +966,9 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
struct ice_dma_mem *dma_buf = NULL; struct ice_dma_mem *dma_buf = NULL;
struct ice_aq_desc *desc_on_ring; struct ice_aq_desc *desc_on_ring;
bool cmd_completed = false; bool cmd_completed = false;
int status = 0;
struct ice_sq_cd *details; struct ice_sq_cd *details;
u32 total_delay = 0; u32 total_delay = 0;
int status = 0;
u16 retval = 0; u16 retval = 0;
u32 val = 0; u32 val = 0;
...@@ -1160,9 +1156,9 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq, ...@@ -1160,9 +1156,9 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
{ {
u16 ntc = cq->rq.next_to_clean; u16 ntc = cq->rq.next_to_clean;
enum ice_aq_err rq_last_status; enum ice_aq_err rq_last_status;
int ret_code = 0;
struct ice_aq_desc *desc; struct ice_aq_desc *desc;
struct ice_dma_mem *bi; struct ice_dma_mem *bi;
int ret_code = 0;
u16 desc_idx; u16 desc_idx;
u16 datalen; u16 datalen;
u16 flags; u16 flags;
......
...@@ -116,8 +116,7 @@ ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist, ...@@ -116,8 +116,7 @@ ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist,
* *
* Start the embedded LLDP Agent on all ports. (0x0A06) * Start the embedded LLDP Agent on all ports. (0x0A06)
*/ */
int int ice_aq_start_lldp(struct ice_hw *hw, bool persist, struct ice_sq_cd *cd)
ice_aq_start_lldp(struct ice_hw *hw, bool persist, struct ice_sq_cd *cd)
{ {
struct ice_aqc_lldp_start *cmd; struct ice_aqc_lldp_start *cmd;
struct ice_aq_desc desc; struct ice_aq_desc desc;
...@@ -597,12 +596,11 @@ ice_parse_org_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg) ...@@ -597,12 +596,11 @@ ice_parse_org_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)
* *
* Parse DCB configuration from the LLDPDU * Parse DCB configuration from the LLDPDU
*/ */
static int static int ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)
ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)
{ {
struct ice_lldp_org_tlv *tlv; struct ice_lldp_org_tlv *tlv;
int ret = 0;
u16 offset = 0; u16 offset = 0;
int ret = 0;
u16 typelen; u16 typelen;
u16 type; u16 type;
u16 len; u16 len;
...@@ -652,8 +650,8 @@ int ...@@ -652,8 +650,8 @@ int
ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype, ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype,
struct ice_dcbx_cfg *dcbcfg) struct ice_dcbx_cfg *dcbcfg)
{ {
int ret;
u8 *lldpmib; u8 *lldpmib;
int ret;
/* Allocate the LLDPDU */ /* Allocate the LLDPDU */
lldpmib = devm_kzalloc(ice_hw_to_dev(hw), ICE_LLDPDU_SIZE, GFP_KERNEL); lldpmib = devm_kzalloc(ice_hw_to_dev(hw), ICE_LLDPDU_SIZE, GFP_KERNEL);
...@@ -691,9 +689,9 @@ ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent, ...@@ -691,9 +689,9 @@ ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent,
bool *dcbx_agent_status, struct ice_sq_cd *cd) bool *dcbx_agent_status, struct ice_sq_cd *cd)
{ {
struct ice_aqc_lldp_stop_start_specific_agent *cmd; struct ice_aqc_lldp_stop_start_specific_agent *cmd;
int status;
struct ice_aq_desc desc; struct ice_aq_desc desc;
u16 opcode; u16 opcode;
int status;
cmd = &desc.params.lldp_agent_ctrl; cmd = &desc.params.lldp_agent_ctrl;
...@@ -902,8 +900,7 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg, ...@@ -902,8 +900,7 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg,
* *
* Get IEEE or CEE mode DCB configuration from the Firmware * Get IEEE or CEE mode DCB configuration from the Firmware
*/ */
static int static int ice_get_ieee_or_cee_dcb_cfg(struct ice_port_info *pi, u8 dcbx_mode)
ice_get_ieee_or_cee_dcb_cfg(struct ice_port_info *pi, u8 dcbx_mode)
{ {
struct ice_dcbx_cfg *dcbx_cfg = NULL; struct ice_dcbx_cfg *dcbx_cfg = NULL;
int ret; int ret;
...@@ -1472,9 +1469,9 @@ int ice_set_dcb_cfg(struct ice_port_info *pi) ...@@ -1472,9 +1469,9 @@ int ice_set_dcb_cfg(struct ice_port_info *pi)
{ {
u8 mib_type, *lldpmib = NULL; u8 mib_type, *lldpmib = NULL;
struct ice_dcbx_cfg *dcbcfg; struct ice_dcbx_cfg *dcbcfg;
int ret;
struct ice_hw *hw; struct ice_hw *hw;
u16 miblen; u16 miblen;
int ret;
if (!pi) if (!pi)
return -EINVAL; return -EINVAL;
...@@ -1542,8 +1539,8 @@ ice_update_port_tc_tree_cfg(struct ice_port_info *pi, ...@@ -1542,8 +1539,8 @@ ice_update_port_tc_tree_cfg(struct ice_port_info *pi,
{ {
struct ice_sched_node *node, *tc_node; struct ice_sched_node *node, *tc_node;
struct ice_aqc_txsched_elem_data elem; struct ice_aqc_txsched_elem_data elem;
int status = 0;
u32 teid1, teid2; u32 teid1, teid2;
int status = 0;
u8 i, j; u8 i, j;
if (!pi) if (!pi)
......
...@@ -152,8 +152,7 @@ ice_query_port_ets(struct ice_port_info *pi, ...@@ -152,8 +152,7 @@ ice_query_port_ets(struct ice_port_info *pi,
int int
ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist, ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist,
struct ice_sq_cd *cd); struct ice_sq_cd *cd);
int int ice_aq_start_lldp(struct ice_hw *hw, bool persist, struct ice_sq_cd *cd);
ice_aq_start_lldp(struct ice_hw *hw, bool persist, struct ice_sq_cd *cd);
int int
ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent, ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent,
bool *dcbx_agent_status, struct ice_sq_cd *cd); bool *dcbx_agent_status, struct ice_sq_cd *cd);
......
...@@ -762,9 +762,9 @@ static int ice_devlink_nvm_snapshot(struct devlink *devlink, ...@@ -762,9 +762,9 @@ static int ice_devlink_nvm_snapshot(struct devlink *devlink,
struct ice_pf *pf = devlink_priv(devlink); struct ice_pf *pf = devlink_priv(devlink);
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
void *nvm_data; void *nvm_data;
u32 nvm_size; u32 nvm_size;
int status;
nvm_size = hw->flash.flash_size; nvm_size = hw->flash.flash_size;
nvm_data = vzalloc(nvm_size); nvm_data = vzalloc(nvm_size);
...@@ -819,8 +819,8 @@ ice_devlink_devcaps_snapshot(struct devlink *devlink, ...@@ -819,8 +819,8 @@ ice_devlink_devcaps_snapshot(struct devlink *devlink,
struct ice_pf *pf = devlink_priv(devlink); struct ice_pf *pf = devlink_priv(devlink);
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
void *devcaps; void *devcaps;
int status;
devcaps = vzalloc(ICE_AQ_MAX_BUF_LEN); devcaps = vzalloc(ICE_AQ_MAX_BUF_LEN);
if (!devcaps) if (!devcaps)
......
...@@ -270,9 +270,9 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, ...@@ -270,9 +270,9 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
struct device *dev; struct device *dev;
int ret = 0; int ret = 0;
int status;
u8 *buf; u8 *buf;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
...@@ -288,8 +288,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, ...@@ -288,8 +288,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
status = ice_acquire_nvm(hw, ICE_RES_READ); status = ice_acquire_nvm(hw, ICE_RES_READ);
if (status) { if (status) {
dev_err(dev, "ice_acquire_nvm failed, err %d aq_err %s\n", dev_err(dev, "ice_acquire_nvm failed, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
ret = -EIO; ret = -EIO;
goto out; goto out;
} }
...@@ -298,8 +297,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, ...@@ -298,8 +297,7 @@ ice_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
false); false);
if (status) { if (status) {
dev_err(dev, "ice_read_flat_nvm failed, err %d aq_err %s\n", dev_err(dev, "ice_read_flat_nvm failed, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
ret = -EIO; ret = -EIO;
goto release; goto release;
} }
...@@ -342,8 +340,8 @@ static bool ice_active_vfs(struct ice_pf *pf) ...@@ -342,8 +340,8 @@ static bool ice_active_vfs(struct ice_pf *pf)
static u64 ice_link_test(struct net_device *netdev) static u64 ice_link_test(struct net_device *netdev)
{ {
struct ice_netdev_priv *np = netdev_priv(netdev); struct ice_netdev_priv *np = netdev_priv(netdev);
int status;
bool link_up = false; bool link_up = false;
int status;
netdev_info(netdev, "link test\n"); netdev_info(netdev, "link test\n");
status = ice_get_link_status(np->vsi->port_info, &link_up); status = ice_get_link_status(np->vsi->port_info, &link_up);
...@@ -1052,8 +1050,8 @@ ice_get_fecparam(struct net_device *netdev, struct ethtool_fecparam *fecparam) ...@@ -1052,8 +1050,8 @@ ice_get_fecparam(struct net_device *netdev, struct ethtool_fecparam *fecparam)
struct ice_link_status *link_info; struct ice_link_status *link_info;
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
struct ice_port_info *pi; struct ice_port_info *pi;
int status;
int err = 0; int err = 0;
int status;
pi = vsi->port_info; pi = vsi->port_info;
...@@ -1232,8 +1230,8 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags) ...@@ -1232,8 +1230,8 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)
pf->dcbx_cap &= ~DCB_CAP_DCBX_LLD_MANAGED; pf->dcbx_cap &= ~DCB_CAP_DCBX_LLD_MANAGED;
pf->dcbx_cap |= DCB_CAP_DCBX_HOST; pf->dcbx_cap |= DCB_CAP_DCBX_HOST;
} else { } else {
int status;
bool dcbx_agent_status; bool dcbx_agent_status;
int status;
if (ice_get_pfc_mode(pf) == ICE_QOS_MODE_DSCP) { if (ice_get_pfc_mode(pf) == ICE_QOS_MODE_DSCP) {
clear_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags); clear_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags);
...@@ -1938,8 +1936,8 @@ ice_get_link_ksettings(struct net_device *netdev, ...@@ -1938,8 +1936,8 @@ ice_get_link_ksettings(struct net_device *netdev,
struct ice_aqc_get_phy_caps_data *caps; struct ice_aqc_get_phy_caps_data *caps;
struct ice_link_status *hw_link_info; struct ice_link_status *hw_link_info;
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
int status;
int err = 0; int err = 0;
int status;
ethtool_link_ksettings_zero_link_mode(ks, supported); ethtool_link_ksettings_zero_link_mode(ks, supported);
ethtool_link_ksettings_zero_link_mode(ks, advertising); ethtool_link_ksettings_zero_link_mode(ks, advertising);
...@@ -2210,11 +2208,11 @@ ice_set_link_ksettings(struct net_device *netdev, ...@@ -2210,11 +2208,11 @@ ice_set_link_ksettings(struct net_device *netdev,
struct ice_pf *pf = np->vsi->back; struct ice_pf *pf = np->vsi->back;
struct ice_port_info *pi; struct ice_port_info *pi;
u8 autoneg_changed = 0; u8 autoneg_changed = 0;
int status;
u64 phy_type_high = 0; u64 phy_type_high = 0;
u64 phy_type_low = 0; u64 phy_type_low = 0;
int err = 0; int err = 0;
bool linkup; bool linkup;
int status;
pi = np->vsi->port_info; pi = np->vsi->port_info;
...@@ -2522,9 +2520,9 @@ static int ...@@ -2522,9 +2520,9 @@ static int
ice_set_rss_hash_opt(struct ice_vsi *vsi, struct ethtool_rxnfc *nfc) ice_set_rss_hash_opt(struct ice_vsi *vsi, struct ethtool_rxnfc *nfc)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
u64 hashed_flds; u64 hashed_flds;
int status;
u32 hdrs; u32 hdrs;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
...@@ -3003,10 +3001,10 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) ...@@ -3003,10 +3001,10 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
struct ice_port_info *pi; struct ice_port_info *pi;
int status;
u8 aq_failures; u8 aq_failures;
bool link_up; bool link_up;
int err = 0; int err = 0;
int status;
u32 is_an; u32 is_an;
pi = vsi->port_info; pi = vsi->port_info;
...@@ -3077,18 +3075,15 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) ...@@ -3077,18 +3075,15 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)
if (aq_failures & ICE_SET_FC_AQ_FAIL_GET) { 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", netdev_info(netdev, "Set fc failed on the get_phy_capabilities call with err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
err = -EAGAIN; err = -EAGAIN;
} else if (aq_failures & ICE_SET_FC_AQ_FAIL_SET) { } 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", netdev_info(netdev, "Set fc failed on the set_phy_config call with err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
err = -EAGAIN; err = -EAGAIN;
} else if (aq_failures & ICE_SET_FC_AQ_FAIL_UPDATE) { } 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", netdev_info(netdev, "Set fc failed on the get_link_info call with err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
err = -EAGAIN; err = -EAGAIN;
} }
...@@ -3928,11 +3923,11 @@ ice_get_module_info(struct net_device *netdev, ...@@ -3928,11 +3923,11 @@ ice_get_module_info(struct net_device *netdev,
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u8 sff8472_comp = 0; u8 sff8472_comp = 0;
u8 sff8472_swap = 0; u8 sff8472_swap = 0;
u8 sff8636_rev = 0; u8 sff8636_rev = 0;
u8 value = 0; u8 value = 0;
int status;
status = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR, 0x00, 0x00, status = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR, 0x00, 0x00,
0, &value, 1, 0, NULL); 0, &value, 1, 0, NULL);
...@@ -4005,11 +4000,11 @@ ice_get_module_eeprom(struct net_device *netdev, ...@@ -4005,11 +4000,11 @@ ice_get_module_eeprom(struct net_device *netdev,
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
bool is_sfp = false; bool is_sfp = false;
unsigned int i, j; unsigned int i, j;
u16 offset = 0; u16 offset = 0;
u8 page = 0; u8 page = 0;
int status;
if (!ee || !ee->len || !data) if (!ee || !ee->len || !data)
return -EINVAL; return -EINVAL;
......
...@@ -530,10 +530,10 @@ ice_fdir_set_hw_fltr_rule(struct ice_pf *pf, struct ice_flow_seg_info *seg, ...@@ -530,10 +530,10 @@ ice_fdir_set_hw_fltr_rule(struct ice_pf *pf, struct ice_flow_seg_info *seg,
struct ice_flow_prof *prof = NULL; struct ice_flow_prof *prof = NULL;
struct ice_fd_hw_prof *hw_prof; struct ice_fd_hw_prof *hw_prof;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u64 entry1_h = 0; u64 entry1_h = 0;
u64 entry2_h = 0; u64 entry2_h = 0;
u64 prof_id; u64 prof_id;
int status;
int err; int err;
main_vsi = ice_get_main_vsi(pf); main_vsi = ice_get_main_vsi(pf);
...@@ -1190,9 +1190,9 @@ ice_fdir_write_fltr(struct ice_pf *pf, struct ice_fdir_fltr *input, bool add, ...@@ -1190,9 +1190,9 @@ ice_fdir_write_fltr(struct ice_pf *pf, struct ice_fdir_fltr *input, bool add,
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
struct ice_fltr_desc desc; struct ice_fltr_desc desc;
struct ice_vsi *ctrl_vsi; struct ice_vsi *ctrl_vsi;
int status;
u8 *pkt, *frag_pkt; u8 *pkt, *frag_pkt;
bool has_frag; bool has_frag;
int status;
int err; int err;
ctrl_vsi = ice_get_ctrl_vsi(pf); ctrl_vsi = ice_get_ctrl_vsi(pf);
......
...@@ -735,8 +735,7 @@ int ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id) ...@@ -735,8 +735,7 @@ int ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id)
* @cntr_id: returns counter index * @cntr_id: returns counter index
* @num_fltr: number of filter entries to be allocated * @num_fltr: number of filter entries to be allocated
*/ */
int int ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr)
ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr)
{ {
return ice_alloc_res_cntr(hw, ICE_AQC_RES_TYPE_FDIR_GUARANTEED_ENTRIES, return ice_alloc_res_cntr(hw, ICE_AQC_RES_TYPE_FDIR_GUARANTEED_ENTRIES,
ICE_AQC_RES_TYPE_FLAG_DEDICATED, num_fltr, ICE_AQC_RES_TYPE_FLAG_DEDICATED, num_fltr,
...@@ -749,8 +748,7 @@ ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr) ...@@ -749,8 +748,7 @@ ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr)
* @cntr_id: returns counter index * @cntr_id: returns counter index
* @num_fltr: number of filter entries to be allocated * @num_fltr: number of filter entries to be allocated
*/ */
int int ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr)
ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr)
{ {
return ice_alloc_res_cntr(hw, ICE_AQC_RES_TYPE_FDIR_SHARED_ENTRIES, return ice_alloc_res_cntr(hw, ICE_AQC_RES_TYPE_FDIR_SHARED_ENTRIES,
ICE_AQC_RES_TYPE_FLAG_DEDICATED, num_fltr, ICE_AQC_RES_TYPE_FLAG_DEDICATED, num_fltr,
......
...@@ -203,10 +203,8 @@ struct ice_fdir_base_pkt { ...@@ -203,10 +203,8 @@ struct ice_fdir_base_pkt {
int ice_alloc_fd_res_cntr(struct ice_hw *hw, u16 *cntr_id); int ice_alloc_fd_res_cntr(struct ice_hw *hw, u16 *cntr_id);
int ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id); int ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id);
int int ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr); int ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
int
ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
void void
ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input, ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
struct ice_fltr_desc *fdesc, bool add); struct ice_fltr_desc *fdesc, bool add);
......
...@@ -964,11 +964,10 @@ ice_find_seg_in_pkg(struct ice_hw *hw, u32 seg_type, ...@@ -964,11 +964,10 @@ ice_find_seg_in_pkg(struct ice_hw *hw, u32 seg_type,
* *
* Obtains change lock and updates package. * Obtains change lock and updates package.
*/ */
static int static int ice_update_pkg(struct ice_hw *hw, struct ice_buf *bufs, u32 count)
ice_update_pkg(struct ice_hw *hw, struct ice_buf *bufs, u32 count)
{ {
int status;
u32 offset, info, i; u32 offset, info, i;
int status;
status = ice_acquire_change_lock(hw, ICE_RES_WRITE); status = ice_acquire_change_lock(hw, ICE_RES_WRITE);
if (status) if (status)
...@@ -1023,10 +1022,10 @@ static enum ice_ddp_state ...@@ -1023,10 +1022,10 @@ static enum ice_ddp_state
ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf *bufs, u32 count) ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf *bufs, u32 count)
{ {
enum ice_ddp_state state = ICE_DDP_PKG_SUCCESS; enum ice_ddp_state state = ICE_DDP_PKG_SUCCESS;
int status;
struct ice_buf_hdr *bh; struct ice_buf_hdr *bh;
enum ice_aq_err err; enum ice_aq_err err;
u32 offset, info, i; u32 offset, info, i;
int status;
if (!bufs || !count) if (!bufs || !count)
return ICE_DDP_PKG_ERR; return ICE_DDP_PKG_ERR;
...@@ -2101,8 +2100,8 @@ ice_create_tunnel(struct ice_hw *hw, u16 index, ...@@ -2101,8 +2100,8 @@ ice_create_tunnel(struct ice_hw *hw, u16 index,
enum ice_tunnel_type type, u16 port) enum ice_tunnel_type type, u16 port)
{ {
struct ice_boost_tcam_section *sect_rx, *sect_tx; struct ice_boost_tcam_section *sect_rx, *sect_tx;
int status = -ENOSPC;
struct ice_buf_build *bld; struct ice_buf_build *bld;
int status = -ENOSPC;
mutex_lock(&hw->tnl_lock); mutex_lock(&hw->tnl_lock);
...@@ -2172,8 +2171,8 @@ ice_destroy_tunnel(struct ice_hw *hw, u16 index, enum ice_tunnel_type type, ...@@ -2172,8 +2171,8 @@ ice_destroy_tunnel(struct ice_hw *hw, u16 index, enum ice_tunnel_type type,
u16 port) u16 port)
{ {
struct ice_boost_tcam_section *sect_rx, *sect_tx; struct ice_boost_tcam_section *sect_rx, *sect_tx;
int status = -ENOSPC;
struct ice_buf_build *bld; struct ice_buf_build *bld;
int status = -ENOSPC;
mutex_lock(&hw->tnl_lock); mutex_lock(&hw->tnl_lock);
...@@ -2399,8 +2398,8 @@ ice_ptg_remove_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg) ...@@ -2399,8 +2398,8 @@ ice_ptg_remove_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)
static int static int
ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg) ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)
{ {
int status;
u8 original_ptg; u8 original_ptg;
int status;
if (ptype > ICE_XLT1_CNT - 1) if (ptype > ICE_XLT1_CNT - 1)
return -EINVAL; return -EINVAL;
...@@ -2636,8 +2635,7 @@ ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk, ...@@ -2636,8 +2635,7 @@ ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk,
* The function will remove all VSIs associated with the input VSIG and move * The function will remove all VSIs associated with the input VSIG and move
* them to the DEFAULT_VSIG and mark the VSIG available. * them to the DEFAULT_VSIG and mark the VSIG available.
*/ */
static int static int ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)
ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)
{ {
struct ice_vsig_prof *dtmp, *del; struct ice_vsig_prof *dtmp, *del;
struct ice_vsig_vsi *vsi_cur; struct ice_vsig_vsi *vsi_cur;
...@@ -2759,8 +2757,8 @@ static int ...@@ -2759,8 +2757,8 @@ static int
ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig) ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
{ {
struct ice_vsig_vsi *tmp; struct ice_vsig_vsi *tmp;
int status;
u16 orig_vsig, idx; u16 orig_vsig, idx;
int status;
idx = vsig & ICE_VSIG_IDX_M; idx = vsig & ICE_VSIG_IDX_M;
...@@ -2998,12 +2996,11 @@ ice_free_tcam_ent(struct ice_hw *hw, enum ice_block blk, u16 tcam_idx) ...@@ -2998,12 +2996,11 @@ ice_free_tcam_ent(struct ice_hw *hw, enum ice_block blk, u16 tcam_idx)
* This function allocates a new profile ID, which also corresponds to a Field * This function allocates a new profile ID, which also corresponds to a Field
* Vector (Extraction Sequence) entry. * Vector (Extraction Sequence) entry.
*/ */
static int static int ice_alloc_prof_id(struct ice_hw *hw, enum ice_block blk, u8 *prof_id)
ice_alloc_prof_id(struct ice_hw *hw, enum ice_block blk, u8 *prof_id)
{ {
int status;
u16 res_type; u16 res_type;
u16 get_prof; u16 get_prof;
int status;
if (!ice_prof_id_rsrc_type(blk, &res_type)) if (!ice_prof_id_rsrc_type(blk, &res_type))
return -EINVAL; return -EINVAL;
...@@ -3023,8 +3020,7 @@ ice_alloc_prof_id(struct ice_hw *hw, enum ice_block blk, u8 *prof_id) ...@@ -3023,8 +3020,7 @@ ice_alloc_prof_id(struct ice_hw *hw, enum ice_block blk, u8 *prof_id)
* *
* This function frees a profile ID, which also corresponds to a Field Vector. * This function frees a profile ID, which also corresponds to a Field Vector.
*/ */
static int static int ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
{ {
u16 tmp_prof_id = (u16)prof_id; u16 tmp_prof_id = (u16)prof_id;
u16 res_type; u16 res_type;
...@@ -3041,8 +3037,7 @@ ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id) ...@@ -3041,8 +3037,7 @@ ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
* @blk: the block from which to free the profile ID * @blk: the block from which to free the profile ID
* @prof_id: the profile ID for which to increment the reference count * @prof_id: the profile ID for which to increment the reference count
*/ */
static int static int ice_prof_inc_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
ice_prof_inc_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
{ {
if (prof_id > hw->blk[blk].es.count) if (prof_id > hw->blk[blk].es.count)
return -EINVAL; return -EINVAL;
...@@ -3167,8 +3162,8 @@ ice_alloc_prof_mask(struct ice_hw *hw, enum ice_block blk, u16 idx, u16 mask, ...@@ -3167,8 +3162,8 @@ ice_alloc_prof_mask(struct ice_hw *hw, enum ice_block blk, u16 idx, u16 mask,
u16 *mask_idx) u16 *mask_idx)
{ {
bool found_unused = false, found_copy = false; bool found_unused = false, found_copy = false;
int status = -ENOSPC;
u16 unused_idx = 0, copy_idx = 0; u16 unused_idx = 0, copy_idx = 0;
int status = -ENOSPC;
u16 i; u16 i;
if (blk != ICE_BLK_RSS && blk != ICE_BLK_FD) if (blk != ICE_BLK_RSS && blk != ICE_BLK_FD)
...@@ -4267,12 +4262,12 @@ ice_upd_prof_hw(struct ice_hw *hw, enum ice_block blk, ...@@ -4267,12 +4262,12 @@ ice_upd_prof_hw(struct ice_hw *hw, enum ice_block blk,
{ {
struct ice_buf_build *b; struct ice_buf_build *b;
struct ice_chs_chg *tmp; struct ice_chs_chg *tmp;
int status;
u16 pkg_sects; u16 pkg_sects;
u16 xlt1 = 0; u16 xlt1 = 0;
u16 xlt2 = 0; u16 xlt2 = 0;
u16 tcam = 0; u16 tcam = 0;
u16 es = 0; u16 es = 0;
int status;
u16 sects; u16 sects;
/* count number of sections we need */ /* count number of sections we need */
...@@ -4638,9 +4633,9 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[], ...@@ -4638,9 +4633,9 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
u32 bytes = DIV_ROUND_UP(ICE_FLOW_PTYPE_MAX, BITS_PER_BYTE); u32 bytes = DIV_ROUND_UP(ICE_FLOW_PTYPE_MAX, BITS_PER_BYTE);
DECLARE_BITMAP(ptgs_used, ICE_XLT1_CNT); DECLARE_BITMAP(ptgs_used, ICE_XLT1_CNT);
struct ice_prof_map *prof; struct ice_prof_map *prof;
int status;
u8 byte = 0; u8 byte = 0;
u8 prof_id; u8 prof_id;
int status;
bitmap_zero(ptgs_used, ICE_XLT1_CNT); bitmap_zero(ptgs_used, ICE_XLT1_CNT);
...@@ -4798,8 +4793,7 @@ ice_vsig_prof_id_count(struct ice_hw *hw, enum ice_block blk, u16 vsig) ...@@ -4798,8 +4793,7 @@ ice_vsig_prof_id_count(struct ice_hw *hw, enum ice_block blk, u16 vsig)
* @blk: hardware block * @blk: hardware block
* @idx: the index to release * @idx: the index to release
*/ */
static int static int ice_rel_tcam_idx(struct ice_hw *hw, enum ice_block blk, u16 idx)
ice_rel_tcam_idx(struct ice_hw *hw, enum ice_block blk, u16 idx)
{ {
/* Masks to invoke a never match entry */ /* Masks to invoke a never match entry */
u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
...@@ -4941,12 +4935,11 @@ ice_rem_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl, ...@@ -4941,12 +4935,11 @@ ice_rem_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
* @blk: hardware block * @blk: hardware block
* @id: profile tracking ID * @id: profile tracking ID
*/ */
static int static int ice_rem_flow_all(struct ice_hw *hw, enum ice_block blk, u64 id)
ice_rem_flow_all(struct ice_hw *hw, enum ice_block blk, u64 id)
{ {
struct ice_chs_chg *del, *tmp; struct ice_chs_chg *del, *tmp;
int status;
struct list_head chg; struct list_head chg;
int status;
u16 i; u16 i;
INIT_LIST_HEAD(&chg); INIT_LIST_HEAD(&chg);
...@@ -5022,9 +5015,9 @@ static int ...@@ -5022,9 +5015,9 @@ static int
ice_get_prof(struct ice_hw *hw, enum ice_block blk, u64 hdl, ice_get_prof(struct ice_hw *hw, enum ice_block blk, u64 hdl,
struct list_head *chg) struct list_head *chg)
{ {
int status = 0;
struct ice_prof_map *map; struct ice_prof_map *map;
struct ice_chs_chg *p; struct ice_chs_chg *p;
int status = 0;
u16 i; u16 i;
mutex_lock(&hw->blk[blk].es.prof_map_lock); mutex_lock(&hw->blk[blk].es.prof_map_lock);
...@@ -5115,9 +5108,9 @@ static int ...@@ -5115,9 +5108,9 @@ static int
ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk, ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
struct list_head *lst, u64 hdl) struct list_head *lst, u64 hdl)
{ {
int status = 0;
struct ice_prof_map *map; struct ice_prof_map *map;
struct ice_vsig_prof *p; struct ice_vsig_prof *p;
int status = 0;
u16 i; u16 i;
mutex_lock(&hw->blk[blk].es.prof_map_lock); mutex_lock(&hw->blk[blk].es.prof_map_lock);
...@@ -5162,9 +5155,9 @@ static int ...@@ -5162,9 +5155,9 @@ static int
ice_move_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig, ice_move_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig,
struct list_head *chg) struct list_head *chg)
{ {
int status;
struct ice_chs_chg *p; struct ice_chs_chg *p;
u16 orig_vsig; u16 orig_vsig;
int status;
p = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*p), GFP_KERNEL); p = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
...@@ -5223,8 +5216,8 @@ ice_prof_tcam_ena_dis(struct ice_hw *hw, enum ice_block blk, bool enable, ...@@ -5223,8 +5216,8 @@ ice_prof_tcam_ena_dis(struct ice_hw *hw, enum ice_block blk, bool enable,
u16 vsig, struct ice_tcam_inf *tcam, u16 vsig, struct ice_tcam_inf *tcam,
struct list_head *chg) struct list_head *chg)
{ {
int status;
struct ice_chs_chg *p; struct ice_chs_chg *p;
int status;
u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
u8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0x00, 0x00, 0x00 }; u8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0x00, 0x00, 0x00 };
...@@ -5370,11 +5363,11 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl, ...@@ -5370,11 +5363,11 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; u8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
u8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0x00, 0x00, 0x00 }; u8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0x00, 0x00, 0x00 };
u8 nm_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x00, 0x00, 0x00, 0x00, 0x00 }; u8 nm_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
int status = 0;
struct ice_prof_map *map; struct ice_prof_map *map;
struct ice_vsig_prof *t; struct ice_vsig_prof *t;
struct ice_chs_chg *p; struct ice_chs_chg *p;
u16 vsig_idx, i; u16 vsig_idx, i;
int status = 0;
/* Error, if this VSIG already has this profile */ /* Error, if this VSIG already has this profile */
if (ice_has_prof_vsig(hw, blk, vsig, hdl)) if (ice_has_prof_vsig(hw, blk, vsig, hdl))
...@@ -5478,9 +5471,9 @@ static int ...@@ -5478,9 +5471,9 @@ static int
ice_create_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl, ice_create_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl,
struct list_head *chg) struct list_head *chg)
{ {
int status;
struct ice_chs_chg *p; struct ice_chs_chg *p;
u16 new_vsig; u16 new_vsig;
int status;
p = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*p), GFP_KERNEL); p = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
...@@ -5565,8 +5558,8 @@ static bool ...@@ -5565,8 +5558,8 @@ static bool
ice_find_prof_vsig(struct ice_hw *hw, enum ice_block blk, u64 hdl, u16 *vsig) ice_find_prof_vsig(struct ice_hw *hw, enum ice_block blk, u64 hdl, u16 *vsig)
{ {
struct ice_vsig_prof *t; struct ice_vsig_prof *t;
int status;
struct list_head lst; struct list_head lst;
int status;
INIT_LIST_HEAD(&lst); INIT_LIST_HEAD(&lst);
...@@ -5602,8 +5595,8 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl) ...@@ -5602,8 +5595,8 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
struct ice_vsig_prof *tmp1, *del1; struct ice_vsig_prof *tmp1, *del1;
struct ice_chs_chg *tmp, *del; struct ice_chs_chg *tmp, *del;
struct list_head union_lst; struct list_head union_lst;
int status;
struct list_head chg; struct list_head chg;
int status;
u16 vsig; u16 vsig;
INIT_LIST_HEAD(&union_lst); INIT_LIST_HEAD(&union_lst);
......
...@@ -118,6 +118,5 @@ void ice_free_seg(struct ice_hw *hw); ...@@ -118,6 +118,5 @@ void ice_free_seg(struct ice_hw *hw);
void ice_fill_blk_tbls(struct ice_hw *hw); void ice_fill_blk_tbls(struct ice_hw *hw);
void ice_clear_hw_tbls(struct ice_hw *hw); void ice_clear_hw_tbls(struct ice_hw *hw);
void ice_free_hw_tbls(struct ice_hw *hw); void ice_free_hw_tbls(struct ice_hw *hw);
int int ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id);
ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id);
#endif /* _ICE_FLEX_PIPE_H_ */ #endif /* _ICE_FLEX_PIPE_H_ */
...@@ -625,8 +625,7 @@ struct ice_flow_prof_params { ...@@ -625,8 +625,7 @@ struct ice_flow_prof_params {
* @segs: array of one or more packet segments that describe the flow * @segs: array of one or more packet segments that describe the flow
* @segs_cnt: number of packet segments provided * @segs_cnt: number of packet segments provided
*/ */
static int static int ice_flow_val_hdrs(struct ice_flow_seg_info *segs, u8 segs_cnt)
ice_flow_val_hdrs(struct ice_flow_seg_info *segs, u8 segs_cnt)
{ {
u8 i; u8 i;
...@@ -700,8 +699,7 @@ static u16 ice_flow_calc_seg_sz(struct ice_flow_prof_params *params, u8 seg) ...@@ -700,8 +699,7 @@ static u16 ice_flow_calc_seg_sz(struct ice_flow_prof_params *params, u8 seg)
* This function identifies the packet types associated with the protocol * This function identifies the packet types associated with the protocol
* headers being present in packet segments of the specified flow profile. * headers being present in packet segments of the specified flow profile.
*/ */
static int static int ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
{ {
struct ice_flow_prof *prof; struct ice_flow_prof *prof;
u8 i; u8 i;
...@@ -1574,8 +1572,7 @@ ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir, ...@@ -1574,8 +1572,7 @@ ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,
* @blk: the block for which the flow profile is to be removed * @blk: the block for which the flow profile is to be removed
* @prof_id: unique ID of the flow profile to be removed * @prof_id: unique ID of the flow profile to be removed
*/ */
int int ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id)
ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id)
{ {
struct ice_flow_prof *prof; struct ice_flow_prof *prof;
int status; int status;
...@@ -1680,8 +1677,7 @@ ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id, ...@@ -1680,8 +1677,7 @@ ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
* @blk: classification stage * @blk: classification stage
* @entry_h: handle to the flow entry to be removed * @entry_h: handle to the flow entry to be removed
*/ */
int ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, int ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_h)
u64 entry_h)
{ {
struct ice_flow_entry *entry; struct ice_flow_entry *entry;
struct ice_flow_prof *prof; struct ice_flow_prof *prof;
...@@ -2279,8 +2275,7 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, ...@@ -2279,8 +2275,7 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
* message, convert it to ICE-compatible values, and configure RSS flow * message, convert it to ICE-compatible values, and configure RSS flow
* profiles. * profiles.
*/ */
int int ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 avf_hash)
ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 avf_hash)
{ {
int status = 0; int status = 0;
u64 hash_flds; u64 hash_flds;
...@@ -2370,8 +2365,8 @@ ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 avf_hash) ...@@ -2370,8 +2365,8 @@ ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 avf_hash)
*/ */
int ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle) int ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle)
{ {
int status = 0;
struct ice_rss_cfg *r; struct ice_rss_cfg *r;
int status = 0;
if (!ice_is_vsi_valid(hw, vsi_handle)) if (!ice_is_vsi_valid(hw, vsi_handle))
return -EINVAL; return -EINVAL;
......
...@@ -387,14 +387,12 @@ int ...@@ -387,14 +387,12 @@ int
ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir, ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,
u64 prof_id, struct ice_flow_seg_info *segs, u8 segs_cnt, u64 prof_id, struct ice_flow_seg_info *segs, u8 segs_cnt,
struct ice_flow_prof **prof); struct ice_flow_prof **prof);
int int ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id);
ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id);
int int
ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id, ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
u64 entry_id, u16 vsi, enum ice_flow_priority prio, u64 entry_id, u16 vsi, enum ice_flow_priority prio,
void *data, u64 *entry_h); void *data, u64 *entry_h);
int int ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_h);
ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_h);
void void
ice_flow_set_fld(struct ice_flow_seg_info *seg, enum ice_flow_field fld, ice_flow_set_fld(struct ice_flow_seg_info *seg, enum ice_flow_field fld,
u16 val_loc, u16 mask_loc, u16 last_loc, bool range); u16 val_loc, u16 mask_loc, u16 last_loc, bool range);
...@@ -403,8 +401,7 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len, ...@@ -403,8 +401,7 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len,
u16 val_loc, u16 mask_loc); u16 val_loc, u16 mask_loc);
void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle); void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle);
int ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle); int ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle);
int int ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds);
ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds);
int ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle); int ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle);
int int
ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
......
...@@ -109,8 +109,7 @@ ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ...@@ -109,8 +109,7 @@ ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
* @vsi: pointer to VSI struct * @vsi: pointer to VSI struct
* @list: list of filters * @list: list of filters
*/ */
int int ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list)
ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list)
{ {
return ice_add_mac(&vsi->back->hw, list); return ice_add_mac(&vsi->back->hw, list);
} }
...@@ -120,8 +119,7 @@ ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list) ...@@ -120,8 +119,7 @@ ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list)
* @vsi: pointer to VSI struct * @vsi: pointer to VSI struct
* @list: list of filters * @list: list of filters
*/ */
int int ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list)
ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list)
{ {
return ice_remove_mac(&vsi->back->hw, list); return ice_remove_mac(&vsi->back->hw, list);
} }
...@@ -131,8 +129,7 @@ ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list) ...@@ -131,8 +129,7 @@ ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list)
* @vsi: pointer to VSI struct * @vsi: pointer to VSI struct
* @list: list of filters * @list: list of filters
*/ */
static int static int ice_fltr_add_vlan_list(struct ice_vsi *vsi, struct list_head *list)
ice_fltr_add_vlan_list(struct ice_vsi *vsi, struct list_head *list)
{ {
return ice_add_vlan(&vsi->back->hw, list); return ice_add_vlan(&vsi->back->hw, list);
} }
...@@ -153,8 +150,7 @@ ice_fltr_remove_vlan_list(struct ice_vsi *vsi, struct list_head *list) ...@@ -153,8 +150,7 @@ ice_fltr_remove_vlan_list(struct ice_vsi *vsi, struct list_head *list)
* @vsi: pointer to VSI struct * @vsi: pointer to VSI struct
* @list: list of filters * @list: list of filters
*/ */
static int static int ice_fltr_add_eth_list(struct ice_vsi *vsi, struct list_head *list)
ice_fltr_add_eth_list(struct ice_vsi *vsi, struct list_head *list)
{ {
return ice_add_eth_mac(&vsi->back->hw, list); return ice_add_eth_mac(&vsi->back->hw, list);
} }
...@@ -164,8 +160,7 @@ ice_fltr_add_eth_list(struct ice_vsi *vsi, struct list_head *list) ...@@ -164,8 +160,7 @@ ice_fltr_add_eth_list(struct ice_vsi *vsi, struct list_head *list)
* @vsi: pointer to VSI struct * @vsi: pointer to VSI struct
* @list: list of filters * @list: list of filters
*/ */
static int static int ice_fltr_remove_eth_list(struct ice_vsi *vsi, struct list_head *list)
ice_fltr_remove_eth_list(struct ice_vsi *vsi, struct list_head *list)
{ {
return ice_remove_eth_mac(&vsi->back->hw, list); return ice_remove_eth_mac(&vsi->back->hw, list);
} }
...@@ -270,8 +265,8 @@ ice_fltr_prepare_mac(struct ice_vsi *vsi, const u8 *mac, ...@@ -270,8 +265,8 @@ ice_fltr_prepare_mac(struct ice_vsi *vsi, const u8 *mac,
enum ice_sw_fwd_act_type action, enum ice_sw_fwd_act_type action,
int (*mac_action)(struct ice_vsi *, struct list_head *)) int (*mac_action)(struct ice_vsi *, struct list_head *))
{ {
int result;
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
int result;
if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action)) { if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action)) {
ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list);
...@@ -297,8 +292,8 @@ ice_fltr_prepare_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac, ...@@ -297,8 +292,8 @@ ice_fltr_prepare_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
(struct ice_vsi *, struct list_head *)) (struct ice_vsi *, struct list_head *))
{ {
u8 broadcast[ETH_ALEN]; u8 broadcast[ETH_ALEN];
int result;
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
int result;
eth_broadcast_addr(broadcast); eth_broadcast_addr(broadcast);
if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action) || if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action) ||
...@@ -324,8 +319,8 @@ ice_fltr_prepare_vlan(struct ice_vsi *vsi, u16 vlan_id, ...@@ -324,8 +319,8 @@ ice_fltr_prepare_vlan(struct ice_vsi *vsi, u16 vlan_id,
enum ice_sw_fwd_act_type action, enum ice_sw_fwd_act_type action,
int (*vlan_action)(struct ice_vsi *, struct list_head *)) int (*vlan_action)(struct ice_vsi *, struct list_head *))
{ {
int result;
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
int result;
if (ice_fltr_add_vlan_to_list(vsi, &tmp_list, vlan_id, action)) if (ice_fltr_add_vlan_to_list(vsi, &tmp_list, vlan_id, action))
return -ENOMEM; return -ENOMEM;
...@@ -348,8 +343,8 @@ ice_fltr_prepare_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag, ...@@ -348,8 +343,8 @@ ice_fltr_prepare_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
enum ice_sw_fwd_act_type action, enum ice_sw_fwd_act_type action,
int (*eth_action)(struct ice_vsi *, struct list_head *)) int (*eth_action)(struct ice_vsi *, struct list_head *))
{ {
int result;
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
int result;
if (ice_fltr_add_eth_to_list(vsi, &tmp_list, ethertype, flag, action)) if (ice_fltr_add_eth_to_list(vsi, &tmp_list, ethertype, flag, action))
return -ENOMEM; return -ENOMEM;
...@@ -466,8 +461,8 @@ ice_fltr_update_rule_flags(struct ice_hw *hw, u16 rule_id, u16 recipe_id, ...@@ -466,8 +461,8 @@ ice_fltr_update_rule_flags(struct ice_hw *hw, u16 rule_id, u16 recipe_id,
u32 act, u16 type, u16 src, u32 new_flags) u32 act, u16 type, u16 src, u32 new_flags)
{ {
struct ice_aqc_sw_rules_elem *s_rule; struct ice_aqc_sw_rules_elem *s_rule;
int err;
u32 flags_mask; u32 flags_mask;
int err;
s_rule = kzalloc(ICE_SW_RULE_RX_TX_NO_HDR_SIZE, GFP_KERNEL); s_rule = kzalloc(ICE_SW_RULE_RX_TX_NO_HDR_SIZE, GFP_KERNEL);
if (!s_rule) if (!s_rule)
......
...@@ -26,13 +26,11 @@ ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac, ...@@ -26,13 +26,11 @@ ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
int int
ice_fltr_add_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac, ice_fltr_add_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
enum ice_sw_fwd_act_type action); enum ice_sw_fwd_act_type action);
int int ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list);
ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list);
int int
ice_fltr_remove_mac(struct ice_vsi *vsi, const u8 *mac, ice_fltr_remove_mac(struct ice_vsi *vsi, const u8 *mac,
enum ice_sw_fwd_act_type action); enum ice_sw_fwd_act_type action);
int int ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list);
ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list);
int int
ice_fltr_add_vlan(struct ice_vsi *vsi, u16 vid, ice_fltr_add_vlan(struct ice_vsi *vsi, u16 vid,
......
...@@ -40,8 +40,8 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length) ...@@ -40,8 +40,8 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length)
struct device *dev = context->dev; struct device *dev = context->dev;
struct ice_pf *pf = priv->pf; struct ice_pf *pf = priv->pf;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u8 *package_data; u8 *package_data;
int status;
dev_dbg(dev, "Sending PLDM record package data to firmware\n"); dev_dbg(dev, "Sending PLDM record package data to firmware\n");
...@@ -55,8 +55,7 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length) ...@@ -55,8 +55,7 @@ ice_send_package_data(struct pldmfw *context, const u8 *data, u16 length)
if (status) { if (status) {
dev_err(dev, "Failed to send record package data to firmware, err %d aq_err %s\n", dev_err(dev, "Failed to send record package data to firmware, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
NL_SET_ERR_MSG_MOD(extack, "Failed to record package data to firmware"); NL_SET_ERR_MSG_MOD(extack, "Failed to record package data to firmware");
return -EIO; return -EIO;
} }
...@@ -203,8 +202,8 @@ ice_send_component_table(struct pldmfw *context, struct pldmfw_component *compon ...@@ -203,8 +202,8 @@ ice_send_component_table(struct pldmfw *context, struct pldmfw_component *compon
struct device *dev = context->dev; struct device *dev = context->dev;
struct ice_pf *pf = priv->pf; struct ice_pf *pf = priv->pf;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
size_t length; size_t length;
int status;
switch (component->identifier) { switch (component->identifier) {
case NVM_COMP_ID_OROM: case NVM_COMP_ID_OROM:
...@@ -241,8 +240,7 @@ ice_send_component_table(struct pldmfw *context, struct pldmfw_component *compon ...@@ -241,8 +240,7 @@ ice_send_component_table(struct pldmfw *context, struct pldmfw_component *compon
if (status) { if (status) {
dev_err(dev, "Failed to transfer component table to firmware, err %d aq_err %s\n", dev_err(dev, "Failed to transfer component table to firmware, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
NL_SET_ERR_MSG_MOD(extack, "Failed to transfer component table to firmware"); NL_SET_ERR_MSG_MOD(extack, "Failed to transfer component table to firmware");
return -EIO; return -EIO;
} }
...@@ -277,8 +275,8 @@ ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset, ...@@ -277,8 +275,8 @@ ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_rq_event_info event; struct ice_rq_event_info event;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u32 completion_offset; u32 completion_offset;
int status;
int err; int err;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
...@@ -524,8 +522,8 @@ static int ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, ...@@ -524,8 +522,8 @@ static int ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags,
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_rq_event_info event; struct ice_rq_event_info event;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u16 completion_retval; u16 completion_retval;
int status;
int err; int err;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
...@@ -533,8 +531,7 @@ static int ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags, ...@@ -533,8 +531,7 @@ static int ice_switch_flash_banks(struct ice_pf *pf, u8 activate_flags,
status = ice_nvm_write_activate(hw, activate_flags); status = ice_nvm_write_activate(hw, activate_flags);
if (status) { if (status) {
dev_err(dev, "Failed to switch active flash banks, err %d aq_err %s\n", dev_err(dev, "Failed to switch active flash banks, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
NL_SET_ERR_MSG_MOD(extack, "Failed to switch active flash banks"); NL_SET_ERR_MSG_MOD(extack, "Failed to switch active flash banks");
return -EIO; return -EIO;
} }
...@@ -695,8 +692,7 @@ int ice_flash_pldm_image(struct ice_pf *pf, const struct firmware *fw, ...@@ -695,8 +692,7 @@ int ice_flash_pldm_image(struct ice_pf *pf, const struct firmware *fw,
status = ice_acquire_nvm(hw, ICE_RES_WRITE); status = ice_acquire_nvm(hw, ICE_RES_WRITE);
if (status) { if (status) {
dev_err(dev, "Failed to acquire device flash lock, err %d aq_err %s\n", dev_err(dev, "Failed to acquire device flash lock, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
NL_SET_ERR_MSG_MOD(extack, "Failed to acquire device flash lock"); NL_SET_ERR_MSG_MOD(extack, "Failed to acquire device flash lock");
return -EIO; return -EIO;
} }
...@@ -736,8 +732,8 @@ int ice_check_for_pending_update(struct ice_pf *pf, const char *component, ...@@ -736,8 +732,8 @@ int ice_check_for_pending_update(struct ice_pf *pf, const char *component,
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_hw_dev_caps *dev_caps; struct ice_hw_dev_caps *dev_caps;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u8 pending = 0; u8 pending = 0;
int status;
int err; int err;
dev_caps = kzalloc(sizeof(*dev_caps), GFP_KERNEL); dev_caps = kzalloc(sizeof(*dev_caps), GFP_KERNEL);
......
...@@ -1545,8 +1545,8 @@ int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi) ...@@ -1545,8 +1545,8 @@ int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi)
static void ice_vsi_set_vf_rss_flow_fld(struct ice_vsi *vsi) static void ice_vsi_set_vf_rss_flow_fld(struct ice_vsi *vsi)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
if (ice_is_safe_mode(pf)) { if (ice_is_safe_mode(pf)) {
...@@ -1577,8 +1577,8 @@ static void ice_vsi_set_rss_flow_fld(struct ice_vsi *vsi) ...@@ -1577,8 +1577,8 @@ static void ice_vsi_set_rss_flow_fld(struct ice_vsi *vsi)
u16 vsi_handle = vsi->idx, vsi_num = vsi->vsi_num; u16 vsi_handle = vsi->idx, vsi_num = vsi->vsi_num;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
struct device *dev; struct device *dev;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
if (ice_is_safe_mode(pf)) { if (ice_is_safe_mode(pf)) {
...@@ -1749,9 +1749,9 @@ ice_vsi_add_vlan(struct ice_vsi *vsi, u16 vid, enum ice_sw_fwd_act_type action) ...@@ -1749,9 +1749,9 @@ ice_vsi_add_vlan(struct ice_vsi *vsi, u16 vid, enum ice_sw_fwd_act_type action)
int ice_vsi_kill_vlan(struct ice_vsi *vsi, u16 vid) int ice_vsi_kill_vlan(struct ice_vsi *vsi, u16 vid)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int err = 0; int err = 0;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
...@@ -2105,8 +2105,8 @@ int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi) ...@@ -2105,8 +2105,8 @@ int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi)
{ {
struct ice_hw *hw = &vsi->back->hw; struct ice_hw *hw = &vsi->back->hw;
struct ice_vsi_ctx *ctxt; struct ice_vsi_ctx *ctxt;
int status;
int ret = 0; int ret = 0;
int status;
ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL); ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
if (!ctxt) if (!ctxt)
...@@ -2326,8 +2326,7 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena) ...@@ -2326,8 +2326,7 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena)
if (status) { if (status) {
netdev_err(vsi->netdev, "%sabling VLAN pruning on VSI handle: %d, VSI HW ID: %d failed, err = %d, aq_err = %s\n", 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, ena ? "En" : "Dis", vsi->idx, vsi->vsi_num,
status, status, ice_aq_str(pf->hw.adminq.sq_last_status));
ice_aq_str(pf->hw.adminq.sq_last_status));
goto err_out; goto err_out;
} }
...@@ -2408,8 +2407,8 @@ void ice_cfg_sw_lldp(struct ice_vsi *vsi, bool tx, bool create) ...@@ -2408,8 +2407,8 @@ void ice_cfg_sw_lldp(struct ice_vsi *vsi, bool tx, bool create)
int (*eth_fltr)(struct ice_vsi *v, u16 type, u16 flag, int (*eth_fltr)(struct ice_vsi *v, u16 type, u16 flag,
enum ice_sw_fwd_act_type act); enum ice_sw_fwd_act_type act);
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
eth_fltr = create ? ice_fltr_add_eth : ice_fltr_remove_eth; eth_fltr = create ? ice_fltr_add_eth : ice_fltr_remove_eth;
...@@ -2576,9 +2575,9 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi, ...@@ -2576,9 +2575,9 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,
{ {
u16 max_txqs[ICE_MAX_TRAFFIC_CLASS] = { 0 }; u16 max_txqs[ICE_MAX_TRAFFIC_CLASS] = { 0 };
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
int status;
struct ice_vsi *vsi; struct ice_vsi *vsi;
int ret, i; int ret, i;
int status;
if (vsi_type == ICE_VSI_CHNL) if (vsi_type == ICE_VSI_CHNL)
vsi = ice_vsi_alloc(pf, vsi_type, ch, ICE_INVAL_VFID); vsi = ice_vsi_alloc(pf, vsi_type, ch, ICE_INVAL_VFID);
...@@ -3036,8 +3035,8 @@ void ice_napi_del(struct ice_vsi *vsi) ...@@ -3036,8 +3035,8 @@ void ice_napi_del(struct ice_vsi *vsi)
*/ */
int ice_vsi_release(struct ice_vsi *vsi) int ice_vsi_release(struct ice_vsi *vsi)
{ {
int err;
struct ice_pf *pf; struct ice_pf *pf;
int err;
if (!vsi->back) if (!vsi->back)
return -ENODEV; return -ENODEV;
...@@ -3273,9 +3272,9 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi) ...@@ -3273,9 +3272,9 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
int prev_num_q_vectors = 0; int prev_num_q_vectors = 0;
struct ice_vf *vf = NULL; struct ice_vf *vf = NULL;
enum ice_vsi_type vtype; enum ice_vsi_type vtype;
int status;
struct ice_pf *pf; struct ice_pf *pf;
int ret, i; int ret, i;
int status;
if (!vsi) if (!vsi)
return -EINVAL; return -EINVAL;
...@@ -3663,10 +3662,10 @@ int ice_vsi_cfg_tc(struct ice_vsi *vsi, u8 ena_tc) ...@@ -3663,10 +3662,10 @@ int ice_vsi_cfg_tc(struct ice_vsi *vsi, u8 ena_tc)
u16 max_txqs[ICE_MAX_TRAFFIC_CLASS] = { 0 }; u16 max_txqs[ICE_MAX_TRAFFIC_CLASS] = { 0 };
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_vsi_ctx *ctx; struct ice_vsi_ctx *ctx;
int status;
struct device *dev; struct device *dev;
int i, ret = 0; int i, ret = 0;
u8 num_tc = 0; u8 num_tc = 0;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
if (vsi->tc_cfg.ena_tc == ena_tc && if (vsi->tc_cfg.ena_tc == ena_tc &&
...@@ -3816,8 +3815,8 @@ bool ice_is_vsi_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi) ...@@ -3816,8 +3815,8 @@ bool ice_is_vsi_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi)
*/ */
int ice_set_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi) int ice_set_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi)
{ {
int status;
struct device *dev; struct device *dev;
int status;
if (!sw || !vsi) if (!sw || !vsi)
return -EINVAL; return -EINVAL;
...@@ -3862,8 +3861,8 @@ int ice_set_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi) ...@@ -3862,8 +3861,8 @@ int ice_set_dflt_vsi(struct ice_sw *sw, struct ice_vsi *vsi)
int ice_clear_dflt_vsi(struct ice_sw *sw) int ice_clear_dflt_vsi(struct ice_sw *sw)
{ {
struct ice_vsi *dflt_vsi; struct ice_vsi *dflt_vsi;
int status;
struct device *dev; struct device *dev;
int status;
if (!sw) if (!sw)
return -EINVAL; return -EINVAL;
...@@ -3954,8 +3953,8 @@ int ice_get_link_speed_kbps(struct ice_vsi *vsi) ...@@ -3954,8 +3953,8 @@ int ice_get_link_speed_kbps(struct ice_vsi *vsi)
int ice_set_min_bw_limit(struct ice_vsi *vsi, u64 min_tx_rate) int ice_set_min_bw_limit(struct ice_vsi *vsi, u64 min_tx_rate)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int status;
int speed; int speed;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
...@@ -4015,8 +4014,8 @@ int ice_set_min_bw_limit(struct ice_vsi *vsi, u64 min_tx_rate) ...@@ -4015,8 +4014,8 @@ int ice_set_min_bw_limit(struct ice_vsi *vsi, u64 min_tx_rate)
int ice_set_max_bw_limit(struct ice_vsi *vsi, u64 max_tx_rate) int ice_set_max_bw_limit(struct ice_vsi *vsi, u64 max_tx_rate)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int status;
int speed; int speed;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
......
...@@ -107,8 +107,7 @@ void ice_write_intrl(struct ice_q_vector *q_vector, u8 intrl); ...@@ -107,8 +107,7 @@ void ice_write_intrl(struct ice_q_vector *q_vector, u8 intrl);
void ice_write_itr(struct ice_ring_container *rc, u16 itr); void ice_write_itr(struct ice_ring_container *rc, u16 itr);
void ice_set_q_vector_intrl(struct ice_q_vector *q_vector); void ice_set_q_vector_intrl(struct ice_q_vector *q_vector);
int int ice_vsi_cfg_mac_fltr(struct ice_vsi *vsi, const u8 *macaddr, bool set);
ice_vsi_cfg_mac_fltr(struct ice_vsi *vsi, const u8 *macaddr, bool set);
bool ice_is_safe_mode(struct ice_pf *pf); bool ice_is_safe_mode(struct ice_pf *pf);
bool ice_is_aux_ena(struct ice_pf *pf); bool ice_is_aux_ena(struct ice_pf *pf);
......
...@@ -155,9 +155,9 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf) ...@@ -155,9 +155,9 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf)
*/ */
static int ice_init_mac_fltr(struct ice_pf *pf) static int ice_init_mac_fltr(struct ice_pf *pf)
{ {
int status;
struct ice_vsi *vsi; struct ice_vsi *vsi;
u8 *perm_addr; u8 *perm_addr;
int status;
vsi = ice_get_main_vsi(pf); vsi = ice_get_main_vsi(pf);
if (!vsi) if (!vsi)
...@@ -295,8 +295,8 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) ...@@ -295,8 +295,8 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
bool promisc_forced_on = false; bool promisc_forced_on = false;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status = 0;
u32 changed_flags = 0; u32 changed_flags = 0;
int status = 0;
u8 promisc_m; u8 promisc_m;
int err = 0; int err = 0;
...@@ -708,12 +708,12 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup) ...@@ -708,12 +708,12 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup)
{ {
struct ice_aqc_get_phy_caps_data *caps; struct ice_aqc_get_phy_caps_data *caps;
const char *an_advertised; const char *an_advertised;
int status;
const char *fec_req; const char *fec_req;
const char *speed; const char *speed;
const char *fec; const char *fec;
const char *fc; const char *fc;
const char *an; const char *an;
int status;
if (!vsi) if (!vsi)
return; return;
...@@ -1033,10 +1033,10 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up, ...@@ -1033,10 +1033,10 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
{ {
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_phy_info *phy_info; struct ice_phy_info *phy_info;
int status;
struct ice_vsi *vsi; struct ice_vsi *vsi;
u16 old_link_speed; u16 old_link_speed;
bool old_link; bool old_link;
int status;
phy_info = &pi->phy; phy_info = &pi->phy;
phy_info->link_info_old = phy_info->link_info; phy_info->link_info_old = phy_info->link_info;
...@@ -1420,8 +1420,8 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type) ...@@ -1420,8 +1420,8 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
return 0; return 0;
do { do {
int ret;
u16 opcode; u16 opcode;
int ret;
ret = ice_clean_rq_elem(hw, cq, &event, &pending); ret = ice_clean_rq_elem(hw, cq, &event, &pending);
if (ret == -EALREADY) if (ret == -EALREADY)
...@@ -1879,8 +1879,8 @@ static int ice_init_nvm_phy_type(struct ice_port_info *pi) ...@@ -1879,8 +1879,8 @@ static int ice_init_nvm_phy_type(struct ice_port_info *pi)
{ {
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
struct ice_pf *pf = pi->hw->back; struct ice_pf *pf = pi->hw->back;
int status;
int err = 0; int err = 0;
int status;
pcaps = kzalloc(sizeof(*pcaps), GFP_KERNEL); pcaps = kzalloc(sizeof(*pcaps), GFP_KERNEL);
if (!pcaps) if (!pcaps)
...@@ -1990,8 +1990,8 @@ static int ice_init_phy_user_cfg(struct ice_port_info *pi) ...@@ -1990,8 +1990,8 @@ static int ice_init_phy_user_cfg(struct ice_port_info *pi)
struct ice_aqc_get_phy_caps_data *pcaps; struct ice_aqc_get_phy_caps_data *pcaps;
struct ice_phy_info *phy = &pi->phy; struct ice_phy_info *phy = &pi->phy;
struct ice_pf *pf = pi->hw->back; struct ice_pf *pf = pi->hw->back;
int status;
int err = 0; int err = 0;
int status;
if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE)) if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE))
return -EIO; return -EIO;
...@@ -2062,8 +2062,8 @@ static int ice_configure_phy(struct ice_vsi *vsi) ...@@ -2062,8 +2062,8 @@ static int ice_configure_phy(struct ice_vsi *vsi)
struct ice_aqc_set_phy_cfg_data *cfg; struct ice_aqc_set_phy_cfg_data *cfg;
struct ice_phy_info *phy = &pi->phy; struct ice_phy_info *phy = &pi->phy;
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
int err = 0; int err = 0;
int status;
/* Ensure we have media as we cannot configure a medialess port */ /* Ensure we have media as we cannot configure a medialess port */
if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE)) if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE))
...@@ -2562,9 +2562,9 @@ int ice_prepare_xdp_rings(struct ice_vsi *vsi, struct bpf_prog *prog) ...@@ -2562,9 +2562,9 @@ int ice_prepare_xdp_rings(struct ice_vsi *vsi, struct bpf_prog *prog)
.vsi_map_offset = vsi->alloc_txq, .vsi_map_offset = vsi->alloc_txq,
.mapping_mode = ICE_VSI_MAP_CONTIG .mapping_mode = ICE_VSI_MAP_CONTIG
}; };
int status;
struct device *dev; struct device *dev;
int i, v_idx; int i, v_idx;
int status;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
vsi->xdp_rings = devm_kcalloc(dev, vsi->num_xdp_txq, vsi->xdp_rings = devm_kcalloc(dev, vsi->num_xdp_txq,
...@@ -4036,8 +4036,8 @@ static void ice_set_safe_mode_vlan_cfg(struct ice_pf *pf) ...@@ -4036,8 +4036,8 @@ static void ice_set_safe_mode_vlan_cfg(struct ice_pf *pf)
{ {
struct ice_vsi *vsi = ice_get_main_vsi(pf); struct ice_vsi *vsi = ice_get_main_vsi(pf);
struct ice_vsi_ctx *ctxt; struct ice_vsi_ctx *ctxt;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
if (!vsi) if (!vsi)
return; return;
...@@ -4068,8 +4068,7 @@ static void ice_set_safe_mode_vlan_cfg(struct ice_pf *pf) ...@@ -4068,8 +4068,7 @@ static void ice_set_safe_mode_vlan_cfg(struct ice_pf *pf)
status = ice_update_vsi(hw, vsi->idx, ctxt, NULL); status = ice_update_vsi(hw, vsi->idx, ctxt, NULL);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "Failed to update VSI for safe mode VLANs, err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "Failed to update VSI for safe mode VLANs, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
} else { } else {
vsi->info.sec_flags = ctxt->info.sec_flags; vsi->info.sec_flags = ctxt->info.sec_flags;
vsi->info.sw_flags2 = ctxt->info.sw_flags2; vsi->info.sw_flags2 = ctxt->info.sw_flags2;
...@@ -4792,9 +4791,9 @@ static void ice_setup_mc_magic_wake(struct ice_pf *pf) ...@@ -4792,9 +4791,9 @@ static void ice_setup_mc_magic_wake(struct ice_pf *pf)
{ {
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
struct ice_vsi *vsi; struct ice_vsi *vsi;
int status;
u8 flags; u8 flags;
if (!pf->wol_ena) if (!pf->wol_ena)
...@@ -4817,8 +4816,7 @@ static void ice_setup_mc_magic_wake(struct ice_pf *pf) ...@@ -4817,8 +4816,7 @@ static void ice_setup_mc_magic_wake(struct ice_pf *pf)
status = ice_aq_manage_mac_write(hw, mac_addr, flags, NULL); status = ice_aq_manage_mac_write(hw, mac_addr, flags, NULL);
if (status) if (status)
dev_err(dev, "Failed to enable Multicast Magic Packet wake, err %d aq_err %s\n", dev_err(dev, "Failed to enable Multicast Magic Packet wake, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
} }
/** /**
...@@ -5357,10 +5355,10 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi) ...@@ -5357,10 +5355,10 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
struct sockaddr *addr = pi; struct sockaddr *addr = pi;
int status;
u8 old_mac[ETH_ALEN]; u8 old_mac[ETH_ALEN];
u8 flags = 0; u8 flags = 0;
int err = 0; int err = 0;
int status;
u8 *mac; u8 *mac;
mac = (u8 *)addr->sa_data; mac = (u8 *)addr->sa_data;
...@@ -5472,8 +5470,8 @@ ice_set_tx_maxrate(struct net_device *netdev, int queue_index, u32 maxrate) ...@@ -5472,8 +5470,8 @@ ice_set_tx_maxrate(struct net_device *netdev, int queue_index, u32 maxrate)
{ {
struct ice_netdev_priv *np = netdev_priv(netdev); struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi; struct ice_vsi *vsi = np->vsi;
int status;
u16 q_handle; u16 q_handle;
int status;
u8 tc; u8 tc;
/* Validate maxrate requested is within permitted range */ /* Validate maxrate requested is within permitted range */
...@@ -6554,8 +6552,7 @@ static int ice_vsi_rebuild_by_type(struct ice_pf *pf, enum ice_vsi_type type) ...@@ -6554,8 +6552,7 @@ static int ice_vsi_rebuild_by_type(struct ice_pf *pf, enum ice_vsi_type type)
status = ice_replay_vsi(&pf->hw, vsi->idx); status = ice_replay_vsi(&pf->hw, vsi->idx);
if (status) { if (status) {
dev_err(dev, "replay VSI failed, error %d, VSI index %d, type %s\n", dev_err(dev, "replay VSI failed, error %d, VSI index %d, type %s\n",
status, vsi->idx, status, vsi->idx, ice_vsi_type_str(type));
ice_vsi_type_str(type));
return -EIO; return -EIO;
} }
...@@ -6629,8 +6626,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -6629,8 +6626,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
ret = ice_init_all_ctrlq(hw); ret = ice_init_all_ctrlq(hw);
if (ret) { if (ret) {
dev_err(dev, "control queues init failed %d\n", dev_err(dev, "control queues init failed %d\n", ret);
ret);
goto err_init_ctrlq; goto err_init_ctrlq;
} }
...@@ -6646,8 +6642,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -6646,8 +6642,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
ret = ice_clear_pf_cfg(hw); ret = ice_clear_pf_cfg(hw);
if (ret) { if (ret) {
dev_err(dev, "clear PF configuration failed %d\n", dev_err(dev, "clear PF configuration failed %d\n", ret);
ret);
goto err_init_ctrlq; goto err_init_ctrlq;
} }
...@@ -6964,8 +6959,7 @@ int ice_set_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size) ...@@ -6964,8 +6959,7 @@ int ice_set_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size)
status = ice_aq_set_rss_lut(hw, &params); status = ice_aq_set_rss_lut(hw, &params);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS lut, err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS lut, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
return -EIO; return -EIO;
} }
...@@ -6990,8 +6984,7 @@ int ice_set_rss_key(struct ice_vsi *vsi, u8 *seed) ...@@ -6990,8 +6984,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); status = ice_aq_set_rss_key(hw, vsi->idx, (struct ice_aqc_get_set_rss_keys *)seed);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS key, err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "Cannot set RSS key, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
return -EIO; return -EIO;
} }
...@@ -7023,8 +7016,7 @@ int ice_get_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size) ...@@ -7023,8 +7016,7 @@ int ice_get_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size)
status = ice_aq_get_rss_lut(hw, &params); status = ice_aq_get_rss_lut(hw, &params);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS lut, err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS lut, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
return -EIO; return -EIO;
} }
...@@ -7049,8 +7041,7 @@ int ice_get_rss_key(struct ice_vsi *vsi, u8 *seed) ...@@ -7049,8 +7041,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); status = ice_aq_get_rss_key(hw, vsi->idx, (struct ice_aqc_get_set_rss_keys *)seed);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS key, err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "Cannot get RSS key, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
return -EIO; return -EIO;
} }
...@@ -7095,8 +7086,8 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode) ...@@ -7095,8 +7086,8 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode)
struct ice_aqc_vsi_props *vsi_props; struct ice_aqc_vsi_props *vsi_props;
struct ice_hw *hw = &vsi->back->hw; struct ice_hw *hw = &vsi->back->hw;
struct ice_vsi_ctx *ctxt; struct ice_vsi_ctx *ctxt;
int status;
int ret = 0; int ret = 0;
int status;
vsi_props = &vsi->info; vsi_props = &vsi->info;
...@@ -7117,8 +7108,7 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode) ...@@ -7117,8 +7108,7 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode)
status = ice_update_vsi(hw, vsi->idx, ctxt, NULL); status = ice_update_vsi(hw, vsi->idx, ctxt, NULL);
if (status) { if (status) {
dev_err(ice_pf_to_dev(vsi->back), "update VSI for bridge mode failed, bmode = %d err %d aq_err %s\n", dev_err(ice_pf_to_dev(vsi->back), "update VSI for bridge mode failed, bmode = %d err %d aq_err %s\n",
bmode, status, bmode, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
ret = -EIO; ret = -EIO;
goto out; goto out;
} }
...@@ -7151,9 +7141,9 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, ...@@ -7151,9 +7141,9 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
struct ice_pf *pf = np->vsi->back; struct ice_pf *pf = np->vsi->back;
struct nlattr *attr, *br_spec; struct nlattr *attr, *br_spec;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
int status;
struct ice_sw *pf_sw; struct ice_sw *pf_sw;
int rem, v, err = 0; int rem, v, err = 0;
int status;
pf_sw = pf->first_sw; pf_sw = pf->first_sw;
/* find the attribute in the netlink message */ /* find the attribute in the netlink message */
......
...@@ -64,10 +64,10 @@ int ...@@ -64,10 +64,10 @@ int
ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
bool read_shadow_ram) bool read_shadow_ram)
{ {
int status;
u32 inlen = *length; u32 inlen = *length;
u32 bytes_read = 0; u32 bytes_read = 0;
bool last_cmd; bool last_cmd;
int status;
*length = 0; *length = 0;
...@@ -158,8 +158,7 @@ ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, ...@@ -158,8 +158,7 @@ ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset,
* *
* Erase the NVM sector using the admin queue commands (0x0702) * Erase the NVM sector using the admin queue commands (0x0702)
*/ */
int int ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd)
ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd)
{ {
struct ice_aq_desc desc; struct ice_aq_desc desc;
struct ice_aqc_nvm *cmd; struct ice_aqc_nvm *cmd;
...@@ -184,12 +183,11 @@ ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd) ...@@ -184,12 +183,11 @@ ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd)
* *
* Reads one 16 bit word from the Shadow RAM using ice_read_flat_nvm. * Reads one 16 bit word from the Shadow RAM using ice_read_flat_nvm.
*/ */
static int static int ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
{ {
u32 bytes = sizeof(u16); u32 bytes = sizeof(u16);
int status;
__le16 data_local; __le16 data_local;
int status;
/* Note that ice_read_flat_nvm takes into account the 4Kb AdminQ and /* Note that ice_read_flat_nvm takes into account the 4Kb AdminQ and
* Shadow RAM sector restrictions necessary when reading from the NVM. * Shadow RAM sector restrictions necessary when reading from the NVM.
...@@ -210,8 +208,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data) ...@@ -210,8 +208,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
* *
* This function will request NVM ownership. * This function will request NVM ownership.
*/ */
int int ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access)
ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access)
{ {
if (hw->flash.blank_nvm_mode) if (hw->flash.blank_nvm_mode)
return 0; return 0;
...@@ -356,8 +353,8 @@ ice_read_flash_module(struct ice_hw *hw, enum ice_bank_select bank, u16 module, ...@@ -356,8 +353,8 @@ ice_read_flash_module(struct ice_hw *hw, enum ice_bank_select bank, u16 module,
static int static int
ice_read_nvm_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data) ice_read_nvm_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
{ {
int status;
__le16 data_local; __le16 data_local;
int status;
status = ice_read_flash_module(hw, bank, ICE_SR_1ST_NVM_BANK_PTR, offset * sizeof(u16), status = ice_read_flash_module(hw, bank, ICE_SR_1ST_NVM_BANK_PTR, offset * sizeof(u16),
(__force u8 *)&data_local, sizeof(u16)); (__force u8 *)&data_local, sizeof(u16));
...@@ -395,8 +392,8 @@ ice_read_nvm_sr_copy(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u ...@@ -395,8 +392,8 @@ ice_read_nvm_sr_copy(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u
static int static int
ice_read_netlist_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data) ice_read_netlist_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
{ {
int status;
__le16 data_local; __le16 data_local;
int status;
status = ice_read_flash_module(hw, bank, ICE_SR_NETLIST_BANK_PTR, offset * sizeof(u16), status = ice_read_flash_module(hw, bank, ICE_SR_NETLIST_BANK_PTR, offset * sizeof(u16),
(__force u8 *)&data_local, sizeof(u16)); (__force u8 *)&data_local, sizeof(u16));
...@@ -442,9 +439,9 @@ int ...@@ -442,9 +439,9 @@ int
ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
u16 module_type) u16 module_type)
{ {
int status;
u16 pfa_len, pfa_ptr; u16 pfa_len, pfa_ptr;
u16 next_tlv; u16 next_tlv;
int status;
status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr); status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
if (status) { if (status) {
...@@ -501,12 +498,11 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, ...@@ -501,12 +498,11 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
* *
* Reads the part number string from the NVM. * Reads the part number string from the NVM.
*/ */
int int ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size)
ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size)
{ {
u16 pba_tlv, pba_tlv_len; u16 pba_tlv, pba_tlv_len;
int status;
u16 pba_word, pba_size; u16 pba_word, pba_size;
int status;
u16 i; u16 i;
status = ice_get_pfa_module_tlv(hw, &pba_tlv, &pba_tlv_len, status = ice_get_pfa_module_tlv(hw, &pba_tlv, &pba_tlv_len,
...@@ -673,8 +669,8 @@ static int ...@@ -673,8 +669,8 @@ static int
ice_get_orom_ver_info(struct ice_hw *hw, enum ice_bank_select bank, struct ice_orom_info *orom) ice_get_orom_ver_info(struct ice_hw *hw, enum ice_bank_select bank, struct ice_orom_info *orom)
{ {
struct ice_orom_civd_info civd; struct ice_orom_civd_info civd;
int status;
u32 combo_ver; u32 combo_ver;
int status;
status = ice_get_orom_civd_data(hw, bank, &civd); status = ice_get_orom_civd_data(hw, bank, &civd);
if (status) { if (status) {
...@@ -720,8 +716,8 @@ ice_get_netlist_info(struct ice_hw *hw, enum ice_bank_select bank, ...@@ -720,8 +716,8 @@ ice_get_netlist_info(struct ice_hw *hw, enum ice_bank_select bank,
struct ice_netlist_info *netlist) struct ice_netlist_info *netlist)
{ {
u16 module_id, length, node_count, i; u16 module_id, length, node_count, i;
int status;
u16 *id_blk; u16 *id_blk;
int status;
status = ice_read_netlist_module(hw, bank, ICE_NETLIST_TYPE_OFFSET, &module_id); status = ice_read_netlist_module(hw, bank, ICE_NETLIST_TYPE_OFFSET, &module_id);
if (status) if (status)
...@@ -859,8 +855,7 @@ static int ice_discover_flash_size(struct ice_hw *hw) ...@@ -859,8 +855,7 @@ static int ice_discover_flash_size(struct ice_hw *hw)
* sector size by using the highest bit. The reported pointer value will be in * sector size by using the highest bit. The reported pointer value will be in
* bytes, intended for flat NVM reads. * bytes, intended for flat NVM reads.
*/ */
static int static int ice_read_sr_pointer(struct ice_hw *hw, u16 offset, u32 *pointer)
ice_read_sr_pointer(struct ice_hw *hw, u16 offset, u32 *pointer)
{ {
int status; int status;
u16 value; u16 value;
...@@ -891,8 +886,7 @@ ice_read_sr_pointer(struct ice_hw *hw, u16 offset, u32 *pointer) ...@@ -891,8 +886,7 @@ ice_read_sr_pointer(struct ice_hw *hw, u16 offset, u32 *pointer)
* Each area size word is specified in 4KB sector units. This function reports * Each area size word is specified in 4KB sector units. This function reports
* the size in bytes, intended for flat NVM reads. * the size in bytes, intended for flat NVM reads.
*/ */
static int static int ice_read_sr_area_size(struct ice_hw *hw, u16 offset, u32 *size)
ice_read_sr_area_size(struct ice_hw *hw, u16 offset, u32 *size)
{ {
int status; int status;
u16 value; u16 value;
...@@ -917,12 +911,11 @@ ice_read_sr_area_size(struct ice_hw *hw, u16 offset, u32 *size) ...@@ -917,12 +911,11 @@ ice_read_sr_area_size(struct ice_hw *hw, u16 offset, u32 *size)
* structure for later use in order to calculate the correct offset to read * structure for later use in order to calculate the correct offset to read
* from the active module. * from the active module.
*/ */
static int static int ice_determine_active_flash_banks(struct ice_hw *hw)
ice_determine_active_flash_banks(struct ice_hw *hw)
{ {
struct ice_bank_info *banks = &hw->flash.banks; struct ice_bank_info *banks = &hw->flash.banks;
int status;
u16 ctrl_word; u16 ctrl_word;
int status;
status = ice_read_sr_word(hw, ICE_SR_NVM_CTRL_WORD, &ctrl_word); status = ice_read_sr_word(hw, ICE_SR_NVM_CTRL_WORD, &ctrl_word);
if (status) { if (status) {
...@@ -1000,9 +993,9 @@ ice_determine_active_flash_banks(struct ice_hw *hw) ...@@ -1000,9 +993,9 @@ ice_determine_active_flash_banks(struct ice_hw *hw)
int ice_init_nvm(struct ice_hw *hw) int ice_init_nvm(struct ice_hw *hw)
{ {
struct ice_flash_info *flash = &hw->flash; struct ice_flash_info *flash = &hw->flash;
int status;
u32 fla, gens_stat; u32 fla, gens_stat;
u8 sr_size; u8 sr_size;
int status;
/* The SR size is stored regardless of the NVM programming mode /* The SR size is stored regardless of the NVM programming mode
* as the blank mode may be used in the factory line. * as the blank mode may be used in the factory line.
......
...@@ -12,8 +12,7 @@ struct ice_orom_civd_info { ...@@ -12,8 +12,7 @@ struct ice_orom_civd_info {
__le16 combo_name[32]; /* Unicode string representing the Combo Image version */ __le16 combo_name[32]; /* Unicode string representing the Combo Image version */
} __packed; } __packed;
int int ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
void ice_release_nvm(struct ice_hw *hw); void ice_release_nvm(struct ice_hw *hw);
int int
ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
...@@ -21,14 +20,11 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, ...@@ -21,14 +20,11 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
int int
ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
u16 module_type); u16 module_type);
int int ice_get_inactive_orom_ver(struct ice_hw *hw, struct ice_orom_info *orom);
ice_get_inactive_orom_ver(struct ice_hw *hw, struct ice_orom_info *orom); int ice_get_inactive_nvm_ver(struct ice_hw *hw, struct ice_nvm_info *nvm);
int
ice_get_inactive_nvm_ver(struct ice_hw *hw, struct ice_nvm_info *nvm);
int int
ice_get_inactive_netlist_ver(struct ice_hw *hw, struct ice_netlist_info *netlist); ice_get_inactive_netlist_ver(struct ice_hw *hw, struct ice_netlist_info *netlist);
int int ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size);
ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size);
int ice_init_nvm(struct ice_hw *hw); int ice_init_nvm(struct ice_hw *hw);
int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data);
int int
......
...@@ -152,8 +152,8 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer, ...@@ -152,8 +152,8 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
struct ice_aqc_txsched_elem_data elem; struct ice_aqc_txsched_elem_data elem;
struct ice_sched_node *parent; struct ice_sched_node *parent;
struct ice_sched_node *node; struct ice_sched_node *node;
int status;
struct ice_hw *hw; struct ice_hw *hw;
int status;
if (!pi) if (!pi)
return -EINVAL; return -EINVAL;
...@@ -234,8 +234,8 @@ ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent, ...@@ -234,8 +234,8 @@ ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent,
{ {
struct ice_aqc_delete_elem *buf; struct ice_aqc_delete_elem *buf;
u16 i, num_groups_removed = 0; u16 i, num_groups_removed = 0;
int status;
u16 buf_size; u16 buf_size;
int status;
buf_size = struct_size(buf, teid, num_nodes); buf_size = struct_size(buf, teid, num_nodes);
buf = devm_kzalloc(ice_hw_to_dev(hw), buf_size, GFP_KERNEL); buf = devm_kzalloc(ice_hw_to_dev(hw), buf_size, GFP_KERNEL);
...@@ -525,8 +525,8 @@ ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids, ...@@ -525,8 +525,8 @@ ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids,
bool suspend) bool suspend)
{ {
u16 i, buf_size, num_elem_ret = 0; u16 i, buf_size, num_elem_ret = 0;
int status;
__le32 *buf; __le32 *buf;
int status;
buf_size = sizeof(*buf) * num_nodes; buf_size = sizeof(*buf) * num_nodes;
buf = devm_kzalloc(ice_hw_to_dev(hw), buf_size, GFP_KERNEL); buf = devm_kzalloc(ice_hw_to_dev(hw), buf_size, GFP_KERNEL);
...@@ -727,8 +727,8 @@ ice_sched_del_rl_profile(struct ice_hw *hw, ...@@ -727,8 +727,8 @@ ice_sched_del_rl_profile(struct ice_hw *hw,
{ {
struct ice_aqc_rl_profile_elem *buf; struct ice_aqc_rl_profile_elem *buf;
u16 num_profiles_removed; u16 num_profiles_removed;
int status;
u16 num_profiles = 1; u16 num_profiles = 1;
int status;
if (rl_info->prof_id_ref != 0) if (rl_info->prof_id_ref != 0)
return -EBUSY; return -EBUSY;
...@@ -883,9 +883,9 @@ ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node, ...@@ -883,9 +883,9 @@ ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node,
struct ice_sched_node *prev, *new_node; struct ice_sched_node *prev, *new_node;
struct ice_aqc_add_elem *buf; struct ice_aqc_add_elem *buf;
u16 i, num_groups_added = 0; u16 i, num_groups_added = 0;
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
size_t buf_size; size_t buf_size;
int status = 0;
u32 teid; u32 teid;
buf_size = struct_size(buf, generic, num_nodes); buf_size = struct_size(buf, generic, num_nodes);
...@@ -1201,10 +1201,10 @@ static void ice_sched_rm_dflt_nodes(struct ice_port_info *pi) ...@@ -1201,10 +1201,10 @@ static void ice_sched_rm_dflt_nodes(struct ice_port_info *pi)
int ice_sched_init_port(struct ice_port_info *pi) int ice_sched_init_port(struct ice_port_info *pi)
{ {
struct ice_aqc_get_topo_elem *buf; struct ice_aqc_get_topo_elem *buf;
int status;
struct ice_hw *hw; struct ice_hw *hw;
u8 num_branches; u8 num_branches;
u16 num_elems; u16 num_elems;
int status;
u8 i, j; u8 i, j;
if (!pi) if (!pi)
...@@ -1303,8 +1303,8 @@ int ice_sched_init_port(struct ice_port_info *pi) ...@@ -1303,8 +1303,8 @@ int ice_sched_init_port(struct ice_port_info *pi)
int ice_sched_query_res_alloc(struct ice_hw *hw) int ice_sched_query_res_alloc(struct ice_hw *hw)
{ {
struct ice_aqc_query_txsched_res_resp *buf; struct ice_aqc_query_txsched_res_resp *buf;
int status = 0;
__le16 max_sibl; __le16 max_sibl;
int status = 0;
u16 i; u16 i;
if (hw->layer_info) if (hw->layer_info)
...@@ -1621,10 +1621,10 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, ...@@ -1621,10 +1621,10 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
{ {
struct ice_sched_node *parent, *node; struct ice_sched_node *parent, *node;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
int status;
u32 first_node_teid; u32 first_node_teid;
u16 num_added = 0; u16 num_added = 0;
u8 i, qgl, vsil; u8 i, qgl, vsil;
int status;
qgl = ice_sched_get_qgrp_layer(hw); qgl = ice_sched_get_qgrp_layer(hw);
vsil = ice_sched_get_vsi_layer(hw); vsil = ice_sched_get_vsi_layer(hw);
...@@ -1722,10 +1722,10 @@ ice_sched_add_vsi_support_nodes(struct ice_port_info *pi, u16 vsi_handle, ...@@ -1722,10 +1722,10 @@ ice_sched_add_vsi_support_nodes(struct ice_port_info *pi, u16 vsi_handle,
struct ice_sched_node *tc_node, u16 *num_nodes) struct ice_sched_node *tc_node, u16 *num_nodes)
{ {
struct ice_sched_node *parent = tc_node; struct ice_sched_node *parent = tc_node;
int status;
u32 first_node_teid; u32 first_node_teid;
u16 num_added = 0; u16 num_added = 0;
u8 i, vsil; u8 i, vsil;
int status;
if (!pi) if (!pi)
return -EINVAL; return -EINVAL;
...@@ -1802,9 +1802,9 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, ...@@ -1802,9 +1802,9 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
struct ice_sched_node *vsi_node; struct ice_sched_node *vsi_node;
struct ice_sched_node *tc_node; struct ice_sched_node *tc_node;
struct ice_vsi_ctx *vsi_ctx; struct ice_vsi_ctx *vsi_ctx;
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
u16 prev_numqs; u16 prev_numqs;
int status = 0;
tc_node = ice_sched_get_tc_node(pi, tc); tc_node = ice_sched_get_tc_node(pi, tc);
if (!tc_node) if (!tc_node)
...@@ -1875,8 +1875,8 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs, ...@@ -1875,8 +1875,8 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,
{ {
struct ice_sched_node *vsi_node, *tc_node; struct ice_sched_node *vsi_node, *tc_node;
struct ice_vsi_ctx *vsi_ctx; struct ice_vsi_ctx *vsi_ctx;
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
int status = 0;
ice_debug(pi->hw, ICE_DBG_SCHED, "add/config VSI %d\n", vsi_handle); ice_debug(pi->hw, ICE_DBG_SCHED, "add/config VSI %d\n", vsi_handle);
tc_node = ice_sched_get_tc_node(pi, tc); tc_node = ice_sched_get_tc_node(pi, tc);
...@@ -1996,8 +1996,8 @@ static bool ice_sched_is_leaf_node_present(struct ice_sched_node *node) ...@@ -1996,8 +1996,8 @@ static bool ice_sched_is_leaf_node_present(struct ice_sched_node *node)
static int static int
ice_sched_rm_vsi_cfg(struct ice_port_info *pi, u16 vsi_handle, u8 owner) ice_sched_rm_vsi_cfg(struct ice_port_info *pi, u16 vsi_handle, u8 owner)
{ {
int status = -EINVAL;
struct ice_vsi_ctx *vsi_ctx; struct ice_vsi_ctx *vsi_ctx;
int status = -EINVAL;
u8 i; u8 i;
ice_debug(pi->hw, ICE_DBG_SCHED, "removing VSI %d\n", vsi_handle); ice_debug(pi->hw, ICE_DBG_SCHED, "removing VSI %d\n", vsi_handle);
...@@ -2194,9 +2194,9 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent, ...@@ -2194,9 +2194,9 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent,
{ {
struct ice_aqc_move_elem *buf; struct ice_aqc_move_elem *buf;
struct ice_sched_node *node; struct ice_sched_node *node;
int status = 0;
u16 i, grps_movd = 0; u16 i, grps_movd = 0;
struct ice_hw *hw; struct ice_hw *hw;
int status = 0;
u16 buf_len; u16 buf_len;
hw = pi->hw; hw = pi->hw;
...@@ -2258,9 +2258,9 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id, ...@@ -2258,9 +2258,9 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
struct ice_sched_node *vsi_node, *agg_node, *tc_node, *parent; struct ice_sched_node *vsi_node, *agg_node, *tc_node, *parent;
u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 }; u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };
u32 first_node_teid, vsi_teid; u32 first_node_teid, vsi_teid;
int status;
u16 num_nodes_added; u16 num_nodes_added;
u8 aggl, vsil, i; u8 aggl, vsil, i;
int status;
tc_node = ice_sched_get_tc_node(pi, tc); tc_node = ice_sched_get_tc_node(pi, tc);
if (!tc_node) if (!tc_node)
...@@ -2506,10 +2506,10 @@ ice_sched_add_agg_cfg(struct ice_port_info *pi, u32 agg_id, u8 tc) ...@@ -2506,10 +2506,10 @@ ice_sched_add_agg_cfg(struct ice_port_info *pi, u32 agg_id, u8 tc)
{ {
struct ice_sched_node *parent, *agg_node, *tc_node; struct ice_sched_node *parent, *agg_node, *tc_node;
u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 }; u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
u32 first_node_teid; u32 first_node_teid;
u16 num_nodes_added; u16 num_nodes_added;
int status = 0;
u8 i, aggl; u8 i, aggl;
tc_node = ice_sched_get_tc_node(pi, tc); tc_node = ice_sched_get_tc_node(pi, tc);
...@@ -2596,8 +2596,8 @@ ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id, ...@@ -2596,8 +2596,8 @@ ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id,
enum ice_agg_type agg_type, unsigned long *tc_bitmap) enum ice_agg_type agg_type, unsigned long *tc_bitmap)
{ {
struct ice_sched_agg_info *agg_info; struct ice_sched_agg_info *agg_info;
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
int status = 0;
u8 tc; u8 tc;
agg_info = ice_get_agg_info(hw, agg_id); agg_info = ice_get_agg_info(hw, agg_id);
...@@ -2760,8 +2760,8 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id, ...@@ -2760,8 +2760,8 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
{ {
struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL; struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
struct ice_sched_agg_info *agg_info, *old_agg_info; struct ice_sched_agg_info *agg_info, *old_agg_info;
int status = 0;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
int status = 0;
u8 tc; u8 tc;
if (!ice_is_vsi_valid(pi->hw, vsi_handle)) if (!ice_is_vsi_valid(pi->hw, vsi_handle))
...@@ -2856,9 +2856,9 @@ ice_sched_update_elem(struct ice_hw *hw, struct ice_sched_node *node, ...@@ -2856,9 +2856,9 @@ ice_sched_update_elem(struct ice_hw *hw, struct ice_sched_node *node,
struct ice_aqc_txsched_elem_data *info) struct ice_aqc_txsched_elem_data *info)
{ {
struct ice_aqc_txsched_elem_data buf; struct ice_aqc_txsched_elem_data buf;
int status;
u16 elem_cfgd = 0; u16 elem_cfgd = 0;
u16 num_elems = 1; u16 num_elems = 1;
int status;
buf = *info; buf = *info;
/* Parent TEID is reserved field in this aq call */ /* Parent TEID is reserved field in this aq call */
...@@ -3102,8 +3102,8 @@ static int ...@@ -3102,8 +3102,8 @@ static int
ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw, ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
struct ice_aqc_rl_profile_elem *profile) struct ice_aqc_rl_profile_elem *profile)
{ {
int status = -EINVAL;
s64 bytes_per_sec, ts_rate, mv_tmp; s64 bytes_per_sec, ts_rate, mv_tmp;
int status = -EINVAL;
bool found = false; bool found = false;
s32 encode = 0; s32 encode = 0;
s64 mv = 0; s64 mv = 0;
...@@ -3176,9 +3176,9 @@ ice_sched_add_rl_profile(struct ice_port_info *pi, ...@@ -3176,9 +3176,9 @@ ice_sched_add_rl_profile(struct ice_port_info *pi,
struct ice_aqc_rl_profile_info *rl_prof_elem; struct ice_aqc_rl_profile_info *rl_prof_elem;
u16 profiles_added = 0, num_profiles = 1; u16 profiles_added = 0, num_profiles = 1;
struct ice_aqc_rl_profile_elem *buf; struct ice_aqc_rl_profile_elem *buf;
int status;
struct ice_hw *hw; struct ice_hw *hw;
u8 profile_type; u8 profile_type;
int status;
if (layer_num >= ICE_AQC_TOPO_MAX_LEVEL_NUM) if (layer_num >= ICE_AQC_TOPO_MAX_LEVEL_NUM)
return NULL; return NULL;
...@@ -3466,11 +3466,11 @@ ice_sched_set_node_bw_dflt(struct ice_port_info *pi, ...@@ -3466,11 +3466,11 @@ ice_sched_set_node_bw_dflt(struct ice_port_info *pi,
struct ice_sched_node *node, struct ice_sched_node *node,
enum ice_rl_type rl_type, u8 layer_num) enum ice_rl_type rl_type, u8 layer_num)
{ {
int status;
struct ice_hw *hw; struct ice_hw *hw;
u8 profile_type; u8 profile_type;
u16 rl_prof_id; u16 rl_prof_id;
u16 old_id; u16 old_id;
int status;
hw = pi->hw; hw = pi->hw;
switch (rl_type) { switch (rl_type) {
...@@ -3567,9 +3567,9 @@ ice_sched_set_node_bw(struct ice_port_info *pi, struct ice_sched_node *node, ...@@ -3567,9 +3567,9 @@ ice_sched_set_node_bw(struct ice_port_info *pi, struct ice_sched_node *node,
enum ice_rl_type rl_type, u32 bw, u8 layer_num) enum ice_rl_type rl_type, u32 bw, u8 layer_num)
{ {
struct ice_aqc_rl_profile_info *rl_prof_info; struct ice_aqc_rl_profile_info *rl_prof_info;
int status = -EINVAL;
struct ice_hw *hw = pi->hw; struct ice_hw *hw = pi->hw;
u16 old_id, rl_prof_id; u16 old_id, rl_prof_id;
int status = -EINVAL;
rl_prof_info = ice_sched_add_rl_profile(pi, rl_type, bw, layer_num); rl_prof_info = ice_sched_add_rl_profile(pi, rl_type, bw, layer_num);
if (!rl_prof_info) if (!rl_prof_info)
...@@ -3735,9 +3735,9 @@ static int ...@@ -3735,9 +3735,9 @@ static int
ice_sched_set_q_bw_lmt(struct ice_port_info *pi, u16 vsi_handle, u8 tc, ice_sched_set_q_bw_lmt(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
u16 q_handle, enum ice_rl_type rl_type, u32 bw) u16 q_handle, enum ice_rl_type rl_type, u32 bw)
{ {
int status = -EINVAL;
struct ice_sched_node *node; struct ice_sched_node *node;
struct ice_q_ctx *q_ctx; struct ice_q_ctx *q_ctx;
int status = -EINVAL;
if (!ice_is_vsi_valid(pi->hw, vsi_handle)) if (!ice_is_vsi_valid(pi->hw, vsi_handle))
return -EINVAL; return -EINVAL;
...@@ -3885,8 +3885,8 @@ ice_sched_set_node_bw_lmt_per_tc(struct ice_port_info *pi, u32 id, ...@@ -3885,8 +3885,8 @@ ice_sched_set_node_bw_lmt_per_tc(struct ice_port_info *pi, u32 id,
enum ice_agg_type agg_type, u8 tc, enum ice_agg_type agg_type, u8 tc,
enum ice_rl_type rl_type, u32 bw) enum ice_rl_type rl_type, u32 bw)
{ {
int status = -EINVAL;
struct ice_sched_node *node; struct ice_sched_node *node;
int status = -EINVAL;
if (!pi) if (!pi)
return status; return status;
...@@ -4191,8 +4191,7 @@ void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw) ...@@ -4191,8 +4191,7 @@ void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw)
* their node bandwidth information. This function needs to be called with * their node bandwidth information. This function needs to be called with
* scheduler lock held. * scheduler lock held.
*/ */
static int static int ice_sched_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle)
ice_sched_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle)
{ {
DECLARE_BITMAP(replay_bitmap, ICE_MAX_TRAFFIC_CLASS); DECLARE_BITMAP(replay_bitmap, ICE_MAX_TRAFFIC_CLASS);
struct ice_sched_agg_vsi_info *agg_vsi_info; struct ice_sched_agg_vsi_info *agg_vsi_info;
...@@ -4252,8 +4251,7 @@ int ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle) ...@@ -4252,8 +4251,7 @@ int ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle)
* This function replays queue type node bandwidth. This function needs to be * This function replays queue type node bandwidth. This function needs to be
* called with scheduler lock held. * called with scheduler lock held.
*/ */
int int ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx)
ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx)
{ {
struct ice_sched_node *q_node; struct ice_sched_node *q_node;
......
...@@ -120,6 +120,5 @@ int ice_cfg_rl_burst_size(struct ice_hw *hw, u32 bytes); ...@@ -120,6 +120,5 @@ int ice_cfg_rl_burst_size(struct ice_hw *hw, u32 bytes);
void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw); void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw);
void ice_sched_replay_agg(struct ice_hw *hw); void ice_sched_replay_agg(struct ice_hw *hw);
int ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle); int ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle);
int int ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx);
ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx);
#endif /* _ICE_SCHED_H_ */ #endif /* _ICE_SCHED_H_ */
...@@ -946,8 +946,8 @@ ice_aq_alloc_free_vsi_list(struct ice_hw *hw, u16 *vsi_list_id, ...@@ -946,8 +946,8 @@ ice_aq_alloc_free_vsi_list(struct ice_hw *hw, u16 *vsi_list_id,
{ {
struct ice_aqc_alloc_free_res_elem *sw_buf; struct ice_aqc_alloc_free_res_elem *sw_buf;
struct ice_aqc_res_elem *vsi_ele; struct ice_aqc_res_elem *vsi_ele;
int status;
u16 buf_len; u16 buf_len;
int status;
buf_len = struct_size(sw_buf, elem, 1); buf_len = struct_size(sw_buf, elem, 1);
sw_buf = devm_kzalloc(ice_hw_to_dev(hw), buf_len, GFP_KERNEL); sw_buf = devm_kzalloc(ice_hw_to_dev(hw), buf_len, GFP_KERNEL);
...@@ -1076,8 +1076,8 @@ ice_aq_get_recipe(struct ice_hw *hw, ...@@ -1076,8 +1076,8 @@ ice_aq_get_recipe(struct ice_hw *hw,
{ {
struct ice_aqc_add_get_recipe *cmd; struct ice_aqc_add_get_recipe *cmd;
struct ice_aq_desc desc; struct ice_aq_desc desc;
int status;
u16 buf_size; u16 buf_size;
int status;
if (*num_recipes != ICE_MAX_NUM_RECIPES) if (*num_recipes != ICE_MAX_NUM_RECIPES)
return -EINVAL; return -EINVAL;
...@@ -1157,8 +1157,8 @@ ice_aq_get_recipe_to_profile(struct ice_hw *hw, u32 profile_id, u8 *r_bitmap, ...@@ -1157,8 +1157,8 @@ ice_aq_get_recipe_to_profile(struct ice_hw *hw, u32 profile_id, u8 *r_bitmap,
static int ice_alloc_recipe(struct ice_hw *hw, u16 *rid) static int ice_alloc_recipe(struct ice_hw *hw, u16 *rid)
{ {
struct ice_aqc_alloc_free_res_elem *sw_buf; struct ice_aqc_alloc_free_res_elem *sw_buf;
int status;
u16 buf_len; u16 buf_len;
int status;
buf_len = struct_size(sw_buf, elem, 1); buf_len = struct_size(sw_buf, elem, 1);
sw_buf = kzalloc(buf_len, GFP_KERNEL); sw_buf = kzalloc(buf_len, GFP_KERNEL);
...@@ -1238,9 +1238,9 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid, ...@@ -1238,9 +1238,9 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
struct ice_aqc_recipe_data_elem *tmp; struct ice_aqc_recipe_data_elem *tmp;
u16 num_recps = ICE_MAX_NUM_RECIPES; u16 num_recps = ICE_MAX_NUM_RECIPES;
struct ice_prot_lkup_ext *lkup_exts; struct ice_prot_lkup_ext *lkup_exts;
int status;
u8 fv_word_idx = 0; u8 fv_word_idx = 0;
u16 sub_recps; u16 sub_recps;
int status;
bitmap_zero(result_bm, ICE_MAX_FV_WORDS); bitmap_zero(result_bm, ICE_MAX_FV_WORDS);
...@@ -1410,9 +1410,9 @@ ice_init_port_info(struct ice_port_info *pi, u16 vsi_port_num, u8 type, ...@@ -1410,9 +1410,9 @@ ice_init_port_info(struct ice_port_info *pi, u16 vsi_port_num, u8 type,
int ice_get_initial_sw_cfg(struct ice_hw *hw) int ice_get_initial_sw_cfg(struct ice_hw *hw)
{ {
struct ice_aqc_get_sw_cfg_resp_elem *rbuf; struct ice_aqc_get_sw_cfg_resp_elem *rbuf;
int status;
u16 req_desc = 0; u16 req_desc = 0;
u16 num_elems; u16 num_elems;
int status;
u16 i; u16 i;
rbuf = devm_kzalloc(ice_hw_to_dev(hw), ICE_SW_CFG_MAX_BUF_LEN, rbuf = devm_kzalloc(ice_hw_to_dev(hw), ICE_SW_CFG_MAX_BUF_LEN,
...@@ -1681,9 +1681,9 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent, ...@@ -1681,9 +1681,9 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
* 3. GENERIC VALUE action to hold the software marker ID * 3. GENERIC VALUE action to hold the software marker ID
*/ */
const u16 num_lg_acts = 3; const u16 num_lg_acts = 3;
int status;
u16 lg_act_size; u16 lg_act_size;
u16 rules_size; u16 rules_size;
int status;
u32 act; u32 act;
u16 id; u16 id;
...@@ -1814,9 +1814,9 @@ ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, ...@@ -1814,9 +1814,9 @@ ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
enum ice_sw_lkup_type lkup_type) enum ice_sw_lkup_type lkup_type)
{ {
struct ice_aqc_sw_rules_elem *s_rule; struct ice_aqc_sw_rules_elem *s_rule;
int status;
u16 s_rule_size; u16 s_rule_size;
u16 rule_type; u16 rule_type;
int status;
int i; int i;
if (!num_vsi) if (!num_vsi)
...@@ -1992,9 +1992,9 @@ int ice_update_sw_rule_bridge_mode(struct ice_hw *hw) ...@@ -1992,9 +1992,9 @@ int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)
{ {
struct ice_switch_info *sw = hw->switch_info; struct ice_switch_info *sw = hw->switch_info;
struct ice_fltr_mgmt_list_entry *fm_entry; struct ice_fltr_mgmt_list_entry *fm_entry;
int status = 0;
struct list_head *rule_head; struct list_head *rule_head;
struct mutex *rule_lock; /* Lock to protect filter rule list */ struct mutex *rule_lock; /* Lock to protect filter rule list */
int status = 0;
rule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock; rule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;
rule_head = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rules; rule_head = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rules;
...@@ -2050,8 +2050,8 @@ ice_add_update_vsi_list(struct ice_hw *hw, ...@@ -2050,8 +2050,8 @@ ice_add_update_vsi_list(struct ice_hw *hw,
struct ice_fltr_info *cur_fltr, struct ice_fltr_info *cur_fltr,
struct ice_fltr_info *new_fltr) struct ice_fltr_info *new_fltr)
{ {
int status = 0;
u16 vsi_list_id = 0; u16 vsi_list_id = 0;
int status = 0;
if ((cur_fltr->fltr_act == ICE_FWD_TO_Q || if ((cur_fltr->fltr_act == ICE_FWD_TO_Q ||
cur_fltr->fltr_act == ICE_FWD_TO_QGRP)) cur_fltr->fltr_act == ICE_FWD_TO_QGRP))
...@@ -2260,8 +2260,8 @@ ice_remove_vsi_list_rule(struct ice_hw *hw, u16 vsi_list_id, ...@@ -2260,8 +2260,8 @@ ice_remove_vsi_list_rule(struct ice_hw *hw, u16 vsi_list_id,
enum ice_sw_lkup_type lkup_type) enum ice_sw_lkup_type lkup_type)
{ {
struct ice_aqc_sw_rules_elem *s_rule; struct ice_aqc_sw_rules_elem *s_rule;
int status;
u16 s_rule_size; u16 s_rule_size;
int status;
s_rule_size = (u16)ICE_SW_RULE_VSI_LIST_SIZE(0); s_rule_size = (u16)ICE_SW_RULE_VSI_LIST_SIZE(0);
s_rule = devm_kzalloc(ice_hw_to_dev(hw), s_rule_size, GFP_KERNEL); s_rule = devm_kzalloc(ice_hw_to_dev(hw), s_rule_size, GFP_KERNEL);
...@@ -2293,8 +2293,8 @@ ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, ...@@ -2293,8 +2293,8 @@ ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
struct ice_fltr_mgmt_list_entry *fm_list) struct ice_fltr_mgmt_list_entry *fm_list)
{ {
enum ice_sw_lkup_type lkup_type; enum ice_sw_lkup_type lkup_type;
int status = 0;
u16 vsi_list_id; u16 vsi_list_id;
int status = 0;
if (fm_list->fltr_info.fltr_act != ICE_FWD_TO_VSI_LIST || if (fm_list->fltr_info.fltr_act != ICE_FWD_TO_VSI_LIST ||
fm_list->vsi_count == 0) fm_list->vsi_count == 0)
...@@ -2382,9 +2382,9 @@ ice_remove_rule_internal(struct ice_hw *hw, u8 recp_id, ...@@ -2382,9 +2382,9 @@ ice_remove_rule_internal(struct ice_hw *hw, u8 recp_id,
struct ice_switch_info *sw = hw->switch_info; struct ice_switch_info *sw = hw->switch_info;
struct ice_fltr_mgmt_list_entry *list_elem; struct ice_fltr_mgmt_list_entry *list_elem;
struct mutex *rule_lock; /* Lock to protect filter rule list */ struct mutex *rule_lock; /* Lock to protect filter rule list */
int status = 0;
bool remove_rule = false; bool remove_rule = false;
u16 vsi_handle; u16 vsi_handle;
int status = 0;
if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle)) if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
return -EINVAL; return -EINVAL;
...@@ -2598,8 +2598,8 @@ int ice_add_mac(struct ice_hw *hw, struct list_head *m_list) ...@@ -2598,8 +2598,8 @@ int ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
u16 total_elem_left, s_rule_size; u16 total_elem_left, s_rule_size;
struct ice_switch_info *sw; struct ice_switch_info *sw;
struct mutex *rule_lock; /* Lock to protect filter rule list */ struct mutex *rule_lock; /* Lock to protect filter rule list */
int status = 0;
u16 num_unicast = 0; u16 num_unicast = 0;
int status = 0;
u8 elem_sent; u8 elem_sent;
if (!m_list || !hw) if (!m_list || !hw)
...@@ -2917,8 +2917,7 @@ int ice_add_vlan(struct ice_hw *hw, struct list_head *v_list) ...@@ -2917,8 +2917,7 @@ int ice_add_vlan(struct ice_hw *hw, struct list_head *v_list)
* the filter list with the necessary fields (including flags to * the filter list with the necessary fields (including flags to
* indicate Tx or Rx rules). * indicate Tx or Rx rules).
*/ */
int int ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list)
ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list)
{ {
struct ice_fltr_list_entry *em_list_itr; struct ice_fltr_list_entry *em_list_itr;
...@@ -2946,8 +2945,7 @@ ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list) ...@@ -2946,8 +2945,7 @@ ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list)
* @hw: pointer to the hardware structure * @hw: pointer to the hardware structure
* @em_list: list of ethertype or ethertype MAC entries * @em_list: list of ethertype or ethertype MAC entries
*/ */
int int ice_remove_eth_mac(struct ice_hw *hw, struct list_head *em_list)
ice_remove_eth_mac(struct ice_hw *hw, struct list_head *em_list)
{ {
struct ice_fltr_list_entry *em_list_itr, *tmp; struct ice_fltr_list_entry *em_list_itr, *tmp;
...@@ -3020,15 +3018,14 @@ ice_rem_adv_rule_info(struct ice_hw *hw, struct list_head *rule_head) ...@@ -3020,15 +3018,14 @@ ice_rem_adv_rule_info(struct ice_hw *hw, struct list_head *rule_head)
* add filter rule to set/unset given VSI as default VSI for the switch * add filter rule to set/unset given VSI as default VSI for the switch
* (represented by swid) * (represented by swid)
*/ */
int int ice_cfg_dflt_vsi(struct ice_hw *hw, u16 vsi_handle, bool set, u8 direction)
ice_cfg_dflt_vsi(struct ice_hw *hw, u16 vsi_handle, bool set, u8 direction)
{ {
struct ice_aqc_sw_rules_elem *s_rule; struct ice_aqc_sw_rules_elem *s_rule;
struct ice_fltr_info f_info; struct ice_fltr_info f_info;
enum ice_adminq_opc opcode; enum ice_adminq_opc opcode;
int status;
u16 s_rule_size; u16 s_rule_size;
u16 hw_vsi_id; u16 hw_vsi_id;
int status;
if (!ice_is_vsi_valid(hw, vsi_handle)) if (!ice_is_vsi_valid(hw, vsi_handle))
return -EINVAL; return -EINVAL;
...@@ -3137,10 +3134,10 @@ ice_find_ucast_rule_entry(struct ice_hw *hw, u8 recp_id, ...@@ -3137,10 +3134,10 @@ ice_find_ucast_rule_entry(struct ice_hw *hw, u8 recp_id,
* This function removes either a MAC filter rule or a specific VSI from a * This function removes either a MAC filter rule or a specific VSI from a
* VSI list for a multicast MAC address. * VSI list for a multicast MAC address.
* *
* Returns -ENOENT if a given entry was not added by * Returns -ENOENT if a given entry was not added by ice_add_mac. Caller should
* ice_add_mac. Caller should be aware that this call will only work if all * be aware that this call will only work if all the entries passed into m_list
* the entries passed into m_list were added previously. It will not attempt to * were added previously. It will not attempt to do a partial remove of entries
* do a partial remove of entries that were found. * that were found.
*/ */
int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list) int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
{ {
...@@ -3192,8 +3189,7 @@ int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list) ...@@ -3192,8 +3189,7 @@ int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
* @hw: pointer to the hardware structure * @hw: pointer to the hardware structure
* @v_list: list of VLAN entries and forwarding information * @v_list: list of VLAN entries and forwarding information
*/ */
int int ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list)
ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list)
{ {
struct ice_fltr_list_entry *v_list_itr, *tmp; struct ice_fltr_list_entry *v_list_itr, *tmp;
...@@ -3350,8 +3346,7 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi) ...@@ -3350,8 +3346,7 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi)
* @v_list: list of promisc entries * @v_list: list of promisc entries
*/ */
static int static int
ice_remove_promisc(struct ice_hw *hw, u8 recp_id, ice_remove_promisc(struct ice_hw *hw, u8 recp_id, struct list_head *v_list)
struct list_head *v_list)
{ {
struct ice_fltr_list_entry *v_list_itr, *tmp; struct ice_fltr_list_entry *v_list_itr, *tmp;
...@@ -3450,8 +3445,8 @@ ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid) ...@@ -3450,8 +3445,8 @@ ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid)
enum { UCAST_FLTR = 1, MCAST_FLTR, BCAST_FLTR }; enum { UCAST_FLTR = 1, MCAST_FLTR, BCAST_FLTR };
struct ice_fltr_list_entry f_list_entry; struct ice_fltr_list_entry f_list_entry;
struct ice_fltr_info new_fltr; struct ice_fltr_info new_fltr;
int status = 0;
bool is_tx_fltr; bool is_tx_fltr;
int status = 0;
u16 hw_vsi_id; u16 hw_vsi_id;
int pkt_type; int pkt_type;
u8 recipe_id; u8 recipe_id;
...@@ -3567,8 +3562,8 @@ ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ...@@ -3567,8 +3562,8 @@ ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
struct list_head vsi_list_head; struct list_head vsi_list_head;
struct list_head *vlan_head; struct list_head *vlan_head;
struct mutex *vlan_lock; /* Lock to protect filter rule list */ struct mutex *vlan_lock; /* Lock to protect filter rule list */
int status;
u16 vlan_id; u16 vlan_id;
int status;
INIT_LIST_HEAD(&vsi_list_head); INIT_LIST_HEAD(&vsi_list_head);
vlan_lock = &sw->recp_list[ICE_SW_LKUP_VLAN].filt_rule_lock; vlan_lock = &sw->recp_list[ICE_SW_LKUP_VLAN].filt_rule_lock;
...@@ -3686,8 +3681,8 @@ ice_alloc_res_cntr(struct ice_hw *hw, u8 type, u8 alloc_shared, u16 num_items, ...@@ -3686,8 +3681,8 @@ ice_alloc_res_cntr(struct ice_hw *hw, u8 type, u8 alloc_shared, u16 num_items,
u16 *counter_id) u16 *counter_id)
{ {
struct ice_aqc_alloc_free_res_elem *buf; struct ice_aqc_alloc_free_res_elem *buf;
int status;
u16 buf_len; u16 buf_len;
int status;
/* Allocate resource */ /* Allocate resource */
buf_len = struct_size(buf, elem, 1); buf_len = struct_size(buf, elem, 1);
...@@ -3724,8 +3719,8 @@ ice_free_res_cntr(struct ice_hw *hw, u8 type, u8 alloc_shared, u16 num_items, ...@@ -3724,8 +3719,8 @@ ice_free_res_cntr(struct ice_hw *hw, u8 type, u8 alloc_shared, u16 num_items,
u16 counter_id) u16 counter_id)
{ {
struct ice_aqc_alloc_free_res_elem *buf; struct ice_aqc_alloc_free_res_elem *buf;
int status;
u16 buf_len; u16 buf_len;
int status;
/* Free resource */ /* Free resource */
buf_len = struct_size(buf, elem, 1); buf_len = struct_size(buf, elem, 1);
...@@ -4123,11 +4118,11 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, ...@@ -4123,11 +4118,11 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,
struct ice_aqc_recipe_data_elem *tmp; struct ice_aqc_recipe_data_elem *tmp;
struct ice_aqc_recipe_data_elem *buf; struct ice_aqc_recipe_data_elem *buf;
struct ice_recp_grp_entry *entry; struct ice_recp_grp_entry *entry;
int status;
u16 free_res_idx; u16 free_res_idx;
u16 recipe_count; u16 recipe_count;
u8 chain_idx; u8 chain_idx;
u8 recps = 0; u8 recps = 0;
int status;
/* When more than one recipe are required, another recipe is needed to /* When more than one recipe are required, another recipe is needed to
* chain them together. Matching a tunnel metadata ID takes up one of * chain them together. Matching a tunnel metadata ID takes up one of
...@@ -4411,8 +4406,8 @@ static int ...@@ -4411,8 +4406,8 @@ static int
ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm, ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm,
struct ice_prot_lkup_ext *lkup_exts) struct ice_prot_lkup_ext *lkup_exts)
{ {
int status;
u8 recp_count = 0; u8 recp_count = 0;
int status;
rm->n_grp_count = 0; rm->n_grp_count = 0;
...@@ -4446,8 +4441,8 @@ static int ...@@ -4446,8 +4441,8 @@ static int
ice_get_fv(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, ice_get_fv(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
unsigned long *bm, struct list_head *fv_list) unsigned long *bm, struct list_head *fv_list)
{ {
int status;
u8 *prot_ids; u8 *prot_ids;
int status;
u16 i; u16 i;
prot_ids = kcalloc(lkups_cnt, sizeof(*prot_ids), GFP_KERNEL); prot_ids = kcalloc(lkups_cnt, sizeof(*prot_ids), GFP_KERNEL);
...@@ -4572,8 +4567,8 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, ...@@ -4572,8 +4567,8 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
struct ice_sw_fv_list_entry *fvit; struct ice_sw_fv_list_entry *fvit;
struct ice_recp_grp_entry *r_tmp; struct ice_recp_grp_entry *r_tmp;
struct ice_sw_fv_list_entry *tmp; struct ice_sw_fv_list_entry *tmp;
int status = 0;
struct ice_sw_recipe *rm; struct ice_sw_recipe *rm;
int status = 0;
u8 i; u8 i;
if (!lkups_cnt) if (!lkups_cnt)
...@@ -5060,8 +5055,8 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, ...@@ -5060,8 +5055,8 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,
struct ice_adv_rule_info *cur_fltr, struct ice_adv_rule_info *cur_fltr,
struct ice_adv_rule_info *new_fltr) struct ice_adv_rule_info *new_fltr)
{ {
int status;
u16 vsi_list_id = 0; u16 vsi_list_id = 0;
int status;
if (cur_fltr->sw_act.fltr_act == ICE_FWD_TO_Q || if (cur_fltr->sw_act.fltr_act == ICE_FWD_TO_Q ||
cur_fltr->sw_act.fltr_act == ICE_FWD_TO_QGRP || cur_fltr->sw_act.fltr_act == ICE_FWD_TO_QGRP ||
...@@ -5171,10 +5166,10 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, ...@@ -5171,10 +5166,10 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
struct ice_aqc_sw_rules_elem *s_rule = NULL; struct ice_aqc_sw_rules_elem *s_rule = NULL;
struct list_head *rule_head; struct list_head *rule_head;
struct ice_switch_info *sw; struct ice_switch_info *sw;
int status;
const u8 *pkt = NULL; const u8 *pkt = NULL;
u16 word_cnt; u16 word_cnt;
u32 act = 0; u32 act = 0;
int status;
u8 q_rgn; u8 q_rgn;
/* Initialize profile to result index bitmap */ /* Initialize profile to result index bitmap */
...@@ -5439,8 +5434,8 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, ...@@ -5439,8 +5434,8 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
{ {
struct ice_vsi_list_map_info *vsi_list_info; struct ice_vsi_list_map_info *vsi_list_info;
enum ice_sw_lkup_type lkup_type; enum ice_sw_lkup_type lkup_type;
int status;
u16 vsi_list_id; u16 vsi_list_id;
int status;
if (fm_list->rule_info.sw_act.fltr_act != ICE_FWD_TO_VSI_LIST || if (fm_list->rule_info.sw_act.fltr_act != ICE_FWD_TO_VSI_LIST ||
fm_list->vsi_count == 0) fm_list->vsi_count == 0)
...@@ -5538,10 +5533,10 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, ...@@ -5538,10 +5533,10 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
{ {
struct ice_adv_fltr_mgmt_list_entry *list_elem; struct ice_adv_fltr_mgmt_list_entry *list_elem;
struct ice_prot_lkup_ext lkup_exts; struct ice_prot_lkup_ext lkup_exts;
int status = 0;
bool remove_rule = false; bool remove_rule = false;
struct mutex *rule_lock; /* Lock to protect filter rule list */ struct mutex *rule_lock; /* Lock to protect filter rule list */
u16 i, rid, vsi_handle; u16 i, rid, vsi_handle;
int status = 0;
memset(&lkup_exts, 0, sizeof(lkup_exts)); memset(&lkup_exts, 0, sizeof(lkup_exts));
for (i = 0; i < lkups_cnt; i++) { for (i = 0; i < lkups_cnt; i++) {
......
...@@ -330,24 +330,19 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, ...@@ -330,24 +330,19 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
u16 lkups_cnt, struct ice_adv_rule_info *rinfo, u16 lkups_cnt, struct ice_adv_rule_info *rinfo,
struct ice_rule_query_data *added_entry); struct ice_rule_query_data *added_entry);
int ice_update_sw_rule_bridge_mode(struct ice_hw *hw); int ice_update_sw_rule_bridge_mode(struct ice_hw *hw);
int ice_add_vlan(struct ice_hw *hw, struct list_head *m_list);
int ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list);
int ice_add_mac(struct ice_hw *hw, struct list_head *m_lst); int ice_add_mac(struct ice_hw *hw, struct list_head *m_lst);
int ice_remove_mac(struct ice_hw *hw, struct list_head *m_lst); int ice_remove_mac(struct ice_hw *hw, struct list_head *m_lst);
int
ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list);
int
ice_remove_eth_mac(struct ice_hw *hw, struct list_head *em_list);
int
ice_cfg_rdma_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable);
bool ice_mac_fltr_exist(struct ice_hw *hw, u8 *mac, u16 vsi_handle); bool ice_mac_fltr_exist(struct ice_hw *hw, u8 *mac, u16 vsi_handle);
bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle); bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle);
int ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list);
int ice_remove_eth_mac(struct ice_hw *hw, struct list_head *em_list);
int ice_cfg_rdma_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable);
void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle); void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle);
int
ice_add_vlan(struct ice_hw *hw, struct list_head *m_list);
int ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list);
/* Promisc/defport setup for VSIs */ /* Promisc/defport setup for VSIs */
int int ice_cfg_dflt_vsi(struct ice_hw *hw, u16 vsi_handle, bool set, u8 direction);
ice_cfg_dflt_vsi(struct ice_hw *hw, u16 vsi_handle, bool set, u8 direction);
int int
ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
u16 vid); u16 vid);
...@@ -358,8 +353,7 @@ int ...@@ -358,8 +353,7 @@ int
ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
bool rm_vlan_promisc); bool rm_vlan_promisc);
int int ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle);
ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle);
int int
ice_rem_adv_rule_by_id(struct ice_hw *hw, ice_rem_adv_rule_by_id(struct ice_hw *hw,
struct ice_rule_query_data *remove_entry); struct ice_rule_query_data *remove_entry);
......
...@@ -398,9 +398,9 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr) ...@@ -398,9 +398,9 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr)
struct ice_hw *hw = &vsi->back->hw; struct ice_hw *hw = &vsi->back->hw;
struct ice_adv_lkup_elem *list; struct ice_adv_lkup_elem *list;
u32 flags = fltr->flags; u32 flags = fltr->flags;
int status;
int lkups_cnt; int lkups_cnt;
int ret = 0; int ret = 0;
int status;
int i; int i;
if (!flags || (flags & ICE_TC_FLWR_FIELD_ENC_SRC_L4_PORT)) { if (!flags || (flags & ICE_TC_FLWR_FIELD_ENC_SRC_L4_PORT)) {
......
...@@ -560,13 +560,13 @@ ice_vc_fdir_write_flow_prof(struct ice_vf *vf, enum ice_fltr_ptype flow, ...@@ -560,13 +560,13 @@ ice_vc_fdir_write_flow_prof(struct ice_vf *vf, enum ice_fltr_ptype flow,
struct ice_flow_seg_info *old_seg; struct ice_flow_seg_info *old_seg;
struct ice_flow_prof *prof = NULL; struct ice_flow_prof *prof = NULL;
struct ice_fd_hw_prof *vf_prof; struct ice_fd_hw_prof *vf_prof;
int status;
struct device *dev; struct device *dev;
struct ice_pf *pf; struct ice_pf *pf;
struct ice_hw *hw; struct ice_hw *hw;
u64 entry1_h = 0; u64 entry1_h = 0;
u64 entry2_h = 0; u64 entry2_h = 0;
u64 prof_id; u64 prof_id;
int status;
int ret; int ret;
pf = vf->pf; pf = vf->pf;
...@@ -1199,10 +1199,10 @@ static int ice_vc_fdir_write_fltr(struct ice_vf *vf, ...@@ -1199,10 +1199,10 @@ static int ice_vc_fdir_write_fltr(struct ice_vf *vf,
struct ice_fdir_fltr *input = &conf->input; struct ice_fdir_fltr *input = &conf->input;
struct ice_vsi *vsi, *ctrl_vsi; struct ice_vsi *vsi, *ctrl_vsi;
struct ice_fltr_desc desc; struct ice_fltr_desc desc;
int status;
struct device *dev; struct device *dev;
struct ice_pf *pf; struct ice_pf *pf;
struct ice_hw *hw; struct ice_hw *hw;
int status;
int ret; int ret;
u8 *pkt; u8 *pkt;
......
...@@ -653,8 +653,8 @@ static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 pvid_info, bool enable) ...@@ -653,8 +653,8 @@ static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 pvid_info, bool enable)
struct ice_hw *hw = &vsi->back->hw; struct ice_hw *hw = &vsi->back->hw;
struct ice_aqc_vsi_props *info; struct ice_aqc_vsi_props *info;
struct ice_vsi_ctx *ctxt; struct ice_vsi_ctx *ctxt;
int status;
int ret = 0; int ret = 0;
int status;
ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL); ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
if (!ctxt) if (!ctxt)
...@@ -680,8 +680,7 @@ static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 pvid_info, bool enable) ...@@ -680,8 +680,7 @@ static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 pvid_info, bool enable)
status = ice_update_vsi(hw, vsi->idx, ctxt, NULL); status = ice_update_vsi(hw, vsi->idx, ctxt, NULL);
if (status) { if (status) {
dev_info(ice_hw_to_dev(hw), "update VSI for port VLAN failed, err %d aq_err %s\n", dev_info(ice_hw_to_dev(hw), "update VSI for port VLAN failed, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
ret = -EIO; ret = -EIO;
goto out; goto out;
} }
...@@ -851,8 +850,8 @@ static int ice_vf_rebuild_host_mac_cfg(struct ice_vf *vf) ...@@ -851,8 +850,8 @@ static int ice_vf_rebuild_host_mac_cfg(struct ice_vf *vf)
{ {
struct device *dev = ice_pf_to_dev(vf->pf); struct device *dev = ice_pf_to_dev(vf->pf);
struct ice_vsi *vsi = ice_get_vf_vsi(vf); struct ice_vsi *vsi = ice_get_vf_vsi(vf);
int status;
u8 broadcast[ETH_ALEN]; u8 broadcast[ETH_ALEN];
int status;
if (ice_is_eswitch_mode_switchdev(vf->pf)) if (ice_is_eswitch_mode_switchdev(vf->pf))
return 0; return 0;
...@@ -1303,8 +1302,8 @@ static void ice_vf_pre_vsi_rebuild(struct ice_vf *vf) ...@@ -1303,8 +1302,8 @@ static void ice_vf_pre_vsi_rebuild(struct ice_vf *vf)
static void ice_vf_rebuild_aggregator_node_cfg(struct ice_vsi *vsi) static void ice_vf_rebuild_aggregator_node_cfg(struct ice_vsi *vsi)
{ {
struct ice_pf *pf = vsi->back; struct ice_pf *pf = vsi->back;
int status;
struct device *dev; struct device *dev;
int status;
if (!vsi->agg_node) if (!vsi->agg_node)
return; return;
...@@ -1734,9 +1733,9 @@ static int ice_init_vf_vsi_res(struct ice_vf *vf) ...@@ -1734,9 +1733,9 @@ static int ice_init_vf_vsi_res(struct ice_vf *vf)
{ {
struct ice_pf *pf = vf->pf; struct ice_pf *pf = vf->pf;
u8 broadcast[ETH_ALEN]; u8 broadcast[ETH_ALEN];
int status;
struct ice_vsi *vsi; struct ice_vsi *vsi;
struct device *dev; struct device *dev;
int status;
int err; int err;
vf->first_vector_idx = ice_calc_vf_first_vector_idx(pf, vf); vf->first_vector_idx = ice_calc_vf_first_vector_idx(pf, vf);
...@@ -2160,9 +2159,9 @@ int ...@@ -2160,9 +2159,9 @@ int
ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode, ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode,
enum virtchnl_status_code v_retval, u8 *msg, u16 msglen) enum virtchnl_status_code v_retval, u8 *msg, u16 msglen)
{ {
int aq_ret;
struct device *dev; struct device *dev;
struct ice_pf *pf; struct ice_pf *pf;
int aq_ret;
if (!vf) if (!vf)
return -EINVAL; return -EINVAL;
...@@ -2672,8 +2671,8 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add) ...@@ -2672,8 +2671,8 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
if (rss_cfg->rss_algorithm == VIRTCHNL_RSS_ALG_R_ASYMMETRIC) { if (rss_cfg->rss_algorithm == VIRTCHNL_RSS_ALG_R_ASYMMETRIC) {
struct ice_vsi_ctx *ctx; struct ice_vsi_ctx *ctx;
int status;
u8 lut_type, hash_type; u8 lut_type, hash_type;
int status;
lut_type = ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI; lut_type = ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI;
hash_type = add ? ICE_AQ_VSI_Q_OPT_RSS_XOR : hash_type = add ? ICE_AQ_VSI_Q_OPT_RSS_XOR :
...@@ -2703,8 +2702,7 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add) ...@@ -2703,8 +2702,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); status = ice_update_vsi(hw, vsi->idx, ctx, NULL);
if (status) { if (status) {
dev_err(dev, "update VSI for RSS failed, err %d aq_err %s\n", dev_err(dev, "update VSI for RSS failed, err %d aq_err %s\n",
status, status, ice_aq_str(hw->adminq.sq_last_status));
ice_aq_str(hw->adminq.sq_last_status));
v_ret = VIRTCHNL_STATUS_ERR_PARAM; v_ret = VIRTCHNL_STATUS_ERR_PARAM;
} else { } else {
vsi->info.q_opt_rss = ctx->info.q_opt_rss; vsi->info.q_opt_rss = ctx->info.q_opt_rss;
...@@ -2733,10 +2731,9 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add) ...@@ -2733,10 +2731,9 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
status = ice_rem_rss_cfg(hw, vsi->idx, hash_flds, status = ice_rem_rss_cfg(hw, vsi->idx, hash_flds,
addl_hdrs); addl_hdrs);
/* We just ignore -ENOENT, because /* We just ignore -ENOENT, because if two configurations
* if two configurations share the same profile remove * share the same profile remove one of them actually
* one of them actually removes both, since the * removes both, since the profile is deleted.
* profile is deleted.
*/ */
if (status && status != -ENOENT) { if (status && status != -ENOENT) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM; v_ret = VIRTCHNL_STATUS_ERR_PARAM;
...@@ -2899,9 +2896,9 @@ int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena) ...@@ -2899,9 +2896,9 @@ int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena)
struct ice_pf *pf = np->vsi->back; struct ice_pf *pf = np->vsi->back;
struct ice_vsi_ctx *ctx; struct ice_vsi_ctx *ctx;
struct ice_vsi *vf_vsi; struct ice_vsi *vf_vsi;
int status;
struct device *dev; struct device *dev;
struct ice_vf *vf; struct ice_vf *vf;
int status;
int ret; int ret;
dev = ice_pf_to_dev(pf); dev = ice_pf_to_dev(pf);
...@@ -3789,8 +3786,8 @@ ice_vc_add_mac_addr(struct ice_vf *vf, struct ice_vsi *vsi, ...@@ -3789,8 +3786,8 @@ ice_vc_add_mac_addr(struct ice_vf *vf, struct ice_vsi *vsi,
{ {
struct device *dev = ice_pf_to_dev(vf->pf); struct device *dev = ice_pf_to_dev(vf->pf);
u8 *mac_addr = vc_ether_addr->addr; u8 *mac_addr = vc_ether_addr->addr;
int status;
int ret = 0; int ret = 0;
int status;
/* device MAC already added */ /* device MAC already added */
if (ether_addr_equal(mac_addr, vf->dev_lan_addr.addr)) if (ether_addr_equal(mac_addr, vf->dev_lan_addr.addr))
...@@ -5265,9 +5262,9 @@ ice_is_malicious_vf(struct ice_pf *pf, struct ice_rq_event_info *event, ...@@ -5265,9 +5262,9 @@ ice_is_malicious_vf(struct ice_pf *pf, struct ice_rq_event_info *event,
s16 vf_id = le16_to_cpu(event->desc.retval); s16 vf_id = le16_to_cpu(event->desc.retval);
struct device *dev = ice_pf_to_dev(pf); struct device *dev = ice_pf_to_dev(pf);
struct ice_mbx_data mbxdata; struct ice_mbx_data mbxdata;
int status;
bool malvf = false; bool malvf = false;
struct ice_vf *vf; struct ice_vf *vf;
int status;
if (ice_validate_vf_id(pf, vf_id)) if (ice_validate_vf_id(pf, vf_id))
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册