Commit 7b8ff0f9 authored by Piotr Raczynski's avatar Piotr Raczynski Committed by Jeff Kirsher
Browse files

ice: Increase Rx queue disable timeout



With much traffic coming into the port, Rx queue disable
procedure can take more time until all pending queue
requests on PCIe finish. Reuse ICE_Q_WAIT_MAX_RETRY macro
and increase the delay itself.

Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6263e811
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -174,15 +174,15 @@ static int ice_pf_rxq_wait(struct ice_pf *pf, int pf_q, bool ena)
{
{
	int i;
	int i;


	for (i = 0; i < ICE_Q_WAIT_RETRY_LIMIT; i++) {
	for (i = 0; i < ICE_Q_WAIT_MAX_RETRY; i++) {
		u32 rx_reg = rd32(&pf->hw, QRX_CTRL(pf_q));
		u32 rx_reg = rd32(&pf->hw, QRX_CTRL(pf_q));


		if (ena == !!(rx_reg & QRX_CTRL_QENA_STAT_M))
		if (ena == !!(rx_reg & QRX_CTRL_QENA_STAT_M))
			break;
			break;


		usleep_range(10, 20);
		usleep_range(20, 40);
	}
	}
	if (i >= ICE_Q_WAIT_RETRY_LIMIT)
	if (i >= ICE_Q_WAIT_MAX_RETRY)
		return -ETIMEDOUT;
		return -ETIMEDOUT;


	return 0;
	return 0;