[lkml]   [2021]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] net: fec: ptp: avoid register access when ipg clock is disabled
On Tue, Feb 23, 2021 at 09:00:32AM +0100, Heiko Thiery wrote:
> HI Jakub,
> Am Di., 23. Feb. 2021 um 04:00 Uhr schrieb Jakub Kicinski <>:
> > Why is the PTP interface registered when it can't be accessed?
> >
> > Perhaps the driver should unregister the PTP clock when it's brought
> > down?

I don't see any reason why a clock should stop ticking just because
the interface is down. This is a poor driver design, but sadly it
gets copied and even defended.

> Good question, but I do not know what happens e.g. with linuxptp when
> the device that was opened before will be gone.

If a network interface goes down, ptp4l will notice via rtnl and close
the interface. Then it re-opens the sockets on rtnl up. However, the
file descriptor representing the dynamic posix clock stays opened.


 \ /
  Last update: 2021-02-23 15:29    [W:0.057 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site