i40e: fix i40e_setup_misc_vector() error handling
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Mon, 3 Apr 2023 05:13:18 +0000 (07:13 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 17 Apr 2023 17:13:03 +0000 (10:13 -0700)
Add error handling of i40e_setup_misc_vector() in i40e_rebuild().
In case interrupt vectors setup fails do not re-open vsi-s and
do not bring up vf-s, we have no interrupts to serve a traffic
anyway.

Fixes: 41c445ff0f48 ("i40e: main driver core")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 6313575a4b6c225ae030abeaf8b79203dc179f32..7c30abd0dfc22720415f8f649ae732de73a099b3 100644 (file)
@@ -11059,8 +11059,11 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
                                             pf->hw.aq.asq_last_status));
        }
        /* reinit the misc interrupt */
-       if (pf->flags & I40E_FLAG_MSIX_ENABLED)
+       if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
                ret = i40e_setup_misc_vector(pf);
+               if (ret)
+                       goto end_unlock;
+       }
 
        /* Add a filter to drop all Flow control frames from any VSI from being
         * transmitted. By doing so we stop a malicious VF from sending out