提交 3ff1e19c 编写于 作者: M Mitch Williams 提交者: Yang Yingliang

ice: delay less

[ Upstream commit 88bb432a ]

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: NMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 da634b8e
...@@ -911,7 +911,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq, ...@@ -911,7 +911,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
if (ice_sq_done(hw, cq)) if (ice_sq_done(hw, cq))
break; break;
mdelay(1); udelay(ICE_CTL_Q_SQ_CMD_USEC);
total_delay++; total_delay++;
} while (total_delay < cq->sq_cmd_timeout); } while (total_delay < cq->sq_cmd_timeout);
......
...@@ -30,8 +30,9 @@ enum ice_ctl_q { ...@@ -30,8 +30,9 @@ enum ice_ctl_q {
ICE_CTL_Q_ADMIN, ICE_CTL_Q_ADMIN,
}; };
/* Control Queue default settings */ /* Control Queue timeout settings - max delay 250ms */
#define ICE_CTL_Q_SQ_CMD_TIMEOUT 250 /* msecs */ #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 { struct ice_ctl_q_ring {
void *dma_head; /* Virtual address to dma head */ void *dma_head; /* Virtual address to dma head */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册