From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Vadim Fedorenko'" <vadim.fedorenko@linux.dev>,
<netdev@vger.kernel.org>, "'Andrew Lunn'" <andrew+netdev@lunn.ch>,
"'David S. Miller'" <davem@davemloft.net>,
"'Eric Dumazet'" <edumazet@google.com>,
"'Jakub Kicinski'" <kuba@kernel.org>,
"'Paolo Abeni'" <pabeni@redhat.com>,
"'Richard Cochran'" <richardcochran@gmail.com>,
"'Simon Horman'" <horms@kernel.org>,
"'Jacob Keller'" <jacob.e.keller@intel.com>,
<netdev@vger.kernel.org>, "'Andrew Lunn'" <andrew+netdev@lunn.ch>,
"'David S. Miller'" <davem@davemloft.net>,
"'Eric Dumazet'" <edumazet@google.com>,
"'Jakub Kicinski'" <kuba@kernel.org>,
"'Paolo Abeni'" <pabeni@redhat.com>,
"'Richard Cochran'" <richardcochran@gmail.com>,
"'Simon Horman'" <horms@kernel.org>,
"'Jacob Keller'" <jacob.e.keller@intel.com>
Cc: "'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
<stable@vger.kernel.org>,
"'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
<stable@vger.kernel.org>
Subject: RE: [PATCH net] net: txgbe: remove wx_ptp_init() in device reset flow
Date: Fri, 7 Nov 2025 10:21:46 +0800 [thread overview]
Message-ID: <0a7601dc4f8d$44034400$cc09cc00$@trustnetic.com> (raw)
In-Reply-To: <04492fd4-4808-421a-b082-a05503b1d714@linux.dev>
On Thu, Nov 6, 2025 7:27 PM, Vadim Fedorenko wrote:
> On 06/11/2025 02:05, Jiawen Wu wrote:
> > On Thu, Nov 6, 2025 4:03 AM, Vadim Fedorenko wrote:
> >> On 05/11/2025 02:07, Jiawen Wu wrote:
> >>> The functions txgbe_up() and txgbe_down() are called in pairs to reset
> >>> hardware configurations. PTP stop function is not called in
> >>> txgbe_down(), so there is no need to call PTP init function in
> >>> txgbe_up().
> >>>
> >>
> >> txgbe_reset() is called during txgbe_down(), and it calls
> >> wx_ptp_reset(), which I believe is the reason for wx_ptp_init() call
> >
> > wx_ptp_reset() just reset the hardware bits, but does not destroy the PTP clock.
> > wx_ptp_init() should be called after wx_ptp_stop() has been called.
>
> wx_ptp_init()/wx_ptp_reset() recalculate shift/mul configuration based
> on link speed. link down/link up sequence may bring new link speed,
> where these values have to reconfigured, right? I kinda agree
> that full procedure of wx_ptp_init() might not be needed, but we have to
> be sure not to reuse old ptp configuration.
This indicates that the original approach was also wrong. wx_ptp_init() would
return here: if (wx_ptp_create_clock(wx)).
But for the changing of link speed, wx_ptp_reset_cyclecounter() is called in
.mac_link_up() and .mac_link_down().
prev parent reply other threads:[~2025-11-07 2:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 2:07 [PATCH net] net: txgbe: remove wx_ptp_init() in device reset flow Jiawen Wu
2025-11-05 20:02 ` Vadim Fedorenko
2025-11-06 2:05 ` Jiawen Wu
2025-11-06 11:27 ` Vadim Fedorenko
2025-11-07 2:21 ` Jiawen Wu [this message]
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='0a7601dc4f8d$44034400$cc09cc00$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=stable@vger.kernel.org \
--cc=vadim.fedorenko@linux.dev \
/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 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).