ice: remove ice_ctl_q_info::sq_cmd_timeout
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 12 Apr 2023 08:19:26 +0000 (10:19 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 20 Apr 2023 23:33:14 +0000 (16:33 -0700)
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>
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_controlq.c
drivers/net/ethernet/intel/ice/ice_controlq.h

index c2fda4fa4188cc24e450be780fcaa7ab8c66fb2f..f4c256563248f8442d1b8c4105be7b97a089a388 100644 (file)
@@ -2000,7 +2000,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
        /* there are some rare cases when trying to release the resource
         * results in an admin queue timeout, so handle them correctly
         */
-       while ((status == -EIO) && (total_delay < hw->adminq.sq_cmd_timeout)) {
+       while ((status == -EIO) && (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT)) {
                mdelay(1);
                status = ice_aq_release_res(hw, res, 0, NULL);
                total_delay++;
index 6bcfee2959915d3ec60df2c2a1f824de756feb84..c8fb10106ec3b4cb717c08a441779e5adc1bb4ea 100644 (file)
@@ -637,9 +637,6 @@ static int ice_init_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type)
                return -EIO;
        }
 
-       /* setup SQ command write back timeout */
-       cq->sq_cmd_timeout = ICE_CTL_Q_SQ_CMD_TIMEOUT;
-
        /* allocate the ATQ */
        ret_code = ice_init_sq(hw, cq);
        if (ret_code)
@@ -1066,7 +1063,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
 
                udelay(ICE_CTL_Q_SQ_CMD_USEC);
                total_delay++;
-       } while (total_delay < cq->sq_cmd_timeout);
+       } while (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT);
 
        /* if ready, copy the desc back to temp */
        if (ice_sq_done(hw, cq)) {
index c07e9cc9fc6e6c2cedb0a4a0b8f57e7c63e77ded..e790b2f4e437a94b5e55e07b7ae320491508bd9b 100644 (file)
@@ -87,7 +87,6 @@ struct ice_ctl_q_info {
        enum ice_ctl_q qtype;
        struct ice_ctl_q_ring rq;       /* receive queue */
        struct ice_ctl_q_ring sq;       /* send queue */
-       u32 sq_cmd_timeout;             /* send queue cmd write back timeout */
        u16 num_rq_entries;             /* receive queue depth */
        u16 num_sq_entries;             /* send queue depth */
        u16 rq_buf_size;                /* receive queue buffer size */