Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	davem@davemloft.net, netdev@vger.kernel.org, gospo@broadcom.com
Subject: Re: [PATCH net 8/9] bnxt_en: Move bnxt_ptp_init() to bnxt_open()
Date: Mon, 19 Jul 2021 10:07:28 -0700	[thread overview]
Message-ID: <20210719170728.GB5568@hoboy.vegasvil.org> (raw)
In-Reply-To: <20210719124323.085fa184@cakuba>

On Mon, Jul 19, 2021 at 12:43:23PM +0200, Jakub Kicinski wrote:
> On Sun, 18 Jul 2021 15:36:32 -0400, Michael Chan wrote:
> > The device needs to be in ifup state for PTP to function, so move
> > bnxt_ptp_init() to bnxt_open().  This means that the PHC will be
> > registered during bnxt_open().
> 
> I think it's an anti-pattern to have the clock registered only when
> the device is up. Right, Richard?

Yes, indeed.

> IIRC Intel parts did it in the past because they had the clock hooked
> up to the MAC/PHY so the clock was not actually ticking. But seems like
> a wrong trade off to unreg PTP for SW convenience. Or maybe I'm
> biased against the live FW reset :) Let's see if Richard agrees.

Totally agree!

Ideally the PHC appears as soon as the driver instantiates for a HW
device.  Telling time from the clock is independent from the network
interface being up or down.

Some drivers are lazy and fail to decouple these two orthogonal
issues.  In some (all?) cases, there is no HW limitation involved,
just sloppy driver work.

Thanks,
Richard




  reply	other threads:[~2021-07-19 17:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-18 19:36 [PATCH net 0/9] bnxt_en: Bug fixes Michael Chan
2021-07-18 19:36 ` [PATCH net 1/9] bnxt_en: don't disable an already disabled PCI device Michael Chan
2021-07-18 19:36 ` [PATCH net 2/9] bnxt_en: reject ETS settings that will starve a TC Michael Chan
2021-07-18 19:36 ` [PATCH net 3/9] bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe() Michael Chan
2021-07-18 19:36 ` [PATCH net 4/9] bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task() Michael Chan
2021-07-18 19:36 ` [PATCH net 5/9] bnxt_en: fix error path of FW reset Michael Chan
2021-07-18 19:36 ` [PATCH net 6/9] bnxt_en: Validate vlan protocol ID on RX packets Michael Chan
2021-07-18 19:36 ` [PATCH net 7/9] bnxt_en: Check abort error state in bnxt_half_open_nic() Michael Chan
2021-07-18 19:36 ` [PATCH net 8/9] bnxt_en: Move bnxt_ptp_init() to bnxt_open() Michael Chan
2021-07-19 10:43   ` Jakub Kicinski
2021-07-19 17:07     ` Richard Cochran [this message]
2021-07-20  5:29       ` Michael Chan
2021-07-18 19:36 ` [PATCH net 9/9] bnxt_en: Fix PTP capability discovery Michael Chan
2021-07-19 16:00 ` [PATCH net 0/9] bnxt_en: Bug fixes patchwork-bot+netdevbpf

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=20210719170728.GB5568@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gospo@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net 8/9] bnxt_en: Move bnxt_ptp_init() to bnxt_open()' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).