RE: [PATCH net-next v1 4/5] net: lan743x: reset the device on TX timeout

From: Woojung.Huh

Date: Wed Oct 28 2026 - 16:57:35 EST


Hi Chris & Nicolai,

> > Is it ok to re-register the PTP clock on a reset the driver starts by
> > itself?
> >
> > ptp_clock_unregister() makes the open /dev/ptpN return -ENODEV, and
> > since the old index stays taken while ptp4l holds it, the reopen comes
> > back as a different /dev/ptpN. So ptp4l has to be restarted, which is
> > more than "set up timestamping again"...
> >
> > How about moving clock registration to probe instead, so it survives
> > the reset? Then only the hw timestamping config would need to be put
> > back.
>
> It may be best to get Microchip's opinion about how this should be
> handled. Woojung, can you answer this?
>
> Makes sense that moving clock registration to probe and remove would
> keep the PTP device valid across TX hang reset, but I'm not sure if
> there are other consequences to PTP still being disabled and re-enabled
> during reset.
>
> I'll update the commit message to be more clear about ptp4l needing to
> be restarted and try to run some tests to see what the effect is of
> moving clock registration.
>

Because TX path is already lockup, I would say that impacted PTP traffic
even though timestamp function still alive.
It could look ok at workaround point of view, my opinion is keeping
ptp_clock reg/unreg at *_open() and *_close().

Also, if moving out to *_probe(), PTP clock is not initialized at *_open()
time, module unload/load is required to reinit PTP clock.

Thanks
Woojung