mbox series

[iwl-next,0/4] ice: fix linking with CONFIG_PTP_1588_CLOCK=n

Message ID 20230919233435.518620-1-jacob.e.keller@intel.com
Headers show
Series ice: fix linking with CONFIG_PTP_1588_CLOCK=n | expand

Message

Jacob Keller Sept. 19, 2023, 11:34 p.m. UTC
The recent changes to support DPLL in the ice driver accidentally broke
linking the module if CONFIG_PTP_1588_CLOCK is disabled:

00:02:33  ld: vmlinux.o: in function `ice_init_feature_support':
00:02:33  (.text+0x8702b8): undefined reference to `ice_is_phy_rclk_present'
00:02:33  ld: (.text+0x8702cd): undefined reference to `ice_is_cgu_present'
00:02:33  ld: (.text+0x8702d9): undefined reference to `ice_is_clock_mux_present_e810t'
00:02:33  ld: vmlinux.o: in function `ice_dpll_init_info_direct_pins':
00:02:33  ice_dpll.c:(.text+0x894167): undefined reference to `ice_cgu_get_pin_freq_supp'
00:02:33  ld: ice_dpll.c:(.text+0x894197): undefined reference to `ice_cgu_get_pin_name'
00:02:33  ld: ice_dpll.c:(.text+0x8941a8): undefined reference to `ice_cgu_get_pin_type'
00:02:33  ld: vmlinux.o: in function `ice_dpll_update_state':
00:02:33  ice_dpll.c:(.text+0x894494): undefined reference to `ice_get_cgu_state'
00:02:33  ld: vmlinux.o: in function `ice_dpll_init':
00:02:33  (.text+0x8953d5): undefined reference to `ice_get_cgu_rclk_pin_info'
00:02:34  make[2]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
00:02:34  make[1]: *** [/home/jenkins/agent/workspace/ndlinuxc/reference-repos/update-kernel-repos/kernel/Makefile:1165: vmlinux] Error 2
00:02:34  make: *** [Makefile:234: __sub-make] Error 2

This occurs because of functions added to ice_ptp_hw.c which are only
compiled when CONFIG_PTP_1588_CLOCK is enabled.

In addition, that series included similar code to logic I published at [1]
which got feedback to make some suggested improvements:

This series fixes the compilation issues and aligns ice_find_netlist_node
with the version that I posted at [1] and [2]:

[1]: https://lore.kernel.org/intel-wired-lan/20230817000058.2433236-5-jacob.e.keller@intel.com/
[2]: https://lore.kernel.org/netdev/20230918212814.435688-1-anthony.l.nguyen@intel.com/

Jacob Keller (4):
  ice: don't compile ice_dpll.c if CONFIG_PTP_1588_CLOCK is disabled
  ice: move netlist check functions to ice_common.c
  ice: make ice_get_pf_c827_idx static
  ice: cleanup ice_find_netlist_node

 drivers/net/ethernet/intel/ice/Makefile     |  3 +-
 drivers/net/ethernet/intel/ice/ice_common.c | 96 +++++++++++++++++----
 drivers/net/ethernet/intel/ice/ice_common.h |  6 +-
 drivers/net/ethernet/intel/ice/ice_dpll.h   |  6 +-
 drivers/net/ethernet/intel/ice/ice_lib.c    |  6 +-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 68 +--------------
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h |  4 -
 7 files changed, 91 insertions(+), 98 deletions(-)


base-commit: 2fcb79a1962e88ff10552384fb8164fde815ccd3