diff mbox series

ice: require PTP clock for building

Message ID 20230925155538.526317-1-arnd@kernel.org (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series ice: require PTP clock for building | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch warning WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 8a3a565ff210 ("ice: add admin commands to access cgu configuration")'
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arnd Bergmann Sept. 25, 2023, 3:55 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

A previous fix added PTP as an optional dependency, which was correct as
of commit 87758511075ec ("igc: fix build errors for PTP"), but this
has recently changed with the PTP code getting more deeply integrated
into the ICE driver.

Trying to build ICE when PTP is disabled results in this internal link failure
as the local functions are left out of the driver:

ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_is_phy_rclk_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_cgu_get_pin_name" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_get_cgu_state" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_get_cgu_rclk_pin_info" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_cgu_get_pin_type" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
ERROR: modpost: "ice_cgu_get_pin_freq_supp" [drivers/net/ethernet/intel/ice/ice.ko] undefined!

I tried rearranging the code to allow building it again, but this was getting
too complicated for an outsider, so just enforce the dependency to fix randconfig
builds again, until someone wants to clean this up again.

In practice, any configuration that includes this driver is also going to
want PTP clocks anyway.

Fixes: 8a3a565ff210a ("ice: add admin commands to access cgu configuration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tony Nguyen Sept. 25, 2023, 4:59 p.m. UTC | #1
On 9/25/2023 8:55 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A previous fix added PTP as an optional dependency, which was correct as
> of commit 87758511075ec ("igc: fix build errors for PTP"), but this
> has recently changed with the PTP code getting more deeply integrated
> into the ICE driver.
> 
> Trying to build ICE when PTP is disabled results in this internal link failure
> as the local functions are left out of the driver:
> 
> ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_is_phy_rclk_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_name" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_get_cgu_state" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_get_cgu_rclk_pin_info" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_type" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_freq_supp" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> 
> I tried rearranging the code to allow building it again, but this was getting
> too complicated for an outsider, so just enforce the dependency to fix randconfig
> builds again, until someone wants to clean this up again.

Hi Arnd,

There's a pending patch to netdev that does this [1].

Thanks,
Tony

> In practice, any configuration that includes this driver is also going to
> want PTP clocks anyway.
> 
> Fixes: 8a3a565ff210a ("ice: add admin commands to access cgu configuration")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

[1] 
https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/
Jacob Keller Sept. 25, 2023, 9:49 p.m. UTC | #2
> -----Original Message-----
> From: Arnd Bergmann <arnd@kernel.org>
> Sent: Monday, September 25, 2023 8:55 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>; David S. Miller <davem@davemloft.net>;
> Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski@intel.com>; Michalik, Michal
> <michal.michalik@intel.com>; Jiri Pirko <jiri@resnulli.us>; Keller, Jacob E
> <jacob.e.keller@intel.com>; Hay, Joshua A <joshua.a.hay@intel.com>; Vadim
> Fedorenko <vadim.fedorenko@linux.dev>; intel-wired-lan@lists.osuosl.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] ice: require PTP clock for building
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A previous fix added PTP as an optional dependency, which was correct as
> of commit 87758511075ec ("igc: fix build errors for PTP"), but this
> has recently changed with the PTP code getting more deeply integrated
> into the ICE driver.
> 
> Trying to build ICE when PTP is disabled results in this internal link failure
> as the local functions are left out of the driver:
> 
> ERROR: modpost: "ice_is_clock_mux_present_e810t"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_is_phy_rclk_present"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_name" [drivers/net/ethernet/intel/ice/ice.ko]
> undefined!
> ERROR: modpost: "ice_get_cgu_state" [drivers/net/ethernet/intel/ice/ice.ko]
> undefined!
> ERROR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko]
> undefined!
> ERROR: modpost: "ice_get_cgu_rclk_pin_info"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> ERROR: modpost: "ice_cgu_get_pin_type" [drivers/net/ethernet/intel/ice/ice.ko]
> undefined!
> ERROR: modpost: "ice_cgu_get_pin_freq_supp"
> [drivers/net/ethernet/intel/ice/ice.ko] undefined!
> 
> I tried rearranging the code to allow building it again, but this was getting
> too complicated for an outsider, so just enforce the dependency to fix randconfig
> builds again, until someone wants to clean this up again.
> 
> In practice, any configuration that includes this driver is also going to
> want PTP clocks anyway.
> 
> Fixes: 8a3a565ff210a ("ice: add admin commands to access cgu configuration")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


There are a couple of other fixes already posted including the one I posted last week:

https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/

My method keeps the PTP dependency optional and instead disables the features that required PTP.

Thanks,
Jake

> ---
>  drivers/net/ethernet/intel/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index e6684f3cc0ce0..c452ecf89b984 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -278,7 +278,7 @@ config ICE
>  	tristate "Intel(R) Ethernet Connection E800 Series Support"
>  	default n
>  	depends on PCI_MSI
> -	depends on PTP_1588_CLOCK_OPTIONAL
> +	depends on PTP_1588_CLOCK
>  	depends on GNSS || GNSS = n
>  	select AUXILIARY_BUS
>  	select DIMLIB
> --
> 2.39.2
>
Arnd Bergmann Sept. 26, 2023, 5:30 a.m. UTC | #3
On Mon, Sep 25, 2023, at 23:49, Keller, Jacob E wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> I tried rearranging the code to allow building it again, but this was getting
>> too complicated for an outsider, so just enforce the dependency to fix randconfig
>> builds again, until someone wants to clean this up again.
>> 
> https://lore.kernel.org/netdev/20230921000633.1238097-1-jacob.e.keller@intel.com/
>
> My method keeps the PTP dependency optional and instead disables the 
> features that required PTP.
>

Ok, that's clearly better than mine then.

     Arnd
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index e6684f3cc0ce0..c452ecf89b984 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -278,7 +278,7 @@  config ICE
 	tristate "Intel(R) Ethernet Connection E800 Series Support"
 	default n
 	depends on PCI_MSI
-	depends on PTP_1588_CLOCK_OPTIONAL
+	depends on PTP_1588_CLOCK
 	depends on GNSS || GNSS = n
 	select AUXILIARY_BUS
 	select DIMLIB