Thread (7 messages) 7 messages, 5 authors, 2026-03-19
STALE126d

[PATCH net 1/1] net: fec: fix the PTP periodic output sysfs interface

From: Buday Csaba <hidden>
Date: 2026-03-18 16:04:10
Also in: imx, lkml
Subsystem: freescale imx / mxc fec driver, networking drivers, the rest · Maintainers: Wei Fang, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

The PPS channel selection was incorrectly implemented in the orginal
commit (see fixes). The sysfs interface uses a logical channel index,
and rejects channel numbers greater than zero (n_per_out is 1).
See: period_store() in drivers/ptp/ptp_sysfs.c

On the other hand, the FEC PTP driver was expecting the hardware
channel number, making the periodic output unusable from the sysfs
interface, with the exception of channel 0.

Fix the FEC PTP driver to match the logical channel number of the
sysfs interface.

Fixes: bf8ca67e2167 ("net: fec: refactor PPS channel configuration")

Signed-off-by: Buday Csaba <redacted>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 7f6b574320716..c1af81002b8fa 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -534,7 +534,7 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,
 		if (rq->perout.flags)
 			return -EOPNOTSUPP;
 
-		if (rq->perout.index != fep->pps_channel)
+		if (rq->perout.index != 0)
 			return -EOPNOTSUPP;
 
 		period.tv_sec = rq->perout.period.sec;
-- 
2.39.5

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help