]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: remove extraneous loop in i40e_vsi_wait_queues_disabled
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 5 Apr 2017 11:50:58 +0000 (07:50 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:22 +0000 (14:15 -0700)
We can simply check both Tx and Rx queues in a single loop, rather than
repeating the loop twice.

Change-ID: Ic06f26b0e3c2620e0e33c1a2999edda488e647ad
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit af26ce2dfbf269a9608008b33a7ff978e2a7b9a9)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 1d73fdca58cbf74672aa92051a430e9253320ab5..37460c4d69c4473f447f7f11c69901744f37136f 100644 (file)
@@ -4511,7 +4511,7 @@ static void i40e_pf_unquiesce_all_vsi(struct i40e_pf *pf)
  * i40e_vsi_wait_queues_disabled - Wait for VSI's queues to be disabled
  * @vsi: the VSI being configured
  *
- * This function waits for the given VSI's queues to be disabled.
+ * Wait until all queues on a given VSI have been disabled.
  **/
 static int i40e_vsi_wait_queues_disabled(struct i40e_vsi *vsi)
 {
@@ -4520,7 +4520,7 @@ static int i40e_vsi_wait_queues_disabled(struct i40e_vsi *vsi)
 
        pf_q = vsi->base_queue;
        for (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {
-               /* Check and wait for the disable status of the queue */
+               /* Check and wait for the Tx queue */
                ret = i40e_pf_txq_wait(pf, pf_q, false);
                if (ret) {
                        dev_info(&pf->pdev->dev,
@@ -4528,11 +4528,7 @@ static int i40e_vsi_wait_queues_disabled(struct i40e_vsi *vsi)
                                 vsi->seid, pf_q);
                        return ret;
                }
-       }
-
-       pf_q = vsi->base_queue;
-       for (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {
-               /* Check and wait for the disable status of the queue */
+               /* Check and wait for the Tx queue */
                ret = i40e_pf_rxq_wait(pf, pf_q, false);
                if (ret) {
                        dev_info(&pf->pdev->dev,