Commit 42066c4d authored by Mateusz Pacuszka's avatar Mateusz Pacuszka Committed by Jakub Kicinski

ice: Fix safe mode when DDP is missing

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: 5b246e53 ("ice: split probe into smaller functions")
Signed-off-by: default avatarMateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: default avatarJan Sokolowski <jan.sokolowski@intel.com>
Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Link: https://lore.kernel.org/r/20231011233334.336092-4-jacob.e.keller@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0288c3e7
......@@ -4684,6 +4684,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment