From: netdev-bot+sashiko@kernel.org
To: anthony.l.nguyen@intel.com
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, andrew+netdev@lunn.ch,
netdev@vger.kernel.org, poros@redhat.com,
jacob.e.keller@intel.com, maciej.machnikowski@intel.com,
przemyslaw.korba@intel.com, grzegorz.nitka@intel.com,
sergey.temerkhanov@intel.com, arkadiusz.kubalewski@intel.com,
richardcochran@gmail.com, horms@kernel.org
Subject: Re: [PATCH net v3 08/14] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY
Date: Mon, 19 Oct 2026 20:14:10 +0000 [thread overview]
Message-ID: <179244085024.3135.15051854897545383662@kernel.org> (raw)
In-Reply-To: <20261015191102.1174111-9-anthony.l.nguyen@intel.com>
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] The kernel-doc no longer matches how the code uses `struct
ice_ptp_tx::calibrating` and `ice_ptp_mark_tx_tracker_stale()`.
- [Low] The new dev_err in `ice_ptp_port_phy_restart()`
(ice_ptp.c:1347-1349) says "Timestamping remains disabled", which is…
--
ice: E825: stop clearing PHY_REG_TX_OFFSET_READY
On E825, ice_stop_phy_timer_eth56g() no longer clears
PHY_REG_TX_OFFSET_READY, because clearing it puts the hardware Tx timestamp
counter out of sync. Instead, the PHY stop and restart paths set
tx.calibrating to block new Tx timestamp requests, and mark outstanding
timestamps stale. The unused soft_reset parameter is removed and the
restart failure message is reworded.
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
> index 6297773806949..365cff9c10173 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
> @@ -818,7 +818,8 @@ ice_ptp_mark_tx_tracker_stale(struct ice_ptp_tx *tx)
> unsigned long flags;
>
> spin_lock_irqsave(&tx->lock, flags);
> - bitmap_or(tx->stale, tx->stale, tx->in_use, tx->len);
> + if (tx->init)
> + bitmap_or(tx->stale, tx->stale, tx->in_use, tx->len);
> spin_unlock_irqrestore(&tx->lock, flags);
> }
>
[ ... ]
> @@ -1243,7 +1245,14 @@ ice_ptp_port_phy_stop(struct ice_ptp_port *ptp_port)
> err = ice_stop_phy_timer_e82x(hw, port, true);
> break;
> case ICE_MAC_GENERIC_3K_E825:
> - err = ice_stop_phy_timer_eth56g(hw, port, true);
> + /* Disable new Tx timestamp requests */
> + spin_lock_irqsave(&ptp_port->tx.lock, flags);
> + ptp_port->tx.calibrating = true;
> + spin_unlock_irqrestore(&ptp_port->tx.lock, flags);
> +
> + ice_ptp_mark_tx_tracker_stale(&ptp_port->tx);
[Severity: Low]
This isn't a bug, but should the kernel-doc for the calibrating field be
updated to match how E825 now uses it? In ice_ptp.h, struct ice_ptp_tx
still says:
* @calibrating: if true, the PHY is calibrating the Tx offset. During this
* window, timestamp requests are disabled.
After this patch, E825 sets the bit in ice_ptp_port_phy_stop() on link
down, where no calibration runs. The commit message also says E825 "does
not perform vernier calibration".
ice_ptp_port_phy_restart() leaves the bit set on failure, so it acts as a
"timestamping disabled until link toggle" state. ice_ptp_release() also
leaves the bit set after teardown.
The kernel-doc for ice_ptp_mark_tx_tracker_stale() has the same problem. It
still says:
* This should be called when the PTP clock is modified such as after a set
* time request.
It doesn't mention the new PHY stop and restart callers. It also doesn't say
that the helper now does nothing when tx->init is clear. The teardown order
in ice_ptp_release() depends on that check, because the tracker bitmaps have
already been freed:
ice_ptp_release()
ice_ptp_release_tx_tracker(pf, &pf->ptp.port.tx);
...
ice_ptp_port_phy_stop(&pf->ptp.port);
ice_ptp_mark_tx_tracker_stale(&ptp_port->tx);
Could both comments be updated to describe the new behavior?
> +
> + err = ice_stop_phy_timer_eth56g(hw, port);
> break;
[ ... ]
> @@ -1309,15 +1318,35 @@ ice_ptp_port_phy_restart(struct ice_ptp_port *ptp_port)
[ ... ]
> err = ice_start_phy_timer_eth56g(hw, port);
> + if (err)
> + break;
> +
> + spin_lock_irqsave(&ptp_port->tx.lock, flags);
> + ptp_port->tx.calibrating = false;
> + spin_unlock_irqrestore(&ptp_port->tx.lock, flags);
> +
> break;
> default:
[ ... ]
> if (err)
> - dev_err(ice_pf_to_dev(pf), "PTP failed to set PHY port %d up, err %d\n",
> - port, err);
> + dev_err(ice_pf_to_dev(pf), "PTP failed to restart PHY port %u with err %pe; Timestamping remains disabled; A link-toggle may recover.\n",
> + port, ERR_PTR(err));
[Severity: Low]
Is "Timestamping remains disabled" accurate for Rx on E825 in every
failure case?
Tx is now blocked only in software, through tx.calibrating. Rx is blocked
only in hardware, through PHY_REG_RX_OFFSET_READY.
Suppose the first register write in ice_start_phy_timer_eth56g() fails:
ice_start_phy_timer_eth56g()
err = ice_stop_phy_timer_eth56g(hw, port);
if (err)
return err;
PHY_REG_RX_OFFSET_READY then keeps its previous value, for example 1 from
an earlier successful start. The hardware may keep marking Rx descriptor
timestamps valid, even though ice_sync_phy_timer_eth56g() never ran.
If any later step fails, RX_OFFSET_READY has already been cleared and the
message is accurate. The early return is not new; only the message's
absolute claim is.
Could the message be more precise here, for example by saying that Tx
timestamping remains disabled?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261015191102.1174111-1-anthony.l.nguyen%40intel.com
next prev parent reply other threads:[~2026-10-19 20:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 19:10 [PATCH net v3 00/14][pull request] ice: E82x: timestamp processing logic fixes Tony Nguyen
2026-10-15 19:10 ` [PATCH net v3 01/14] ice: fix removal of PTP timestamp tracker during reset Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:14 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 02/14] ice: use reference counting and SRCU for PTP port access Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:16 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 03/14] ice: fix PHY port restart serialization Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:21 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 04/14] ice: set in_use only after preparing Tx timestamp index Tony Nguyen
2026-10-15 19:10 ` [PATCH net v3 05/14] ice: call PTP link change only from link events Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:35 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 06/14] ice: E822: keep Tx timestamps disabled during offset calibration Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:37 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 07/14] ice: E822: cancel offset verification work during reset preparation Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:40 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 08/14] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko [this message]
2026-10-19 23:42 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 09/14] ice: E825: clear PHY_TSTAMP memory prior to soft reset Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:49 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 10/14] ice: E825: perform a soft reset when starting the PHY timer Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:57 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 11/14] ice: wait for in-flight Tx timestamps before removing the tracker Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-20 0:05 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 12/14] ice: keep Tx timestamp slots tracked until completion or timeout Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-15 19:10 ` [PATCH net v3 13/14] ice: skip reading Tx ready bitmap on ports with no timestamps Tony Nguyen
2026-10-15 19:11 ` [PATCH net v3 14/14] ice: don't clear in_use until HW clears ready bitmap Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
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=179244085024.3135.15051854897545383662@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--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=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=maciej.machnikowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.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