From: Jacob Keller <jacob.e.keller@intel.com>
To: <netdev-bot+sashiko@kernel.org>
Cc: <przemyslaw.kitszel@intel.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@kernel.org>, <kuba@kernel.org>,
<pabeni@redhat.com>, <poros@redhat.com>, <netdev@vger.kernel.org>,
<grzegorz.nitka@intel.com>, <aleksandr.loktionov@intel.com>,
<alexander.nowlin@intel.com>, <anthony.l.nguyen@intel.com>,
<maciej.machnikowski@intel.com>, <przemyslaw.korba@intel.com>,
<sergey.temerkhanov@intel.com>, <arkadiusz.kubalewski@intel.com>,
<richardcochran@gmail.com>, <horms@kernel.org>
Subject: Re: [PATCH net v5 09/13] ice: E825: clear PHY_TSTAMP memory prior to soft reset
Date: Mon, 26 Oct 2026 14:43:41 -0700 [thread overview]
Message-ID: <08f85dd6-c0e0-4a39-8172-9cb35e48562d@intel.com> (raw)
In-Reply-To: <179297184201.3134.9594473446313979273@kernel.org>
On 10/25/2026 4:44 PM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] In ice_ptp_phy_soft_reset_eth56g()
> (drivers/net/ethernet/intel/ice/ice_ptp_hw.c), the read sweep…
>
> --
>
> ice: E825: clear PHY_TSTAMP memory prior to soft reset
>
> This commit removes the write-based ice_ptp_reset_ts_memory_eth56g(). In
> its place, a new ice_ptp_clear_tx_memory_status_eth56g() reads every
> PHY_TSTAMP index for a port. That sweep is now called at the start of
> ice_ptp_phy_soft_reset_eth56g(), so the soft reset clears the internal Tx
> timestamp counter after the reads. E825 is also dropped from
> ice_ptp_reset_ts_memory().
>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> index 07b55fbb88dd..5637925c0e68 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>
> [ ... ]
>
>> @@ -2311,6 +2312,8 @@ int ice_ptp_phy_soft_reset_eth56g(struct ice_hw *hw, u8 port)
>> u32 global_val;
>> int err;
>>
>> + ice_ptp_clear_tx_memory_status_eth56g(hw, port);
>> +
>> err = ice_read_ptp_reg_eth56g(hw, port, PHY_REG_GLOBAL, &global_val);
>> if (err) {
>> ice_debug(hw, ICE_DBG_PTP, "Failed to read PHY_REG_GLOBAL for port %d, err %d\n",
>
> [Severity: Low]
> The sweep has no return value and always runs before the PHY_REG_GLOBAL
> read and the three PHY_REG_GLOBAL writes. Any of those sideband accesses
> can fail and make ice_ptp_phy_soft_reset_eth56g() return early. If that
> happens, the port has been swept but its internal counter was never
> reset.
>
> The new kdoc for ice_ptp_clear_tx_memory_status_eth56g() says:
>
> Due to interactions with an internal HW counter for the number of
> outstanding Tx timestamps, this *must* only be called as part of the
> ice_ptp_phy_soft_reset_eth56g() procedure. Otherwise, the internal counter
> may become out of sync and prevent new timestamp interrupts.
>
> Doesn't this error path leave the port in the state that comment warns
> about?
>
> I could not find any visible effect from this today:
>
> - ice_ptp_init_phc_e825c() stops at the first port that fails.
> - The error reaches ice_ptp_init_owner() or ice_ptp_rebuild_owner(), and
> both treat it as fatal for PTP.
> - Recovery paths, such as a link toggle or a driver reload, run the sweep
> and the soft reset again.
>
> So this looks like a robustness and documentation mismatch rather than a
> functional regression.
>
> Could PHY_REG_GLOBAL be read before the sweep, so that a failure at that
> first step happens before the counter is touched? Alternatively, the kdoc
> could be updated to cover the error path.
>
We can update the kdoc to better clarify. The intention is that if any
of the writes during the restart fail we will error out to the top level
of the PHY restart and log an error that a link restart is necessary,
rather than trying to implment more complex restart or other error
handling logic in the lower level of the driver.
next prev parent reply other threads:[~2026-10-26 21:43 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 22:12 [PATCH net v5 00/13] ice: E82x: timestamp processing logic fixes Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 01/13] ice: fix removal of PTP timestamp tracker during reset Jacob Keller
2026-10-25 23:43 ` netdev-bot+sashiko
2026-10-26 21:23 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 02/13] ice: use reference counting and SRCU for PTP port access Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 03/13] ice: fix PHY port restart serialization Jacob Keller
2026-10-25 23:43 ` netdev-bot+sashiko
2026-10-26 21:30 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 04/13] ice: set in_use only after preparing Tx timestamp index Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 05/13] ice: call PTP link change only from link events Jacob Keller
2026-10-25 23:43 ` netdev-bot+sashiko
2026-10-26 21:40 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 06/13] ice: E822: keep Tx timestamps disabled during offset calibration Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 07/13] ice: E822: cancel offset verification work during reset preparation Jacob Keller
2026-10-25 23:43 ` netdev-bot+sashiko
2026-10-26 21:41 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 08/13] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY Jacob Keller
2026-10-25 23:44 ` netdev-bot+sashiko
2026-10-26 21:41 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 09/13] ice: E825: clear PHY_TSTAMP memory prior to soft reset Jacob Keller
2026-10-25 23:44 ` netdev-bot+sashiko
2026-10-26 21:43 ` Jacob Keller [this message]
2026-10-21 22:12 ` [PATCH net v5 10/13] ice: E825: perform a soft reset when starting the PHY timer Jacob Keller
2026-10-25 23:44 ` netdev-bot+sashiko
2026-10-26 21:52 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 11/13] ice: keep Tx timestamp slots tracked until completion or timeout Jacob Keller
2026-10-25 23:44 ` netdev-bot+sashiko
2026-10-26 21:58 ` Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 12/13] ice: skip reading Tx ready bitmap on ports with no timestamps Jacob Keller
2026-10-21 22:12 ` [PATCH net v5 13/13] ice: don't clear in_use until HW clears ready bitmap Jacob Keller
2026-10-25 23:44 ` netdev-bot+sashiko
2026-10-26 22:07 ` Jacob Keller
2026-10-27 14:40 ` [PATCH net v5 00/13] ice: E82x: timestamp processing logic fixes Paolo Abeni
2026-10-27 19:32 ` Jacob Keller
2026-10-27 22:15 ` Jakub Kicinski
2026-10-27 22:57 ` Jacob Keller
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=08f85dd6-c0e0-4a39-8172-9cb35e48562d@intel.com \
--to=jacob.e.keller@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=alexander.nowlin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grzegorz.nitka@intel.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=maciej.machnikowski@intel.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=przemyslaw.korba@intel.com \
--cc=richardcochran@gmail.com \
--cc=sergey.temerkhanov@intel.com \
/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