* [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG
@ 2025-10-16 7:29 Michal Swiatkowski
2025-10-16 16:08 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal Swiatkowski @ 2025-10-16 7:29 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, jacob.e.keller, Michal Swiatkowski, Guenter Roeck
LIBIE_FWLOG is unusable without DEBUG_FS. Mark it in Kconfig.
Fix build error on ixgbe when DEBUG_FS is not set. To not add another
layer of #if IS_ENABLED(LIBIE_FWLOG) in ixgbe fwlog code define debugfs
dentry even when DEBUG_FS isn't enabled. In this case the dummy
functions of LIBIE_FWLOG will be used, so not initialized dentry isn't a
problem.
Fixes: 641585bc978e ("ixgbe: fwlog support for e610")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/lkml/f594c621-f9e1-49f2-af31-23fbcb176058@roeck-us.net/
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
v1 --> v2 [1]:
* add DEBUG_FS dependency in LIBIE_FWLOG
[1] https://lore.kernel.org/netdev/20251014141110.751104-1-michal.swiatkowski@linux.intel.com/
---
drivers/net/ethernet/intel/Kconfig | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 --
include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index a563a94e2780..122ee23497e6 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -146,7 +146,7 @@ config IXGBE
tristate "Intel(R) 10GbE PCI Express adapters support"
depends on PCI
depends on PTP_1588_CLOCK_OPTIONAL
- select LIBIE_FWLOG
+ select LIBIE_FWLOG if DEBUG_FS
select MDIO
select NET_DEVLINK
select PLDMFW
@@ -298,7 +298,7 @@ config ICE
select DIMLIB
select LIBIE
select LIBIE_ADMINQ
- select LIBIE_FWLOG
+ select LIBIE_FWLOG if DEBUG_FS
select NET_DEVLINK
select PACKING
select PLDMFW
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 14d275270123..dce4936708eb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -821,9 +821,7 @@ struct ixgbe_adapter {
#ifdef CONFIG_IXGBE_HWMON
struct hwmon_buff *ixgbe_hwmon_buff;
#endif /* CONFIG_IXGBE_HWMON */
-#ifdef CONFIG_DEBUG_FS
struct dentry *ixgbe_dbg_adapter;
-#endif /*CONFIG_DEBUG_FS*/
u8 default_up;
/* Bitmask indicating in use pools */
diff --git a/include/linux/net/intel/libie/fwlog.h b/include/linux/net/intel/libie/fwlog.h
index 36b13fabca9e..7273c78c826b 100644
--- a/include/linux/net/intel/libie/fwlog.h
+++ b/include/linux/net/intel/libie/fwlog.h
@@ -78,8 +78,20 @@ struct libie_fwlog {
);
};
+#if IS_ENABLED(CONFIG_LIBIE_FWLOG)
int libie_fwlog_init(struct libie_fwlog *fwlog, struct libie_fwlog_api *api);
void libie_fwlog_deinit(struct libie_fwlog *fwlog);
void libie_fwlog_reregister(struct libie_fwlog *fwlog);
void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf, u16 len);
+#else
+static inline int libie_fwlog_init(struct libie_fwlog *fwlog,
+ struct libie_fwlog_api *api)
+{
+ return -EOPNOTSUPP;
+}
+static inline void libie_fwlog_deinit(struct libie_fwlog *fwlog) { }
+static inline void libie_fwlog_reregister(struct libie_fwlog *fwlog) { }
+static inline void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf,
+ u16 len) { }
+#endif /* CONFIG_LIBIE_FWLOG */
#endif /* _LIBIE_FWLOG_H_ */
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG
2025-10-16 7:29 [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG Michal Swiatkowski
@ 2025-10-16 16:08 ` Simon Horman
2025-10-20 10:34 ` Loktionov, Aleksandr
2025-10-31 9:08 ` Rinitha, SX
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-10-16 16:08 UTC (permalink / raw)
To: Michal Swiatkowski; +Cc: intel-wired-lan, netdev, jacob.e.keller, Guenter Roeck
On Thu, Oct 16, 2025 at 09:29:40AM +0200, Michal Swiatkowski wrote:
> LIBIE_FWLOG is unusable without DEBUG_FS. Mark it in Kconfig.
>
> Fix build error on ixgbe when DEBUG_FS is not set. To not add another
> layer of #if IS_ENABLED(LIBIE_FWLOG) in ixgbe fwlog code define debugfs
> dentry even when DEBUG_FS isn't enabled. In this case the dummy
> functions of LIBIE_FWLOG will be used, so not initialized dentry isn't a
> problem.
>
> Fixes: 641585bc978e ("ixgbe: fwlog support for e610")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/lkml/f594c621-f9e1-49f2-af31-23fbcb176058@roeck-us.net/
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> v1 --> v2 [1]:
> * add DEBUG_FS dependency in LIBIE_FWLOG
>
> [1] https://lore.kernel.org/netdev/20251014141110.751104-1-michal.swiatkowski@linux.intel.com/
I lightly compile-tested this and overall it looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG
2025-10-16 7:29 [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG Michal Swiatkowski
2025-10-16 16:08 ` Simon Horman
@ 2025-10-20 10:34 ` Loktionov, Aleksandr
2025-10-31 9:08 ` Rinitha, SX
2 siblings, 0 replies; 4+ messages in thread
From: Loktionov, Aleksandr @ 2025-10-20 10:34 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Keller, Jacob E, Guenter Roeck
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Michal Swiatkowski
> Sent: Thursday, October 16, 2025 9:30 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Keller, Jacob E
> <jacob.e.keller@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>; Guenter Roeck <linux@roeck-
> us.net>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on
> DEBUG_FS when building LIBIE_FWLOG
>
> LIBIE_FWLOG is unusable without DEBUG_FS. Mark it in Kconfig.
>
> Fix build error on ixgbe when DEBUG_FS is not set. To not add another
> layer of #if IS_ENABLED(LIBIE_FWLOG) in ixgbe fwlog code define
> debugfs dentry even when DEBUG_FS isn't enabled. In this case the
> dummy functions of LIBIE_FWLOG will be used, so not initialized dentry
> isn't a problem.
>
> Fixes: 641585bc978e ("ixgbe: fwlog support for e610")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/lkml/f594c621-f9e1-49f2-af31-
> 23fbcb176058@roeck-us.net/
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> v1 --> v2 [1]:
> * add DEBUG_FS dependency in LIBIE_FWLOG
>
> [1] https://lore.kernel.org/netdev/20251014141110.751104-1-
> michal.swiatkowski@linux.intel.com/
> ---
> drivers/net/ethernet/intel/Kconfig | 4 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 --
> include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++
> 3 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/Kconfig
> b/drivers/net/ethernet/intel/Kconfig
> index a563a94e2780..122ee23497e6 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -146,7 +146,7 @@ config IXGBE
> tristate "Intel(R) 10GbE PCI Express adapters support"
> depends on PCI
> depends on PTP_1588_CLOCK_OPTIONAL
> - select LIBIE_FWLOG
> + select LIBIE_FWLOG if DEBUG_FS
> select MDIO
> select NET_DEVLINK
> select PLDMFW
> @@ -298,7 +298,7 @@ config ICE
> select DIMLIB
> select LIBIE
> select LIBIE_ADMINQ
> - select LIBIE_FWLOG
> + select LIBIE_FWLOG if DEBUG_FS
> select NET_DEVLINK
> select PACKING
> select PLDMFW
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> index 14d275270123..dce4936708eb 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> @@ -821,9 +821,7 @@ struct ixgbe_adapter { #ifdef CONFIG_IXGBE_HWMON
> struct hwmon_buff *ixgbe_hwmon_buff;
> #endif /* CONFIG_IXGBE_HWMON */
> -#ifdef CONFIG_DEBUG_FS
> struct dentry *ixgbe_dbg_adapter;
> -#endif /*CONFIG_DEBUG_FS*/
>
> u8 default_up;
> /* Bitmask indicating in use pools */
> diff --git a/include/linux/net/intel/libie/fwlog.h
> b/include/linux/net/intel/libie/fwlog.h
> index 36b13fabca9e..7273c78c826b 100644
> --- a/include/linux/net/intel/libie/fwlog.h
> +++ b/include/linux/net/intel/libie/fwlog.h
> @@ -78,8 +78,20 @@ struct libie_fwlog {
> );
> };
>
> +#if IS_ENABLED(CONFIG_LIBIE_FWLOG)
> int libie_fwlog_init(struct libie_fwlog *fwlog, struct
> libie_fwlog_api *api); void libie_fwlog_deinit(struct libie_fwlog
> *fwlog); void libie_fwlog_reregister(struct libie_fwlog *fwlog);
> void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf, u16
> len);
> +#else
> +static inline int libie_fwlog_init(struct libie_fwlog *fwlog,
> + struct libie_fwlog_api *api)
> +{
> + return -EOPNOTSUPP;
> +}
> +static inline void libie_fwlog_deinit(struct libie_fwlog *fwlog) { }
> +static inline void libie_fwlog_reregister(struct libie_fwlog *fwlog)
> {
> +} static inline void libie_get_fwlog_data(struct libie_fwlog *fwlog,
> u8 *buf,
> + u16 len) { }
> +#endif /* CONFIG_LIBIE_FWLOG */
> #endif /* _LIBIE_FWLOG_H_ */
> --
> 2.49.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG
2025-10-16 7:29 [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG Michal Swiatkowski
2025-10-16 16:08 ` Simon Horman
2025-10-20 10:34 ` Loktionov, Aleksandr
@ 2025-10-31 9:08 ` Rinitha, SX
2 siblings, 0 replies; 4+ messages in thread
From: Rinitha, SX @ 2025-10-31 9:08 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Keller, Jacob E, Guenter Roeck
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Michal Swiatkowski
> Sent: 16 October 2025 13:00
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Keller, Jacob E <jacob.e.keller@intel.com>; Michal Swiatkowski <michal.swiatkowski@linux.intel.com>; Guenter Roeck <linux@roeck-us.net>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG
>
> LIBIE_FWLOG is unusable without DEBUG_FS. Mark it in Kconfig.
>
> Fix build error on ixgbe when DEBUG_FS is not set. To not add another layer of #if IS_ENABLED(LIBIE_FWLOG) in ixgbe fwlog code define debugfs dentry even when DEBUG_FS isn't enabled. In this case the dummy functions of LIBIE_FWLOG will be used, so not initialized dentry isn't a problem.
>
> Fixes: 641585bc978e ("ixgbe: fwlog support for e610")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/lkml/f594c621-f9e1-49f2-af31-23fbcb176058@roeck-us.net/
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> v1 --> v2 [1]:
> * add DEBUG_FS dependency in LIBIE_FWLOG
>
> [1] https://lore.kernel.org/netdev/20251014141110.751104-1-michal.swiatkowski@linux.intel.com/
> ---
> drivers/net/ethernet/intel/Kconfig | 4 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 --
> include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++
> 3 files changed, 14 insertions(+), 4 deletions(-)
>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-31 9:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 7:29 [Intel-wired-lan] [PATCH iwl-net v2] libie: depend on DEBUG_FS when building LIBIE_FWLOG Michal Swiatkowski
2025-10-16 16:08 ` Simon Horman
2025-10-20 10:34 ` Loktionov, Aleksandr
2025-10-31 9:08 ` Rinitha, SX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).