]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
i40e: not all VSIs have rings
authorMitch Williams <mitch.a.williams@intel.com>
Sat, 10 May 2014 04:49:10 +0000 (04:49 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 8 Jun 2014 09:01:46 +0000 (02:01 -0700)
Once more, with feeling: not all VSIs have rings. To assume so is to
invite null pointers to your party.

Change-ID: I576858824468d9712d119fa1015a1f28c27712c4
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index a8c96125d33727efe99db8ec8afe707b3b0ef8b4..45027342c81c746f0f4ef361ce47fd0d7c236a04 100644 (file)
@@ -657,7 +657,7 @@ static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
        for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
                struct i40e_vsi *vsi = pf->vsi[v];
 
-               if (!vsi)
+               if (!vsi || !vsi->tx_rings[0])
                        continue;
 
                for (i = 0; i < vsi->num_queue_pairs; i++) {
@@ -711,7 +711,7 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
        for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
                struct i40e_vsi *vsi = pf->vsi[v];
 
-               if (!vsi)
+               if (!vsi || !vsi->tx_rings[0])
                        continue;
 
                for (i = 0; i < vsi->num_queue_pairs; i++) {