Commit 01139a2c authored by Ding Hui's avatar Ding Hui Committed by Tony Nguyen
Browse files

ice: Fix incorrect timeout ice_release_res()



The commit 5f6df173 ("ice: implement and use rd32_poll_timeout for
ice_sq_done timeout") converted ICE_CTL_Q_SQ_CMD_TIMEOUT from jiffies
to microseconds.

But the ice_release_res() function was missed, and its logic still
treats ICE_CTL_Q_SQ_CMD_TIMEOUT as a jiffies value.

So correct the issue by usecs_to_jiffies().

Found by inspection of the DDP downloading process.
Compile and modprobe tested only.

Fixes: 5f6df173 ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout")
Signed-off-by: default avatarDing Hui <dinghui@sangfor.com.cn>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent a9d45c22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2251,7 +2251,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
	 */
	timeout = jiffies + 10 * ICE_CTL_Q_SQ_CMD_TIMEOUT;
	timeout = jiffies + 10 * usecs_to_jiffies(ICE_CTL_Q_SQ_CMD_TIMEOUT);
	do {
		status = ice_aq_release_res(hw, res, 0, NULL);
		if (status != -EIO)