kernel/kernel-rt/debian/patches/ice-VDF/0028-ice-Fix-debugfs-with-devlink-reload.patch
Jiping Ma 5be9ba03ba ice: Additional patches to support the customer use cases
Intel listed total 28 commits that need us to back port. There are
9 commits that are already included in our code base. The commit
"ice: Add support for E825-C TS PLL handling" will not be back
ported since we're not dealing with E825 for 24.09. So we need
back port 18 commits. These commits were introduced in linux-6.9.y
and linux-6.10.y.

To back port these 18 commits successfully, we totally back ported
37 upstream commits.

1) The patches 1-15 are cherry picked to fix the conflicts for patch
   16 ("ice: introduce PTP state machine") and patch 36 "ice:
   Introduce ice_ptp_hw struct". Also will be helpful for the
   subsequent commits back porting.

2) The patches 24-27 are cherry picked to fix the conflicts for patch
   28 ("ice: Fix debugfs with devlink reload")

3) The minor adjust was done for the patches 17, 21, 23 and 33 to
   fit with the context change.

Verification:
- installs from iso succeed on servers with ice(Intel Ethernet
  Controller E810-XXVDA4T Westport Channel) and i40e hw(Intel
  Ethernet Controller X710) for rt and std.
- interfaces are up and pass packets for rt and std.
- create vfs, ensure that they are picked up by the new iavf
  driver and that the interface can come up and pass packets
  on rt and std system.
- Check dmesg to see DDP package is loaded successfully and
  the version is 1.3.36.0 for rt and std.

Story: 2011056
Task: 50950

Change-Id: I9aef0378ea01451684341093a167eaead3edc458
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
2024-09-03 08:26:28 +00:00

99 lines
3.6 KiB
Diff

From 8a7f6d8b2105c39f236c51c558e21b787c223861 Mon Sep 17 00:00:00 2001
From: Wojciech Drewek <wojciech.drewek@intel.com>
Date: Mon, 5 Feb 2024 14:03:57 +0100
Subject: [PATCH 28/36] ice: Fix debugfs with devlink reload
During devlink reload it is needed to remove debugfs entries
correlated with only one PF. ice_debugfs_exit() removes all
entries created by ice driver so we can't use it.
Introduce ice_debugfs_pf_deinit() in order to release PF's
debugfs entries. Move ice_debugfs_exit() call to ice_module_exit(),
it makes more sense since ice_debugfs_init() is called in
ice_module_init() and not in ice_probe().
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
(cherry picked from commit 500d0df5b4b2394a06b949bab05f7ed0242b9858)
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
drivers/net/ethernet/intel/ice/ice.h | 1 +
drivers/net/ethernet/intel/ice/ice_debugfs.c | 10 ++++++++++
drivers/net/ethernet/intel/ice/ice_fwlog.c | 2 ++
drivers/net/ethernet/intel/ice/ice_main.c | 3 +--
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 7966ac61154c..ed1c6cdedeff 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -895,6 +895,7 @@ static inline bool ice_is_adq_active(struct ice_pf *pf)
}
void ice_debugfs_fwlog_init(struct ice_pf *pf);
+void ice_debugfs_pf_deinit(struct ice_pf *pf);
void ice_debugfs_init(void);
void ice_debugfs_exit(void);
void ice_pf_fwlog_update_module(struct ice_pf *pf, int log_level, int module);
diff --git a/drivers/net/ethernet/intel/ice/ice_debugfs.c b/drivers/net/ethernet/intel/ice/ice_debugfs.c
index c2bfba6b9ead..ba396b22bb7d 100644
--- a/drivers/net/ethernet/intel/ice/ice_debugfs.c
+++ b/drivers/net/ethernet/intel/ice/ice_debugfs.c
@@ -647,6 +647,16 @@ void ice_debugfs_fwlog_init(struct ice_pf *pf)
kfree(fw_modules);
}
+/**
+ * ice_debugfs_pf_deinit - cleanup PF's debugfs
+ * @pf: pointer to the PF struct
+ */
+void ice_debugfs_pf_deinit(struct ice_pf *pf)
+{
+ debugfs_remove_recursive(pf->ice_debugfs_pf);
+ pf->ice_debugfs_pf = NULL;
+}
+
/**
* ice_debugfs_init - create root directory for debugfs entries
*/
diff --git a/drivers/net/ethernet/intel/ice/ice_fwlog.c b/drivers/net/ethernet/intel/ice/ice_fwlog.c
index 92b5dac481cd..4fd15387a7e5 100644
--- a/drivers/net/ethernet/intel/ice/ice_fwlog.c
+++ b/drivers/net/ethernet/intel/ice/ice_fwlog.c
@@ -188,6 +188,8 @@ void ice_fwlog_deinit(struct ice_hw *hw)
if (hw->bus.func)
return;
+ ice_debugfs_pf_deinit(hw->back);
+
/* make sure FW logging is disabled to not put the FW in a weird state
* for the next driver load
*/
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 6c6ca5353f28..c882c218281a 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5325,8 +5325,6 @@ static void ice_remove(struct pci_dev *pdev)
msleep(100);
}
- ice_debugfs_exit();
-
if (test_bit(ICE_FLAG_SRIOV_ENA, pf->flags)) {
set_bit(ICE_VF_RESETS_DISABLED, pf->state);
ice_free_vfs(pf);
@@ -5823,6 +5821,7 @@ module_init(ice_module_init);
static void __exit ice_module_exit(void)
{
pci_unregister_driver(&ice_driver);
+ ice_debugfs_exit();
destroy_workqueue(ice_wq);
destroy_workqueue(ice_lag_wq);
pr_info("module unloaded\n");
--
2.43.0