Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-net v2] ice: fix fwlog after driver reinit
@ 2025-02-25 13:40 Martyna Szapar-Mudlaw
  2025-02-27 17:52 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Martyna Szapar-Mudlaw @ 2025-02-25 13:40 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev, pmenzel, Martyna Szapar-Mudlaw, Przemek Kitszel

Fix an issue when firmware logging stops after devlink reload action
driver_reinit or driver reset. After the driver reinits and resumes
operations, it must re-request event notifications from the firmware
as a part of its recofiguration.
Fix it by restoring fw logging when it was previously registered
before these events.

Restoring fw logging in these cases was faultily removed with new
debugfs fw logging implementation.

Failure to init fw logging is not a critical error so it is safely
ignored. Information log in case of failure are handled by
ice_fwlog_register function.

Fixes: 73671c3162c8 ("ice: enable FW logging")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
---

v2:
commit message extended, no changes in code

---
 drivers/net/ethernet/intel/ice/ice_main.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index a03e1819e6d5..6d6873003bcb 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5151,6 +5151,13 @@ int ice_load(struct ice_pf *pf)
 
 	devl_assert_locked(priv_to_devlink(pf));
 
+	if (pf->hw.fwlog_cfg.options & ICE_FWLOG_OPTION_IS_REGISTERED) {
+		err = ice_fwlog_register(&pf->hw);
+		if (err)
+			pf->hw.fwlog_cfg.options &=
+				~ICE_FWLOG_OPTION_IS_REGISTERED;
+	}
+
 	vsi = ice_get_main_vsi(pf);
 
 	/* init channel list */
@@ -7701,6 +7708,13 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
 		goto err_init_ctrlq;
 	}
 
+	if (hw->fwlog_cfg.options & ICE_FWLOG_OPTION_IS_REGISTERED) {
+		err = ice_fwlog_register(hw);
+		if (err)
+			hw->fwlog_cfg.options &=
+				~ICE_FWLOG_OPTION_IS_REGISTERED;
+	}
+
 	/* if DDP was previously loaded successfully */
 	if (!ice_is_safe_mode(pf)) {
 		/* reload the SW DB of filter tables */
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: fix fwlog after driver reinit
  2025-02-25 13:40 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix fwlog after driver reinit Martyna Szapar-Mudlaw
@ 2025-02-27 17:52 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2025-02-27 17:52 UTC (permalink / raw)
  To: Martyna Szapar-Mudlaw; +Cc: intel-wired-lan, netdev, pmenzel, Przemek Kitszel

On Tue, Feb 25, 2025 at 02:40:10PM +0100, Martyna Szapar-Mudlaw wrote:
> Fix an issue when firmware logging stops after devlink reload action
> driver_reinit or driver reset. After the driver reinits and resumes
> operations, it must re-request event notifications from the firmware
> as a part of its recofiguration.
> Fix it by restoring fw logging when it was previously registered
> before these events.
> 
> Restoring fw logging in these cases was faultily removed with new
> debugfs fw logging implementation.
> 
> Failure to init fw logging is not a critical error so it is safely
> ignored. Information log in case of failure are handled by
> ice_fwlog_register function.
> 
> Fixes: 73671c3162c8 ("ice: enable FW logging")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-27 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 13:40 [Intel-wired-lan] [PATCH iwl-net v2] ice: fix fwlog after driver reinit Martyna Szapar-Mudlaw
2025-02-27 17:52 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox