ice: introduce ice_fwlog structure

The new structure is needed to make the fwlog code a library. A goal is
to drop ice_hw structure in all fwlog related functions calls.

Pass a ice_fwlog pointer across fwlog functions and use it wherever it
is possible.

Still use &hw->fwlog in debugfs code as it needs changing the value
being passed in priv. It will be done in one of the next patches.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
Michal Swiatkowski
2025-08-12 06:23:25 +02:00
committed by Tony Nguyen
parent ad3b33636f
commit daf82b61ba
6 changed files with 98 additions and 87 deletions

View File

@@ -1012,7 +1012,7 @@ int ice_init_hw(struct ice_hw *hw)
if (status)
goto err_unroll_cqinit;
status = ice_fwlog_init(hw);
status = ice_fwlog_init(hw, &hw->fwlog);
if (status)
ice_debug(hw, ICE_DBG_FW_LOG, "Error initializing FW logging: %d\n",
status);
@@ -1178,7 +1178,7 @@ void ice_deinit_hw(struct ice_hw *hw)
ice_free_hw_tbls(hw);
mutex_destroy(&hw->tnl_lock);
ice_fwlog_deinit(hw);
ice_fwlog_deinit(hw, &hw->fwlog);
ice_destroy_all_ctrlq(hw);
/* Clear VSI contexts if not already cleared */