diff options
author | Brett Creeley <brett.creeley@intel.com> | 2019-02-28 18:25:56 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-05-02 04:15:43 -0400 |
commit | acd1751a3988e45e3464c9405dc5b95deb55865d (patch) | |
tree | 33a0527778e0bf86acddd83ba13962e848dc6b2d /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | b9c8bb06b53d28c83c47988f645b6cf4543c2685 (diff) |
ice: Remove unnecessary wait when disabling/enabling Rx queues
In ice_vsi_ctrl_rx_rings() we are unnecessarily waiting for
QRX_CTRL_QENA_REQ and QRX_CTRL_QENA_STAT to be the same value prior to
disabling each Rx queue. There is no reason to do this so remove
this wait loop as we already have a wait loop after disabling/enabling
the Rx queue through the QRX_CTRL register to make sure it gets
successfully disabled/enabled.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 4c6ecc25aaa0..8e0a23e6b563 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -197,19 +197,13 @@ static int ice_vsi_ctrl_rx_rings(struct ice_vsi *vsi, bool ena) | |||
197 | { | 197 | { |
198 | struct ice_pf *pf = vsi->back; | 198 | struct ice_pf *pf = vsi->back; |
199 | struct ice_hw *hw = &pf->hw; | 199 | struct ice_hw *hw = &pf->hw; |
200 | int i, j, ret = 0; | 200 | int i, ret = 0; |
201 | 201 | ||
202 | for (i = 0; i < vsi->num_rxq; i++) { | 202 | for (i = 0; i < vsi->num_rxq; i++) { |
203 | int pf_q = vsi->rxq_map[i]; | 203 | int pf_q = vsi->rxq_map[i]; |
204 | u32 rx_reg; | 204 | u32 rx_reg; |
205 | 205 | ||
206 | for (j = 0; j < ICE_Q_WAIT_MAX_RETRY; j++) { | 206 | rx_reg = rd32(hw, QRX_CTRL(pf_q)); |
207 | rx_reg = rd32(hw, QRX_CTRL(pf_q)); | ||
208 | if (((rx_reg >> QRX_CTRL_QENA_REQ_S) & 1) == | ||
209 | ((rx_reg >> QRX_CTRL_QENA_STAT_S) & 1)) | ||
210 | break; | ||
211 | usleep_range(1000, 2000); | ||
212 | } | ||
213 | 207 | ||
214 | /* Skip if the queue is already in the requested state */ | 208 | /* Skip if the queue is already in the requested state */ |
215 | if (ena == !!(rx_reg & QRX_CTRL_QENA_STAT_M)) | 209 | if (ena == !!(rx_reg & QRX_CTRL_QENA_STAT_M)) |