ice: Fix reset handler
authorGrzegorz Nitka <grzegorz.nitka@intel.com>
Mon, 15 Jul 2024 15:39:10 +0000 (17:39 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 7 Aug 2024 17:52:20 +0000 (10:52 -0700)
Synchronize OICR IRQ when preparing for reset to avoid potential
race conditions between the reset procedure and OICR

Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@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/ice/ice_main.c

index 3de020020bc42a1c297248b14c7437332bdb94b3..6f97ed471fe9a190cf82f10dfc0ed0f1b3942f3b 100644 (file)
@@ -559,6 +559,8 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
        if (test_bit(ICE_PREPARED_FOR_RESET, pf->state))
                return;
 
+       synchronize_irq(pf->oicr_irq.virq);
+
        ice_unplug_aux_dev(pf);
 
        /* Notify VFs of impending reset */