]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ice: delay less
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 6 Nov 2019 10:05:36 +0000 (02:05 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:58:30 +0000 (23:58 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860490
[ 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: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/intel/ice/ice_controlq.c
drivers/net/ethernet/intel/ice/ice_controlq.h

index e91ac4df02421a5755a5f2fa407ab3a4010d9616..b9563359d5221a16503212e3143ea1ae4039b29f 100644 (file)
@@ -888,7 +888,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);
 
index 44945c2165d80feb6b169ff65f3f3dd055779a27..4df9da359135939afe90a6dfd7bca2c845321f88 100644 (file)
@@ -31,8 +31,9 @@ enum ice_ctl_q {
        ICE_CTL_Q_MAILBOX,
 };
 
-/* 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 */