On 10/3/23 13:17, Jan Sokolowski wrote:
From: Mateusz Pacuszka <mateuszx.pacus...@intel.com>

One thing is broken in the safe mode, that is
ice_deinit_features() is being executed even
that ice_init_features() was not causing stack
trace during pci_unregister_driver().

Add check on the top of the function.

Fixes: 5b246e533d01 ("ice: split probe into smaller functions")
Signed-off-by: Mateusz Pacuszka <mateuszx.pacus...@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolow...@intel.com>
---
  drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c 
b/drivers/net/ethernet/intel/ice/ice_main.c
index c8286adae946..ded0d807c5c5 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4683,6 +4683,9 @@ static void ice_init_features(struct ice_pf *pf)
static void ice_deinit_features(struct ice_pf *pf)
  {
+       if (ice_is_safe_mode(pf))
+               return;
+
        ice_deinit_lag(pf);
        if (test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))
                ice_cfg_lldp_mib_change(&pf->hw, false);

Reviewed-by: Przemek Kitszel <przemyslaw.kits...@intel.com>


Please be reminded that for Intel originated patches the current default flow is:
you iterate on e1000 ml until reviewed-by is provided;
then post to IWL + CC netdev;
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to