Commitd1cbfd771c
("ptp_clock: Allow for it to be optional") changed all PTP-capable Ethernet drivers from `select PTP_1588_CLOCK` to `imply PTP_1588_CLOCK`, "in order to break the hard dependency between the PTP clock subsystem and ethernet drivers capable of being clock providers." As a result it is possible to build PTP-capable Ethernet drivers without the PTP subsystem by deselecting PTP_1588_CLOCK. Drivers are required to handle the missing dependency gracefully. Some PTP-capable Ethernet drivers (e.g., TI_CPSW) factor their PTP code out into separate drivers (e.g., TI_CPTS_MOD). The above commit also changed these PTP-specific drivers to `imply PTP_1588_CLOCK`, making it possible to build them without the PTP subsystem. But as Grygorii Strashko noted in [1]: On Wed, Apr 22, 2020 at 02:16:11PM +0300, Grygorii Strashko wrote: > Another question is that CPTS completely nonfunctional in this case and > it was never expected that somebody will even try to use/run such > configuration (except for random build purposes). In my view, enabling a PTP-specific driver without the PTP subsystem is a configuration error made possible by the above commit. Kconfig should not allow users to create a configuration with missing dependencies that results in "completely nonfunctional" drivers. I audited all network drivers that call ptp_clock_register() but merely `imply PTP_1588_CLOCK` and found five PTP-specific drivers that are likely nonfunctional without PTP_1588_CLOCK: NET_DSA_MV88E6XXX_PTP NET_DSA_SJA1105_PTP MACB_USE_HWSTAMP CAVIUM_PTP TI_CPTS_MOD Note how these symbols all reference PTP or timestamping in their name; this is a clue that they depend on PTP_1588_CLOCK. Change them from `imply PTP_1588_CLOCK` [2] to `depends on PTP_1588_CLOCK`. I'm not using `select PTP_1588_CLOCK` here because PTP_1588_CLOCK has its own dependencies, which `select` would not transitively apply. Additionally, remove the `select NET_PTP_CLASSIFY` from CPTS_TI_MOD; PTP_1588_CLOCK already selects that. [1]: https://lore.kernel.org/lkml/c04458ed-29ee-1797-3a11-7f3f560553e6@ti.com/ [2]: NET_DSA_SJA1105_PTP had never declared any type of dependency on PTP_1588_CLOCK (`imply` or otherwise); adding a `depends on PTP_1588_CLOCK` here seems appropriate. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Fixes:d1cbfd771c
("ptp_clock: Allow for it to be optional") Signed-off-by: Clay McClure <clay@daemons.net> Signed-off-by: David S. Miller <davem@davemloft.net>
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config NET_DSA_SJA1105
|
|
tristate "NXP SJA1105 Ethernet switch family support"
|
|
depends on NET_DSA && SPI
|
|
select NET_DSA_TAG_SJA1105
|
|
select PACKING
|
|
select CRC32
|
|
help
|
|
This is the driver for the NXP SJA1105 automotive Ethernet switch
|
|
family. These are 5-port devices and are managed over an SPI
|
|
interface. Probing is handled based on OF bindings and so is the
|
|
linkage to PHYLINK. The driver supports the following revisions:
|
|
- SJA1105E (Gen. 1, No TT-Ethernet)
|
|
- SJA1105T (Gen. 1, TT-Ethernet)
|
|
- SJA1105P (Gen. 2, No SGMII, No TT-Ethernet)
|
|
- SJA1105Q (Gen. 2, No SGMII, TT-Ethernet)
|
|
- SJA1105R (Gen. 2, SGMII, No TT-Ethernet)
|
|
- SJA1105S (Gen. 2, SGMII, TT-Ethernet)
|
|
|
|
config NET_DSA_SJA1105_PTP
|
|
bool "Support for the PTP clock on the NXP SJA1105 Ethernet switch"
|
|
depends on NET_DSA_SJA1105
|
|
depends on PTP_1588_CLOCK
|
|
help
|
|
This enables support for timestamping and PTP clock manipulations in
|
|
the SJA1105 DSA driver.
|
|
|
|
config NET_DSA_SJA1105_TAS
|
|
bool "Support for the Time-Aware Scheduler on NXP SJA1105"
|
|
depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
|
|
depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
|
|
depends on NET_DSA_SJA1105_PTP
|
|
help
|
|
This enables support for the TTEthernet-based egress scheduling
|
|
engine in the SJA1105 DSA driver, which is controlled using a
|
|
hardware offload of the tc-tqprio qdisc.
|