Skip to content

Commit 84817ab

Browse files
michichanguy11
authored andcommitted
ice: remove ice_ctl_q_info::sq_cmd_timeout
sq_cmd_timeout is initialized to ICE_CTL_Q_SQ_CMD_TIMEOUT and never changed, so just use the constant directly. Suggested-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 0ec636e commit 84817ab

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
20002000
/* there are some rare cases when trying to release the resource
20012001
* results in an admin queue timeout, so handle them correctly
20022002
*/
2003-
while ((status == -EIO) && (total_delay < hw->adminq.sq_cmd_timeout)) {
2003+
while ((status == -EIO) && (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT)) {
20042004
mdelay(1);
20052005
status = ice_aq_release_res(hw, res, 0, NULL);
20062006
total_delay++;

drivers/net/ethernet/intel/ice/ice_controlq.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,6 @@ static int ice_init_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type)
637637
return -EIO;
638638
}
639639

640-
/* setup SQ command write back timeout */
641-
cq->sq_cmd_timeout = ICE_CTL_Q_SQ_CMD_TIMEOUT;
642-
643640
/* allocate the ATQ */
644641
ret_code = ice_init_sq(hw, cq);
645642
if (ret_code)
@@ -1066,7 +1063,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
10661063

10671064
udelay(ICE_CTL_Q_SQ_CMD_USEC);
10681065
total_delay++;
1069-
} while (total_delay < cq->sq_cmd_timeout);
1066+
} while (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT);
10701067

10711068
/* if ready, copy the desc back to temp */
10721069
if (ice_sq_done(hw, cq)) {

drivers/net/ethernet/intel/ice/ice_controlq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ struct ice_ctl_q_info {
8787
enum ice_ctl_q qtype;
8888
struct ice_ctl_q_ring rq; /* receive queue */
8989
struct ice_ctl_q_ring sq; /* send queue */
90-
u32 sq_cmd_timeout; /* send queue cmd write back timeout */
9190
u16 num_rq_entries; /* receive queue depth */
9291
u16 num_sq_entries; /* send queue depth */
9392
u16 rq_buf_size; /* receive queue buffer size */

0 commit comments

Comments
 (0)