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:29 +0000
committerTony Nguyen <[email protected]>2025-09-11 19:10:07 +0000
commit360c46582e88acf57c935e76015f9fc894ab6599 (patch)
tree399cfc483a630c28d210fdfdbb1692f41bc4b429 /drivers/net/ethernet/intel/ice/ice_common.c
parentice: move out debugfs init from fwlog (diff)
downloadkernel-360c46582e88acf57c935e76015f9fc894ab6599.tar.gz
kernel-360c46582e88acf57c935e76015f9fc894ab6599.zip
ice: check for PF number outside the fwlog code
Fwlog can be supported only on PF 0. Check this before calling init/deinit functions. 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: Aleksandr Loktionov <[email protected]> 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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 16765c2da4bd..e73585d90eaa 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1002,6 +1002,10 @@ static int __fwlog_init(struct ice_hw *hw)
};
int err;
+ /* only support fw log commands on PF 0 */
+ if (hw->bus.func)
+ return -EINVAL;
+
err = ice_debugfs_pf_init(pf);
if (err)
return err;
@@ -1186,6 +1190,10 @@ err_unroll_cqinit:
static void __fwlog_deinit(struct ice_hw *hw)
{
+ /* only support fw log commands on PF 0 */
+ if (hw->bus.func)
+ return;
+
ice_debugfs_pf_deinit(hw->back);
ice_fwlog_deinit(hw, &hw->fwlog);
}