aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_common.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <[email protected]>2025-08-12 04:23:28 +0000
committerTony Nguyen <[email protected]>2025-09-11 19:09:58 +0000
commitdc898f7edd9bd2ce53115ce9fc12ad8dbbf20fd5 (patch)
treea9accbead2b9a7d7320fcb21109100caccccbad0 /drivers/net/ethernet/intel/ice/ice_common.c
parentice: allow calling custom send function in fwlog (diff)
downloadkernel-dc898f7edd9bd2ce53115ce9fc12ad8dbbf20fd5.tar.gz
kernel-dc898f7edd9bd2ce53115ce9fc12ad8dbbf20fd5.zip
ice: move out debugfs init from fwlog
The root debugfs directory should be available from driver side, not from library. Move it out from fwlog code. Make similar to __fwlog_init() __fwlog_deinit() and deinit debugfs there. In case of ice only fwlog is using debugfs. Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel) Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 53d713d19da2..16765c2da4bd 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1000,6 +1000,11 @@ static int __fwlog_init(struct ice_hw *hw)
.send_cmd = __fwlog_send_cmd,
.priv = hw,
};
+ int err;
+
+ err = ice_debugfs_pf_init(pf);
+ if (err)
+ return err;
return ice_fwlog_init(hw, &hw->fwlog, &api);
}
@@ -1179,6 +1184,12 @@ err_unroll_cqinit:
return status;
}
+static void __fwlog_deinit(struct ice_hw *hw)
+{
+ ice_debugfs_pf_deinit(hw->back);
+ ice_fwlog_deinit(hw, &hw->fwlog);
+}
+
/**
* ice_deinit_hw - unroll initialization operations done by ice_init_hw
* @hw: pointer to the hardware structure
@@ -1197,8 +1208,7 @@ void ice_deinit_hw(struct ice_hw *hw)
ice_free_seg(hw);
ice_free_hw_tbls(hw);
mutex_destroy(&hw->tnl_lock);
-
- ice_fwlog_deinit(hw, &hw->fwlog);
+ __fwlog_deinit(hw);
ice_destroy_all_ctrlq(hw);
/* Clear VSI contexts if not already cleared */