Skip to contentSkip to conversation

ice: Fix incorrect timeout ice_release_res()

PATCH In review Ding Hui 4 participants 4 messages Dec 6, 2025 – Jan 9

Subsystems (3)
lore
Share & tools
lore

Ding Hui

author
#0 lore raw

PATCH v2 1/1 ice: Fix incorrect timeout ice_release_res()

The commit 5f6df173f92e ("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 5f6df173f92e ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout")
---
 drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---
v1->v2: rebase to net branch and add commit log.

drivers/net/ethernet/intel/ice/ice_common.c +1 -1
index 046bc9c65c51..785bf5cc1b25 100644
@@ -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)
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Ding Hui

The commit 5f6df173f92e ("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().

Quoted 8 lines

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

Fixes 5f6df173f92e ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout")

---

Thanks for catching this!

Quoted 19 lines
 drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---
v1->v2: rebase to net branch and add commit log.

drivers/net/ethernet/intel/ice/ice_common.c +1 -1
index 046bc9c65c51..785bf5cc1b25 100644
@@ -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)
Reviewed-by on v2 1/1
#2 lore raw
In reply to Ding Hui

Dear Hui,

Thank you for your patch. One minor comments, should you resend.

Am 06.12.25 um 14:46 schrieb Ding Hui:

Quoted 1 line

The commit 5f6df173f92e ("ice: implement and use rd32_poll_timeout for

Without article: Commit 5f6df173f92e ("…") …

Quoted 27 lines

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 5f6df173f92e ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout")
---
  drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

---
v1->v2: rebase to net branch and add commit log.

drivers/net/ethernet/intel/ice/ice_common.c +0 -0
index 046bc9c65c51..785bf5cc1b25 100644

drivers/net/ethernet/intel/ice/ice_common.c void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res) · line 2257

Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_common.c +1 -1
@@ -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)

With or without amending the commit message, feel free to add:

Kind regards,

Paul

Tested-by on v2 1/1
#3 lore raw
In reply to Ding Hui
Quoted 20 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ding Hui
Sent: 06 December 2025 19:16
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Keller, Jacob E <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Ding, Hui <[email protected]>
Subject: [Intel-wired-lan] [Patch net v2] ice: Fix incorrect timeout ice_release_res()

The commit 5f6df173f92e ("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 5f6df173f92e ("ice: implement and use rd32_poll_timeout for ice_sq_done timeout")
Quoted 7 lines

---
drivers/net/ethernet/intel/ice/ice_common.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

---
v1->v2: rebase to net branch and add commit log.