Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8b03a97 authored by Mitch Williams's avatar Mitch Williams Committed by Greg Kroah-Hartman
Browse files

ice: delay less



[ Upstream commit 88bb432a55de8ae62106305083a8bfbb23b01ad2 ]

Shorten the delay for SQ responses, but increase the number of loops.
Max delay time is unchanged, but some operations complete much more
quickly.

In the process, add a new define to make the delay count and delay time
more explicit. Add comments to make things more explicit.

This fixes a problem with VF resets failing on with many VFs.

Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 716f9563
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -911,7 +911,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
		if (ice_sq_done(hw, cq))
			break;

		mdelay(1);
		udelay(ICE_CTL_Q_SQ_CMD_USEC);
		total_delay++;
	} while (total_delay < cq->sq_cmd_timeout);

+3 −2
Original line number Diff line number Diff line
@@ -30,8 +30,9 @@ enum ice_ctl_q {
	ICE_CTL_Q_ADMIN,
};

/* Control Queue default settings */
#define ICE_CTL_Q_SQ_CMD_TIMEOUT	250  /* msecs */
/* Control Queue timeout settings - max delay 250ms */
#define ICE_CTL_Q_SQ_CMD_TIMEOUT	2500  /* Count 2500 times */
#define ICE_CTL_Q_SQ_CMD_USEC		100   /* Check every 100usec */

struct ice_ctl_q_ring {
	void *dma_head;			/* Virtual address to dma head */