summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_common.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2025-08-12 07:23:29 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-09-11 22:10:07 +0300
commit360c46582e88acf57c935e76015f9fc894ab6599 (patch)
tree399cfc483a630c28d210fdfdbb1692f41bc4b429 /drivers/net/ethernet/intel/ice/ice_common.c
parentdc898f7edd9bd2ce53115ce9fc12ad8dbbf20fd5 (diff)
downloadlinux-360c46582e88acf57c935e76015f9fc894ab6599.tar.xz
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 <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: Aleksandr Loktionov <aleksandr.loktionov@intel.com> 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_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);
}