public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: fec: fix the PTP periodic output sysfs interface
@ 2026-03-18 15:56 Buday Csaba
  2026-03-18 22:52 ` Frank Li
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Buday Csaba @ 2026-03-18 15:56 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran,
	Csókás, Bence, Frank Li, Francesco Dolcini, imx, netdev,
	linux-kernel
  Cc: Buday Csaba

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 <buday.csaba@prolan.hu>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-19  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 15:56 [PATCH net 1/1] net: fec: fix the PTP periodic output sysfs interface Buday Csaba
2026-03-18 22:52 ` Frank Li
2026-03-18 23:32 ` Jakub Kicinski
2026-03-19  3:35 ` Wei Fang
2026-03-19  8:04   ` Buday Csaba
2026-03-19  8:40     ` Wei Fang
2026-03-19  8:09 ` Francesco Dolcini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox