Mi-am dat seama că parsam flag.urile prost. In primul rând, mi se pare gresit să enablezi ceva dacă PTP_ENABLE_FEATURE nu e setat. În al 2lea rând, dacă nu se specifica nici falling edge, nici rising edge, functiona cu ce se găsea în registre, ceea ce era greșit. Zi-mi dacă au sens modificările. Link de unde m-am inspirat pentru flag.uri: https://elixir.bootlin.com/linux/latest/source/tools/testing/selftests/ptp/testptp.c#L65 Fixes 7a71c8aa0a75c ("phy: nxp-c45-tja11xx: add extts and perout support") CC: stable@xxxxxxxxxxxxxxx # 5.15+ Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@xxxxxxxxxxx> --- drivers/net/phy/nxp-c45-tja11xx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c index f0d047019f33..ef4acb8eb0e4 100644 --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -595,7 +595,11 @@ static int nxp_c45_extts_enable(struct nxp_c45_phy *priv, return 0; } - if (extts->flags & PTP_RISING_EDGE) + if (!(extts->flags & PTP_ENABLE_FEATURE)) + return -EINVAL; + + if ((extts->flags == PTP_ENABLE_FEATURE) || + (extts->flags & PTP_RISING_EDGE)) phy_clear_bits_mmd(priv->phydev, MDIO_MMD_VEND1, VEND1_PTP_CONFIG, EXT_TRG_EDGE); -- 2.34.1