[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0a7601dc4f8d$44034400$cc09cc00$@trustnetic.com>
Date: Fri, 7 Nov 2025 10:21:46 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Vadim Fedorenko'" <vadim.fedorenko@...ux.dev>,
<netdev@...r.kernel.org>,
"'Andrew Lunn'" <andrew+netdev@...n.ch>,
"'David S. Miller'" <davem@...emloft.net>,
"'Eric Dumazet'" <edumazet@...gle.com>,
"'Jakub Kicinski'" <kuba@...nel.org>,
"'Paolo Abeni'" <pabeni@...hat.com>,
"'Richard Cochran'" <richardcochran@...il.com>,
"'Simon Horman'" <horms@...nel.org>,
"'Jacob Keller'" <jacob.e.keller@...el.com>,
<netdev@...r.kernel.org>,
"'Andrew Lunn'" <andrew+netdev@...n.ch>,
"'David S. Miller'" <davem@...emloft.net>,
"'Eric Dumazet'" <edumazet@...gle.com>,
"'Jakub Kicinski'" <kuba@...nel.org>,
"'Paolo Abeni'" <pabeni@...hat.com>,
"'Richard Cochran'" <richardcochran@...il.com>,
"'Simon Horman'" <horms@...nel.org>,
"'Jacob Keller'" <jacob.e.keller@...el.com>
Cc: "'Mengyuan Lou'" <mengyuanlou@...-swift.com>,
<stable@...r.kernel.org>,
"'Mengyuan Lou'" <mengyuanlou@...-swift.com>,
<stable@...r.kernel.org>
Subject: RE: [PATCH net] net: txgbe: remove wx_ptp_init() in device reset flow
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().
Powered by blists - more mailing lists