aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_fwlog.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2025-08-12 06:23:30 +0200
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-09-11 12:10:16 -0700
commit57d6ec57089cf2cdd8b0a2e5d3da05af09871482 (patch)
tree1a62583c0bec3dbed8e25e5a5951079ea7c932a9 /drivers/net/ethernet/intel/ice/ice_fwlog.c
parentice: check for PF number outside the fwlog code (diff)
downloadlinux-57d6ec57089cf2cdd8b0a2e5d3da05af09871482.tar.gz
linux-57d6ec57089cf2cdd8b0a2e5d3da05af09871482.zip
ice: drop driver specific structure from fwlog code
In debugfs pass ice_fwlog structure instead of ice_pf. The debgufs dirs specific for fwlog can be stored in fwlog structure. Add debugfs entry point to fwlog api. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_fwlog.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_fwlog.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_fwlog.c b/drivers/net/ethernet/intel/ice/ice_fwlog.c
index 2ed631e933b2..9e640e942feb 100644
--- a/drivers/net/ethernet/intel/ice/ice_fwlog.c
+++ b/drivers/net/ethernet/intel/ice/ice_fwlog.c
@@ -232,15 +232,13 @@ static void ice_fwlog_set_supported(struct ice_fwlog *fwlog)
/**
* ice_fwlog_init - Initialize FW logging configuration
- * @hw: pointer to the HW structure
* @fwlog: pointer to the fwlog structure
* @api: api structure to init fwlog
*
* This function should be called on driver initialization during
* ice_init_hw().
*/
-int ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog *fwlog,
- struct ice_fwlog_api *api)
+int ice_fwlog_init(struct ice_fwlog *fwlog, struct ice_fwlog_api *api)
{
fwlog->api = *api;
ice_fwlog_set_supported(fwlog);
@@ -272,7 +270,7 @@ int ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog *fwlog,
return status;
}
- ice_debugfs_fwlog_init(hw->back);
+ ice_debugfs_fwlog_init(fwlog, api->debugfs_root);
} else {
dev_warn(&fwlog->pdev->dev, "FW logging is not supported in this NVM image. Please update the NVM to get FW log support\n");
}
@@ -282,14 +280,12 @@ int ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog *fwlog,
/**
* ice_fwlog_deinit - unroll FW logging configuration
- * @hw: pointer to the HW structure
* @fwlog: pointer to the fwlog structure
*
* This function should be called in ice_deinit_hw().
*/
-void ice_fwlog_deinit(struct ice_hw *hw, struct ice_fwlog *fwlog)
+void ice_fwlog_deinit(struct ice_fwlog *fwlog)
{
- struct ice_pf *pf = hw->back;
int status;
/* make sure FW logging is disabled to not put the FW in a weird state
@@ -301,9 +297,9 @@ void ice_fwlog_deinit(struct ice_hw *hw, struct ice_fwlog *fwlog)
dev_warn(&fwlog->pdev->dev, "Unable to turn off FW logging, status: %d\n",
status);
- kfree(pf->ice_debugfs_pf_fwlog_modules);
+ kfree(fwlog->debugfs_modules);
- pf->ice_debugfs_pf_fwlog_modules = NULL;
+ fwlog->debugfs_modules = NULL;
status = ice_fwlog_unregister(fwlog);
if (status)