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, michal.swiatkowski@linux.intel.com,
poros@redhat.com, david.m.ertman@intel.com, pengpeng@iscas.ac.cn,
przemyslaw.kitszel@intel.com, vinicius.gomes@intel.com,
sridhar.samudrala@intel.com, aleksandr.loktionov@intel.com,
horms@kernel.org, alexander.nowlin@intel.com
Subject: Re: [PATCH net 5/6] ice: propagate ETH56G deskew poll failures
Date: Tue, 17 Nov 2026 23:54:36 +0000 [thread overview]
Message-ID: <179495967625.3136.6756400467139907257@kernel.org> (raw)
In-Reply-To: <20261113231225.1864810-6-anthony.l.nguyen@intel.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] This patch makes a DESKEW_0.VALID poll timeout in
ice_ptp_calc_deskew_eth56g() a hard failure (-ETIMEDOUT).
- [Low] The patch adds new error returns to ice_phy_set_offsets_eth56g():
a PHY_REG_DESKEW_0 sideband read error, and -ETIMEDOUT when…
--
ice: propagate ETH56G deskew poll failures
This changes ice_ptp_calc_deskew_eth56g() to return an error code and
pass the deskew value back through an output parameter. The poll now
stops on a register read error. Both read errors and poll timeouts are
propagated, and ice_phy_set_offsets_eth56g() returns early when the
deskew calculation fails.
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> index 3a41c711e751b..da48d3adf94f5 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> @@ -1736,24 +1736,30 @@ static u32 ice_ptp_calc_bitslip_eth56g(struct ice_hw *hw, u8 port, u32 bs,
[ ... ]
> - read_poll_timeout(ice_read_ptp_reg_eth56g, err,
> - FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i), 500,
> - 50 * USEC_PER_MSEC, false, hw, port, PHY_REG_DESKEW_0,
> - &deskew_i);
> + ret = read_poll_timeout(ice_read_ptp_reg_eth56g, err,
> + err || FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i),
> + 500, 50 * USEC_PER_MSEC, false, hw, port,
> + PHY_REG_DESKEW_0, &deskew_i);
> if (err)
> return err;
> + if (ret)
> + return ret;
[ ... ]
> @@ -1805,11 +1814,16 @@ static int ice_phy_set_offsets_eth56g(struct ice_hw *hw, u8 port,
> if (sfd)
> rx_offset = add_u32_u32_fx(rx_offset, cfg->rx_offset.sfd);
>
> - if (spd < ICE_ETH56G_LNK_SPD_40G)
> + if (spd < ICE_ETH56G_LNK_SPD_40G) {
> bs_ds = ice_ptp_calc_bitslip_eth56g(hw, port, bs_ds, fc, rs,
> spd);
> - else
> - bs_ds = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd);
> + } else {
> + err = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd,
> + &bs_ds);
> + if (err)
> + return err;
[Severity: Medium]
Is it intended that a DESKEW_0.VALID timeout now aborts the whole PHY
timer start?
Before this patch, a timeout could only leave the Rx deskew wrong. The Tx
offset was still written and the PHY timer was still synced.
With this early return, a -ETIMEDOUT from ice_ptp_calc_deskew_eth56g() on
a 40G/50G2/100G port skips the PHY_MAC_RX_OFFSET write. It also skips the
PHY_MAC_TX_OFFSET write, which doesn't depend on deskew. The error then
unwinds through:
ice_ptp_port_phy_restart()
ice_start_phy_timer_eth56g()
ice_phy_cfg_mac_eth56g()
ice_phy_set_offsets_eth56g()
ice_ptp_calc_deskew_eth56g()
ice_phy_cfg_mac_eth56g() returns without writing PHY_MAC_MARKERTIME.
RX/TX_MODULO, TSU_CONFIG and BLOCKTIME have already been programmed for
the new speed at that point.
ice_start_phy_timer_eth56g() has already called
ice_stop_phy_timer_eth56g(), which cleared TX/RX_OFFSET_READY. It now
returns without loading INCVAL into PHY_REG_TIMETUS, issuing
ICE_PTP_INIT_INCVAL, calling ice_sync_phy_timer_eth56g() or setting
OFFSET_READY back to 1.
Can anything recover the port after this? In ice_ptp_port_phy_restart()
the E825 branch only logs the error:
case ICE_MAC_GENERIC_3K_E825:
err = ice_start_phy_timer_eth56g(hw, port);
break;
...
if (err)
dev_err(ice_pf_to_dev(pf), "PTP failed to set PHY port %d up, err %d\n",
port, err);
The ICE_MAC_GENERIC branch sets ptp_port->tx.disabled, but this branch
does not, so Tx timestamp requests are still accepted. Nothing retries
either, so Rx and Tx timestamping on the port appear to stay down until
the next link event.
This patch carries a Fixes: tag. Should the commit message mention that
a deskew poll timeout now turns degraded Rx accuracy into a total loss
of timestamping on the port?
> + }
[Severity: Low]
This isn't a bug, but the kernel-doc for ice_phy_set_offsets_eth56g()
still says:
* Return:
* * %0 - success
* * %other - failed to write to PHY
With this change it can also return a PHY_REG_DESKEW_0 read error, or
-ETIMEDOUT from the poll.
ice_phy_cfg_mac_eth56g() ("%other - failed to write to PHY") and
ice_start_phy_timer_eth56g() ("%other - PHY read/write failed") pass
these errors up unchanged, and their comments don't mention them either.
Should these comments be updated along with the one for
ice_ptp_calc_deskew_eth56g()?
> +
> rx_offset = add_u32_u32_fx(rx_offset, bs_ds);
> rx_offset &= ICE_ETH56G_MAC_CFG_RX_OFFSET_INT |
> ICE_ETH56G_MAC_CFG_RX_OFFSET_FRAC;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
next prev parent reply other threads:[~2026-11-17 23:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 5/6] ice: propagate ETH56G deskew poll failures Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko [this message]
2026-11-13 23:12 ` [PATCH net 6/6] ice: allow reading the last byte of the NVM and Shadow RAM regions Tony Nguyen
2026-11-13 23:18 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) netdev-bot+sinfo
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=179495967625.3136.6756400467139907257@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=alexander.nowlin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pengpeng@iscas.ac.cn \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=vinicius.gomes@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