All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Fugang Duan <fugang.duan@nxp.com>
Subject: Re: [PATCH 1/1] net: fec: ptp: avoid register access when ipg clock is disabled
Date: Tue, 23 Feb 2021 06:27:26 -0800	[thread overview]
Message-ID: <20210223142726.GA4711@hoboy.vegasvil.org> (raw)
In-Reply-To: <CAEyMn7ZM7_pPor0S=dMGbmnp0hmZMrpquGqq4VNu-ixSPp+0UQ@mail.gmail.com>

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 <kuba@kernel.org>:
> > 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.

Thanks,
Richard

  reply	other threads:[~2021-02-23 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20  6:56 [PATCH 1/1] net: fec: ptp: avoid register access when ipg clock is disabled Heiko Thiery
2021-02-23  3:00 ` Jakub Kicinski
2021-02-23  8:00   ` Heiko Thiery
2021-02-23 14:27     ` Richard Cochran [this message]
2021-02-23 15:04       ` Heiko Thiery
2021-02-23 16:11         ` Richard Cochran
2021-02-25 13:49           ` Heiko Thiery
2021-02-25 14:05             ` Heiko Thiery
2021-02-25 17:14               ` Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210223142726.GA4711@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fugang.duan@nxp.com \
    --cc=heiko.thiery@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.