Skip to contentSkip to conversation

ice: Fix safe mode when DDP is missing

PATCH In review Jan Sokolowski 3 participants 3 messages Oct 3, 2023 – Oct 9, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: Fix safe mode when DDP is missing

From: Mateusz Pacuszka <[email protected]>

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")
---
 drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_main.c +3 -0
index c8286adae946..ded0d807c5c5 100644
@@ -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);
Signature · 6 lines
2.31.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Jan Sokolowski

From: Mateusz Pacuszka <[email protected]>

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")
---
  drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_main.c +0 -0
index c8286adae946..ded0d807c5c5 100644

drivers/net/ethernet/intel/ice/ice_main.c static void ice_init_features(struct ice_pf *pf) · line 4691

Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_main.c +3 -0
@@ -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);

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
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Tested-by on v1 1/1
#2 lore raw
In reply to Jan Sokolowski
Quoted 14 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jan Sokolowski
Sent: Tuesday, October 3, 2023 4:48 PM
To: [email protected]
Cc: Pacuszka, MateuszX <[email protected]>; Sokolowski, Jan <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: Fix safe mode when DDP is missing

From: Mateusz Pacuszka <[email protected]>

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().

Quoted 9 lines

Add check on the top of the function.

Fixes 5b246e533d01 ("ice: split probe into smaller functions")
---
 drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
 1 file changed, 3 insertions(+)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan