Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ethernet: fix PTP_1588_CLOCK dependencies

The 'imply' keyword does not do what most people think it does, it only
politely asks Kconfig to turn on another symbol, but does not prevent
it from being disabled manually or built as a loadable module when the
user is built-in. In the ICE driver, the latter now causes a link failure:

aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':

This is a recurring problem in many drivers, and we have discussed
it several times befores, without reaching a consensus. I'm providing
a link to the previous email thread for reference, which discusses
some related problems.

To solve the dependency issue better than the 'imply' keyword, introduce a
separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
can depend on if it is able to use PTP support when available, but works
fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
then prevented from being built-in, the same way as with a 'depends on
PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
but that can be rather confusing when you first see it.

Since this should cover the dependencies correctly, the IS_REACHABLE()
hack in the header is no longer needed now, and can be turned back
into a normal IS_ENABLED() check. Any driver that gets the dependency
wrong will now cause a link time failure rather than being unable to use
PTP support when that is in a loadable module.

However, the two recently added ptp_get_vclocks_index() and
ptp_convert_timestamp() interfaces are only called from builtin code with
ethtool and socket timestamps, so keep the current behavior by stubbing
those out completely when PTP is in a loadable module. This should be
addressed properly in a follow-up.

As Richard suggested, we may want to actually turn PTP support into a
'bool' option later on, preventing it from being a loadable module
altogether, which would be one way to solve the problem with the ethtool
interface.

Fixes: 06c16d89d2cb ("ice: register 1588 PTP clock device object for E810 devices")
Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
Acked-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Arnd Bergmann and committed by
Jakub Kicinski
e5f31552 b697d9d3

+81 -44
+1
drivers/net/dsa/mv88e6xxx/Kconfig
··· 2 2 config NET_DSA_MV88E6XXX 3 3 tristate "Marvell 88E6xxx Ethernet switch fabric support" 4 4 depends on NET_DSA 5 + depends on PTP_1588_CLOCK_OPTIONAL 5 6 select IRQ_DOMAIN 6 7 select NET_DSA_TAG_EDSA 7 8 select NET_DSA_TAG_DSA
+2
drivers/net/dsa/ocelot/Kconfig
··· 5 5 depends on NET_VENDOR_MICROSEMI 6 6 depends on NET_VENDOR_FREESCALE 7 7 depends on HAS_IOMEM 8 + depends on PTP_1588_CLOCK_OPTIONAL 8 9 select MSCC_OCELOT_SWITCH_LIB 9 10 select NET_DSA_TAG_OCELOT_8021Q 10 11 select NET_DSA_TAG_OCELOT ··· 20 19 depends on NET_DSA 21 20 depends on NET_VENDOR_MICROSEMI 22 21 depends on HAS_IOMEM 22 + depends on PTP_1588_CLOCK_OPTIONAL 23 23 select MSCC_OCELOT_SWITCH_LIB 24 24 select NET_DSA_TAG_OCELOT_8021Q 25 25 select NET_DSA_TAG_OCELOT
+1
drivers/net/dsa/sja1105/Kconfig
··· 2 2 config NET_DSA_SJA1105 3 3 tristate "NXP SJA1105 Ethernet switch family support" 4 4 depends on NET_DSA && SPI 5 + depends on PTP_1588_CLOCK_OPTIONAL 5 6 select NET_DSA_TAG_SJA1105 6 7 select PCS_XPCS 7 8 select PACKING
+1 -1
drivers/net/ethernet/amd/Kconfig
··· 170 170 tristate "AMD 10GbE Ethernet driver" 171 171 depends on ((OF_NET && OF_ADDRESS) || ACPI || PCI) && HAS_IOMEM 172 172 depends on X86 || ARM64 || COMPILE_TEST 173 + depends on PTP_1588_CLOCK_OPTIONAL 173 174 select BITREVERSE 174 175 select CRC32 175 176 select PHYLIB 176 177 select AMD_XGBE_HAVE_ECC if X86 177 - imply PTP_1588_CLOCK 178 178 help 179 179 This driver supports the AMD 10GbE Ethernet device found on an 180 180 AMD SoC.
+3 -3
drivers/net/ethernet/broadcom/Kconfig
··· 122 122 config TIGON3 123 123 tristate "Broadcom Tigon3 support" 124 124 depends on PCI 125 + depends on PTP_1588_CLOCK_OPTIONAL 125 126 select PHYLIB 126 - imply PTP_1588_CLOCK 127 127 help 128 128 This driver supports Broadcom Tigon3 based gigabit Ethernet cards. 129 129 ··· 140 140 config BNX2X 141 141 tristate "Broadcom NetXtremeII 10Gb support" 142 142 depends on PCI 143 - imply PTP_1588_CLOCK 143 + depends on PTP_1588_CLOCK_OPTIONAL 144 144 select FW_LOADER 145 145 select ZLIB_INFLATE 146 146 select LIBCRC32C ··· 206 206 config BNXT 207 207 tristate "Broadcom NetXtreme-C/E support" 208 208 depends on PCI 209 - imply PTP_1588_CLOCK 209 + depends on PTP_1588_CLOCK_OPTIONAL 210 210 select FW_LOADER 211 211 select LIBCRC32C 212 212 select NET_DEVLINK
+1
drivers/net/ethernet/cadence/Kconfig
··· 22 22 config MACB 23 23 tristate "Cadence MACB/GEM support" 24 24 depends on HAS_DMA && COMMON_CLK 25 + depends on PTP_1588_CLOCK_OPTIONAL 25 26 select PHYLINK 26 27 select CRC32 27 28 help
+2 -2
drivers/net/ethernet/cavium/Kconfig
··· 66 66 tristate "Cavium LiquidIO support" 67 67 depends on 64BIT && PCI 68 68 depends on PCI 69 - imply PTP_1588_CLOCK 69 + depends on PTP_1588_CLOCK_OPTIONAL 70 70 select FW_LOADER 71 71 select LIBCRC32C 72 72 select NET_DEVLINK ··· 91 91 config LIQUIDIO_VF 92 92 tristate "Cavium LiquidIO VF support" 93 93 depends on 64BIT && PCI_MSI 94 - imply PTP_1588_CLOCK 94 + depends on PTP_1588_CLOCK_OPTIONAL 95 95 help 96 96 This driver supports Cavium LiquidIO Intelligent Server Adapter 97 97 based on CN23XX chips.
+1
drivers/net/ethernet/chelsio/Kconfig
··· 69 69 config CHELSIO_T4 70 70 tristate "Chelsio Communications T4/T5/T6 Ethernet support" 71 71 depends on PCI && (IPV6 || IPV6=n) && (TLS || TLS=n) 72 + depends on PTP_1588_CLOCK_OPTIONAL 72 73 select FW_LOADER 73 74 select MDIO 74 75 select ZLIB_DEFLATE
+1 -1
drivers/net/ethernet/freescale/Kconfig
··· 25 25 depends on (M523x || M527x || M5272 || M528x || M520x || M532x || \ 26 26 ARCH_MXC || SOC_IMX28 || COMPILE_TEST) 27 27 default ARCH_MXC || SOC_IMX28 if ARM 28 + depends on PTP_1588_CLOCK_OPTIONAL 28 29 select CRC32 29 30 select PHYLIB 30 31 imply NET_SELFTESTS 31 - imply PTP_1588_CLOCK 32 32 help 33 33 Say Y here if you want to use the built-in 10/100 Fast ethernet 34 34 controller on some Motorola ColdFire and Freescale i.MX processors.
+1 -1
drivers/net/ethernet/hisilicon/Kconfig
··· 104 104 tristate "Hisilicon HNS3 HCLGE Acceleration Engine & Compatibility Layer Support" 105 105 default m 106 106 depends on PCI_MSI 107 - imply PTP_1588_CLOCK 107 + depends on PTP_1588_CLOCK_OPTIONAL 108 108 help 109 109 This selects the HNS3_HCLGE network acceleration engine & its hardware 110 110 compatibility layer. The engine would be used in Hisilicon hip08 family of
+6 -6
drivers/net/ethernet/intel/Kconfig
··· 58 58 config E1000E 59 59 tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support" 60 60 depends on PCI && (!SPARC32 || BROKEN) 61 + depends on PTP_1588_CLOCK_OPTIONAL 61 62 select CRC32 62 - imply PTP_1588_CLOCK 63 63 help 64 64 This driver supports the PCI-Express Intel(R) PRO/1000 gigabit 65 65 ethernet family of adapters. For PCI or PCI-X e1000 adapters, ··· 87 87 config IGB 88 88 tristate "Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support" 89 89 depends on PCI 90 - imply PTP_1588_CLOCK 90 + depends on PTP_1588_CLOCK_OPTIONAL 91 91 select I2C 92 92 select I2C_ALGOBIT 93 93 help ··· 159 159 config IXGBE 160 160 tristate "Intel(R) 10GbE PCI Express adapters support" 161 161 depends on PCI 162 + depends on PTP_1588_CLOCK_OPTIONAL 162 163 select MDIO 163 164 select PHYLIB 164 - imply PTP_1588_CLOCK 165 165 help 166 166 This driver supports Intel(R) 10GbE PCI Express family of 167 167 adapters. For more information on how to identify your adapter, go ··· 239 239 240 240 config I40E 241 241 tristate "Intel(R) Ethernet Controller XL710 Family support" 242 - imply PTP_1588_CLOCK 242 + depends on PTP_1588_CLOCK_OPTIONAL 243 243 depends on PCI 244 244 select AUXILIARY_BUS 245 245 help ··· 295 295 tristate "Intel(R) Ethernet Connection E800 Series Support" 296 296 default n 297 297 depends on PCI_MSI 298 + depends on PTP_1588_CLOCK_OPTIONAL 298 299 select AUXILIARY_BUS 299 300 select DIMLIB 300 301 select NET_DEVLINK 301 302 select PLDMFW 302 - imply PTP_1588_CLOCK 303 303 help 304 304 This driver supports Intel(R) Ethernet Connection E800 Series of 305 305 devices. For more information on how to identify your adapter, go ··· 317 317 tristate "Intel(R) FM10000 Ethernet Switch Host Interface Support" 318 318 default n 319 319 depends on PCI_MSI 320 - imply PTP_1588_CLOCK 320 + depends on PTP_1588_CLOCK_OPTIONAL 321 321 help 322 322 This driver supports Intel(R) FM10000 Ethernet Switch Host 323 323 Interface. For more information on how to identify your adapter,
+2
drivers/net/ethernet/marvell/octeontx2/Kconfig
··· 12 12 select NET_DEVLINK 13 13 depends on (64BIT && COMPILE_TEST) || ARM64 14 14 depends on PCI 15 + depends on PTP_1588_CLOCK_OPTIONAL 15 16 help 16 17 This driver supports Marvell's OcteonTX2 Resource Virtualization 17 18 Unit's admin function manager which manages all RVU HW resources ··· 33 32 select OCTEONTX2_MBOX 34 33 depends on (64BIT && COMPILE_TEST) || ARM64 35 34 depends on PCI 35 + depends on PTP_1588_CLOCK_OPTIONAL 36 36 help 37 37 This driver supports Marvell's OcteonTX2 NIC physical function. 38 38
+1 -1
drivers/net/ethernet/mellanox/mlx4/Kconfig
··· 6 6 config MLX4_EN 7 7 tristate "Mellanox Technologies 1/10/40Gbit Ethernet support" 8 8 depends on PCI && NETDEVICES && ETHERNET && INET 9 + depends on PTP_1588_CLOCK_OPTIONAL 9 10 select MLX4_CORE 10 - imply PTP_1588_CLOCK 11 11 help 12 12 This driver supports Mellanox Technologies ConnectX Ethernet 13 13 devices.
+1 -1
drivers/net/ethernet/mellanox/mlx5/core/Kconfig
··· 10 10 select NET_DEVLINK 11 11 depends on VXLAN || !VXLAN 12 12 depends on MLXFW || !MLXFW 13 - depends on PTP_1588_CLOCK || !PTP_1588_CLOCK 13 + depends on PTP_1588_CLOCK_OPTIONAL 14 14 depends on PCI_HYPERV_INTERFACE || !PCI_HYPERV_INTERFACE 15 15 help 16 16 Core driver for low level functionality of the ConnectX-4 and
+1 -1
drivers/net/ethernet/mellanox/mlxsw/Kconfig
··· 58 58 depends on NET_IPGRE || NET_IPGRE=n 59 59 depends on IPV6_GRE || IPV6_GRE=n 60 60 depends on VXLAN || VXLAN=n 61 + depends on PTP_1588_CLOCK_OPTIONAL 61 62 select GENERIC_ALLOCATOR 62 63 select PARMAN 63 64 select OBJAGG 64 - imply PTP_1588_CLOCK 65 65 select NET_PTP_CLASSIFY if PTP_1588_CLOCK 66 66 default m 67 67 help
+1
drivers/net/ethernet/microchip/Kconfig
··· 45 45 config LAN743X 46 46 tristate "LAN743x support" 47 47 depends on PCI 48 + depends on PTP_1588_CLOCK_OPTIONAL 48 49 select PHYLIB 49 50 select CRC16 50 51 select CRC32
+1
drivers/net/ethernet/mscc/Kconfig
··· 24 24 25 25 config MSCC_OCELOT_SWITCH 26 26 tristate "Ocelot switch driver" 27 + depends on PTP_1588_CLOCK_OPTIONAL 27 28 depends on BRIDGE || BRIDGE=n 28 29 depends on NET_SWITCHDEV 29 30 depends on HAS_IOMEM
+1
drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
··· 6 6 config PCH_GBE 7 7 tristate "OKI SEMICONDUCTOR IOH(ML7223/ML7831) GbE" 8 8 depends on PCI && (X86_32 || COMPILE_TEST) 9 + depends on PTP_1588_CLOCK 9 10 select MII 10 11 select PTP_1588_CLOCK_PCH 11 12 select NET_PTP_CLASSIFY
+1 -1
drivers/net/ethernet/pensando/Kconfig
··· 20 20 config IONIC 21 21 tristate "Pensando Ethernet IONIC Support" 22 22 depends on 64BIT && PCI 23 - depends on PTP_1588_CLOCK || !PTP_1588_CLOCK 23 + depends on PTP_1588_CLOCK_OPTIONAL 24 24 select NET_DEVLINK 25 25 select DIMLIB 26 26 help
+1 -1
drivers/net/ethernet/qlogic/Kconfig
··· 99 99 config QEDE 100 100 tristate "QLogic QED 25/40/100Gb Ethernet NIC" 101 101 depends on QED 102 - imply PTP_1588_CLOCK 102 + depends on PTP_1588_CLOCK_OPTIONAL 103 103 help 104 104 This enables the support for Marvell FastLinQ adapters family, 105 105 ethernet driver.
+1 -1
drivers/net/ethernet/renesas/Kconfig
··· 32 32 config RAVB 33 33 tristate "Renesas Ethernet AVB support" 34 34 depends on ARCH_RENESAS || COMPILE_TEST 35 + depends on PTP_1588_CLOCK_OPTIONAL 35 36 select CRC32 36 37 select MII 37 38 select MDIO_BITBANG 38 39 select PHYLIB 39 - imply PTP_1588_CLOCK 40 40 help 41 41 Renesas Ethernet AVB device driver. 42 42 This driver supports the following SoCs:
+1 -1
drivers/net/ethernet/samsung/Kconfig
··· 20 20 config SXGBE_ETH 21 21 tristate "Samsung 10G/2.5G/1G SXGBE Ethernet driver" 22 22 depends on HAS_IOMEM && HAS_DMA 23 + depends on PTP_1588_CLOCK_OPTIONAL 23 24 select PHYLIB 24 25 select CRC32 25 - imply PTP_1588_CLOCK 26 26 help 27 27 This is the driver for the SXGBE 10G Ethernet IP block found on 28 28 Samsung platforms.
+1 -1
drivers/net/ethernet/sfc/Kconfig
··· 19 19 config SFC 20 20 tristate "Solarflare SFC9000/SFC9100/EF100-family support" 21 21 depends on PCI 22 + depends on PTP_1588_CLOCK_OPTIONAL 22 23 select MDIO 23 24 select CRC32 24 - imply PTP_1588_CLOCK 25 25 help 26 26 This driver supports 10/40-gigabit Ethernet cards based on 27 27 the Solarflare SFC9000-family and SFC9100-family controllers.
+1 -1
drivers/net/ethernet/stmicro/stmmac/Kconfig
··· 2 2 config STMMAC_ETH 3 3 tristate "STMicroelectronics Multi-Gigabit Ethernet driver" 4 4 depends on HAS_IOMEM && HAS_DMA 5 + depends on PTP_1588_CLOCK_OPTIONAL 5 6 select MII 6 7 select PCS_XPCS 7 8 select PAGE_POOL 8 9 select PHYLINK 9 10 select CRC32 10 - imply PTP_1588_CLOCK 11 11 select RESET_CONTROLLER 12 12 help 13 13 This is the driver for the Ethernet IPs built around a
+2
drivers/net/phy/Kconfig
··· 236 236 config MICROSEMI_PHY 237 237 tristate "Microsemi PHYs" 238 238 depends on MACSEC || MACSEC=n 239 + depends on PTP_1588_CLOCK_OPTIONAL || !NETWORK_PHY_TIMESTAMPING 239 240 select CRYPTO_LIB_AES if MACSEC 240 241 help 241 242 Currently supports VSC8514, VSC8530, VSC8531, VSC8540 and VSC8541 PHYs ··· 254 253 255 254 config NXP_C45_TJA11XX_PHY 256 255 tristate "NXP C45 TJA11XX PHYs" 256 + depends on PTP_1588_CLOCK_OPTIONAL 257 257 help 258 258 Enable support for NXP C45 TJA11XX PHYs. 259 259 Currently supports only the TJA1103 PHY.
+14 -1
drivers/ptp/Kconfig
··· 8 8 config PTP_1588_CLOCK 9 9 tristate "PTP clock support" 10 10 depends on NET && POSIX_TIMERS 11 + default ETHERNET 11 12 select PPS 12 13 select NET_PTP_CLASSIFY 13 14 help ··· 26 25 27 26 To compile this driver as a module, choose M here: the module 28 27 will be called ptp. 28 + 29 + config PTP_1588_CLOCK_OPTIONAL 30 + tristate 31 + default y if PTP_1588_CLOCK=n 32 + default PTP_1588_CLOCK 33 + help 34 + Drivers that can optionally use the PTP_1588_CLOCK framework 35 + should depend on this symbol to prevent them from being built 36 + into vmlinux while the PTP support itself is in a loadable 37 + module. 38 + If PTP support is disabled, this dependency will still be 39 + met, and drivers refer to dummy helpers. 29 40 30 41 config PTP_1588_CLOCK_DTE 31 42 tristate "Broadcom DTE as PTP clock" ··· 104 91 tristate "Intel PCH EG20T as PTP clock" 105 92 depends on X86_32 || COMPILE_TEST 106 93 depends on HAS_IOMEM && NET 107 - imply PTP_1588_CLOCK 94 + depends on PTP_1588_CLOCK 108 95 help 109 96 This driver adds support for using the PCH EG20T as a PTP 110 97 clock. The hardware supports time stamping of PTP packets
+2
drivers/ptp/ptp_vclock.c
··· 149 149 kfree(vclock); 150 150 } 151 151 152 + #if IS_BUILTIN(CONFIG_PTP_1588_CLOCK) 152 153 int ptp_get_vclocks_index(int pclock_index, int **vclock_index) 153 154 { 154 155 char name[PTP_CLOCK_NAME_LEN] = ""; ··· 218 217 hwtstamps->hwtstamp = ns_to_ktime(ns); 219 218 } 220 219 EXPORT_SYMBOL(ptp_convert_timestamp); 220 + #endif
+1
drivers/scsi/cxgbi/cxgb4i/Kconfig
··· 2 2 config SCSI_CXGB4_ISCSI 3 3 tristate "Chelsio T4 iSCSI support" 4 4 depends on PCI && INET && (IPV6 || IPV6=n) 5 + depends on PTP_1588_CLOCK_OPTIONAL 5 6 depends on THERMAL || !THERMAL 6 7 depends on ETHERNET 7 8 depends on TLS || TLS=n
+28 -20
include/linux/ptp_clock_kernel.h
··· 215 215 return (long)ppb; 216 216 } 217 217 218 - #if IS_REACHABLE(CONFIG_PTP_1588_CLOCK) 218 + #if IS_ENABLED(CONFIG_PTP_1588_CLOCK) 219 219 220 220 /** 221 221 * ptp_clock_register() - register a PTP hardware clock driver ··· 307 307 */ 308 308 void ptp_cancel_worker_sync(struct ptp_clock *ptp); 309 309 310 + #else 311 + static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, 312 + struct device *parent) 313 + { return NULL; } 314 + static inline int ptp_clock_unregister(struct ptp_clock *ptp) 315 + { return 0; } 316 + static inline void ptp_clock_event(struct ptp_clock *ptp, 317 + struct ptp_clock_event *event) 318 + { } 319 + static inline int ptp_clock_index(struct ptp_clock *ptp) 320 + { return -1; } 321 + static inline int ptp_find_pin(struct ptp_clock *ptp, 322 + enum ptp_pin_function func, unsigned int chan) 323 + { return -1; } 324 + static inline int ptp_schedule_worker(struct ptp_clock *ptp, 325 + unsigned long delay) 326 + { return -EOPNOTSUPP; } 327 + static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp) 328 + { } 329 + #endif 330 + 331 + #if IS_BUILTIN(CONFIG_PTP_1588_CLOCK) 332 + /* 333 + * These are called by the network core, and don't work if PTP is in 334 + * a loadable module. 335 + */ 336 + 310 337 /** 311 338 * ptp_get_vclocks_index() - get all vclocks index on pclock, and 312 339 * caller is responsible to free memory ··· 354 327 */ 355 328 void ptp_convert_timestamp(struct skb_shared_hwtstamps *hwtstamps, 356 329 int vclock_index); 357 - 358 330 #else 359 - static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, 360 - struct device *parent) 361 - { return NULL; } 362 - static inline int ptp_clock_unregister(struct ptp_clock *ptp) 363 - { return 0; } 364 - static inline void ptp_clock_event(struct ptp_clock *ptp, 365 - struct ptp_clock_event *event) 366 - { } 367 - static inline int ptp_clock_index(struct ptp_clock *ptp) 368 - { return -1; } 369 - static inline int ptp_find_pin(struct ptp_clock *ptp, 370 - enum ptp_pin_function func, unsigned int chan) 371 - { return -1; } 372 - static inline int ptp_schedule_worker(struct ptp_clock *ptp, 373 - unsigned long delay) 374 - { return -EOPNOTSUPP; } 375 - static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp) 376 - { } 377 331 static inline int ptp_get_vclocks_index(int pclock_index, int **vclock_index) 378 332 { return 0; } 379 333 static inline void ptp_convert_timestamp(struct skb_shared_hwtstamps *hwtstamps,