diff mbox series

[iwl-net] ice: fix fwlog after driver reinit

Message ID 20250220150438.352642-3-martyna.szapar-mudlaw@linux.intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [iwl-net] ice: fix fwlog after driver reinit | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 2 blamed authors not CCed: anthony.l.nguyen@intel.com paul.m.stillwell.jr@intel.com; 6 maintainers not CCed: anthony.l.nguyen@intel.com andrew+netdev@lunn.ch edumazet@google.com paul.m.stillwell.jr@intel.com pabeni@redhat.com kuba@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 115 this patch: 115
netdev/source_inline success Was 0 now: 0

Commit Message

Martyna Szapar-Mudlaw Feb. 20, 2025, 3:04 p.m. UTC
Fix an issue when firmware logging stops after devlink reload action
driver_reinit or driver reset. 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.

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>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Paul Menzel Feb. 20, 2025, 8:11 p.m. UTC | #1
Dear Martyna,


Thank you for your patch.

Am 20.02.25 um 16:04 schrieb Martyna Szapar-Mudlaw:
> Fix an issue when firmware logging stops after devlink reload action
> driver_reinit or driver reset. Fix it by restoring fw logging when

Maybe elaborate, why/how driver reinit or reset disables fwlog.

> it was previously registered before these events.

I’d add a blank line between paragraphs.

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

How can this be tested?

> 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>
> ---
>   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;

Should an error be logged in the failure case?

> +	}
> +
>   	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;
> +	}

Ditto.

> +
>   	/* if DDP was previously loaded successfully */
>   	if (!ice_is_safe_mode(pf)) {
>   		/* reload the SW DB of filter tables */


Kind regards,

Paul
diff mbox series

Patch

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 */