2022-03-10 14:08:13

by Anders Roxell

[permalink] [raw]
Subject: [PATCH] net: phy: Kconfig: micrel_phy: fix dependency issue

When building driver CONFIG_MICREL_PHY the follow error shows up:

aarch64-linux-gnu-ld: drivers/net/phy/micrel.o: in function `lan8814_ts_info':
micrel.c:(.text+0x1764): undefined reference to `ptp_clock_index'
micrel.c:(.text+0x1764): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ptp_clock_index'
aarch64-linux-gnu-ld: drivers/net/phy/micrel.o: in function `lan8814_probe':
micrel.c:(.text+0x4720): undefined reference to `ptp_clock_register'
micrel.c:(.text+0x4720): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ptp_clock_register'

Rework Kconfig for MICREL_PHY to depend on 'PTP_1588_CLOCK_OPTIONAL ||
!NETWORK_PHY_TIMESTAMPING'. Arnd describes in a good way why its needed
to add this depends in patch e5f31552674e ("ethernet: fix PTP_1588_CLOCK
dependencies").

Reported-by: kernel test robot <[email protected]>
Fixes: ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy")
Signed-off-by: Anders Roxell <[email protected]>
---
drivers/net/phy/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 902495afcb38..ea7571a2b39b 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -220,6 +220,7 @@ config MEDIATEK_GE_PHY

config MICREL_PHY
tristate "Micrel PHYs"
+ depends on PTP_1588_CLOCK_OPTIONAL
help
Supports the KSZ9021, VSC8201, KS8001 PHYs.

--
2.35.1


2022-03-11 20:46:41

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH] net: phy: Kconfig: micrel_phy: fix dependency issue

The description says:

> Rework Kconfig for MICREL_PHY to depend on 'PTP_1588_CLOCK_OPTIONAL ||
> !NETWORK_PHY_TIMESTAMPING'.

> config MICREL_PHY
> tristate "Micrel PHYs"
> + depends on PTP_1588_CLOCK_OPTIONAL

But you actually added only a subset?

Andrew

2022-03-15 02:22:49

by Anders Roxell

[permalink] [raw]
Subject: Re: [PATCH] net: phy: Kconfig: micrel_phy: fix dependency issue

On Thu, 10 Mar 2022 at 15:38, Andrew Lunn <[email protected]> wrote:
>
> The description says:
>
> > Rework Kconfig for MICREL_PHY to depend on 'PTP_1588_CLOCK_OPTIONAL ||
> > !NETWORK_PHY_TIMESTAMPING'.
>
> > config MICREL_PHY
> > tristate "Micrel PHYs"
> > + depends on PTP_1588_CLOCK_OPTIONAL
>
> But you actually added only a subset?

You are correct, I will send a updated version shortly.

Cheers,
Anders