Skip to contentSkip to conversation

ice: require PTP clock for building

PATCH In review Arnd Bergmann 4 participants 4 messages Sep 25, 2023 – Sep 26, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: require PTP clock for building

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -1
index e6684f3cc0ce0..c452ecf89b984 100644
@@ -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
Signature · 1 line
2.39.2
maintainer
#1 lore raw
Quoted 19 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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!

Quoted 3 lines

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

Quoted 5 lines

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")

[1] https://lore.kernel.org/netdev/[email protected]/

#2 lore raw
In reply to Arnd Bergmann
Quoted 48 lines

-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: Monday, September 25, 2023 8:55 AM
To: Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>
Cc: Arnd Bergmann <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Kubalewski, Arkadiusz <[email protected]>; Michalik, Michal <[email protected]>; Jiri Pirko <[email protected]>; Keller, Jacob E <[email protected]>; Hay, Joshua A <[email protected]>; Vadim Fedorenko <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH] ice: require PTP clock for building

From: Arnd Bergmann <[email protected]>

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.

Quoted 5 lines

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")

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

https://lore.kernel.org/netdev/[email protected]/

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

Thanks,
Jake

Quoted 20 lines
---
 drivers/net/ethernet/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/Kconfig +1 -2
index e6684f3cc0ce0..c452ecf89b984 100644
@@ -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

#3 lore raw
Quoted 11 lines · Jacob E
Quoted 6 lines

From: Arnd Bergmann <[email protected]>

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/[email protected]/

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

Ok, that's clearly better than mine then.

Arnd