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, willemb@google.com,
netdev@vger.kernel.org, marcin.szycik@intel.com,
arkadiusz.kubalewski@intel.com, poros@redhat.com,
david.m.ertman@intel.com, przemyslaw.kitszel@intel.com,
aleksandr.loktionov@intel.com, joe@dama.to,
patryk.holda@intel.com
Subject: Re: [PATCH net-next 1/4] ice: add support for unmanaged DPLL on E830 NIC
Date: Fri, 04 Dec 2026 00:24:31 +0000 [thread overview]
Message-ID: <179634387184.3146.17623140627118251979@kernel.org> (raw)
In-Reply-To: <20261203002248.348492-2-anthony.l.nguyen@intel.com>
Thank you for your contribution! Sashiko AI review found 6 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 4
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] The commit message says users can check the DPLL lock status
and get configuration information "through the Linux DPLL and devlink…
- [Medium] The unmanaged DPLL lock status that userspace sees
(ice_dpll_lock_status_get() returning pf->dplls.pps.dpll_state) is…
- [Low] The patch is described as adding a new E830-only mode, but it
also changes code that every ice device uses, and the commit message…
- [Low] The kernel-doc of ice_dpll_lock_state_init_unmanaged()
(ice_dpll.c ~5239-5255) says it is a one-time probe with "no re-arm of…
- [Low] ice_aq_get_health_status_supported() (ice_common.c) parses the
0xFF21 (Get Supported Health Status Codes) completion descriptor as…
- [Low] This patch moves pf->dplls.lock initialisation to ice_init_dev()
and destruction to ice_deinit_dev().
--
ice: add support for unmanaged DPLL on E830 NIC
This patch adds support for the unmanaged DPLL found on some E830
adapters. It registers a single read-only PPS DPLL device with one input
and two output pins. The lock state is read from firmware health status
records at init and then updated from loss-of-lock health status events.
> However, users are able to check the DPLL
> lock status and obtain configuration information through the Linux DPLL
> and devlink health subsystem.
>
> Availability of 'loss of lock' health status code determines if such
> support is available, if true, register single DPLL device with 1 input
[Severity: Medium]
Is the devlink health part of this accurate?
In ice_process_health_status_event(), an
ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK event with pf->dplls.unmanaged
set is passed only to ice_dpll_lock_state_set_unmanaged(). The in-code
comment says it "deliberately does not reach devlink_health_report()".
0x601 also has no entry in ice_health_status_lookup[], so the fw/port
reporters cannot describe it either. The ice.rst text added by this
patch mentions only the DPLL subsystem.
Detection also checks more than the health status code.
ice_dpll_is_unmanaged() first requires:
if (pf->hw.mac_type != ICE_MAC_E830 ||
!ice_cgu_get_num_pins(&pf->hw, true) ||
!ice_is_unmanaged_cgu_in_netlist(&pf->hw))
return false;
Could the commit message drop the devlink health reference and mention
the E830 MAC type, pin table and ZL80640 netlist node requirements?
> diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> index 42878abac9eb1..848ac58342979 100644
> --- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
[ ... ]
> @@ -2514,6 +2518,13 @@ struct ice_aqc_health_status_elem {
> __le32 internal_data2;
> };
>
> +/* Get Health Status response buffer entry, (0xFF21)
> + * repeated per reported health status
> + */
> +struct ice_aqc_health_status_supp_elem {
> + __le16 health_status_code;
> +};
> +
[ ... ]
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
> index 90e01eb49ea21..3f5c122cb4c13 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
[ ... ]
> @@ -6313,6 +6336,165 @@ bool ice_is_fw_health_report_supported(struct ice_hw *hw)
[ ... ]
> +static int
> +ice_aq_get_health_status_supported(struct ice_hw *hw,
> + struct ice_aqc_health_status_supp_elem *buff,
> + int num, u16 *count)
> +{
> + u16 code = ice_aqc_opc_get_supported_health_status_codes;
> + const struct ice_aqc_get_health_status *cmd;
> + struct libie_aq_desc desc;
> + int ret;
> +
> + ice_fill_dflt_direct_cmd_desc(&desc, code);
> +
> + ret = ice_aq_send_cmd(hw, &desc, buff, num * sizeof(*buff), NULL);
> + if (!ret) {
> + cmd = libie_aq_raw(&desc);
> + *count = le16_to_cpu(cmd->health_status_count);
> + }
[Severity: Low]
This isn't a bug, but the 0xFF21 completion is parsed here as struct
ice_aqc_get_health_status. ice_adminq_cmd.h documents that struct only
as:
/* Get Health Status (indirect 0xFF22) */
No descriptor layout is defined for 0xFF21. The comment on the new
struct ice_aqc_health_status_supp_elem quoted above also names the wrong
command ("Get Health Status ... (0xFF21)").
If the 0xFF21 count sits at the same offset as in 0xFF22, could the
header say so, or define a separate 0xFF21 descriptor? If the layouts
ever differ, count would come from the wrong field and
ice_dpll_is_unmanaged() would quietly return false.
> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
> index 5148e419f49a0..1c853fd4a6bda 100644
> --- a/drivers/net/ethernet/intel/ice/ice_dpll.c
> +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
[ ... ]
> @@ -5080,6 +5213,123 @@ static int ice_dpll_init_info_e825c(struct ice_pf *pf)
[ ... ]
> +/**
> + * ice_dpll_lock_state_init_unmanaged - initialize lock state for unmanaged dpll
> + * @pf: board private structure
> + *
> + * Initialize the lock state for unmanaged DPLL by checking health status.
> + * For unmanaged DPLL, we rely on hardware autonomous operation.
> + *
> + * This is the only place lock state is read back from firmware; after this
> + * one-time probe, state is updated exclusively by incoming
> + * ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK health-status events, handled via
> + * ice_process_health_status_event() -> ice_dpll_lock_state_set_unmanaged().
> + * There is intentionally no periodic re-poll and no re-arm of this state
> + * across resets (PFR/CORER/GLOBR/EMPR) or devlink reload, and health event
> + * delivery is likewise armed only once, from the ice_health_init() path.
[Severity: Low]
Is the "or devlink reload" part right? A devlink reload goes through:
ice_devlink_reinit_up()
ice_load()
ice_init_features()
ice_dpll_init()
ice_dpll_init_unmanaged()
ice_dpll_init_info_unmanaged()
ice_dpll_lock_state_init_unmanaged()
That path reads 0xFF22 again on every reload. The kernel-doc of
ice_dpll_init_unmanaged() in this same patch says:
* which re-runs on every devlink reload while pf->dplls survives across
* reloads.
So the two comments contradict each other.
> + * That is by design, not an omission: the unmanaged dpll is autonomous
> + * hardware whose lock state is independent of PF reset and driver state, so
> + * a reset does not invalidate what was last reported. Carrying the previous
> + * value forward is therefore the correct answer, and only a genuine
> + * transition - loss of lock, or its subsequent clearing - changes it, which
> + * firmware reports as an event. Absent such an event nothing has changed
> + * and there is nothing to converge to.
> + *
> + * Return:
> + * * 0 - success
> + * * negative - init failure reason
> + */
> +static int ice_dpll_lock_state_init_unmanaged(struct ice_pf *pf)
> +{
> + u16 code = ICE_AQC_HEALTH_STATUS_INFO_LOSS_OF_LOCK;
> + struct ice_aqc_health_status_elem buff;
> + struct ice_dpll *d = &pf->dplls.pps;
> + int ret;
> +
> + mutex_lock(&pf->dplls.lock);
> + ret = ice_get_last_health_status_code(&pf->hw, &buff, code);
> + if (!ret) {
> + d->dpll_state = ice_dpll_health_lock_status(&buff);
> + d->prev_dpll_state = d->dpll_state;
> + }
> + mutex_unlock(&pf->dplls.lock);
[Severity: Medium]
Can the lock state that ice_dpll_lock_status_get() reports drift from
the hardware and stay wrong? This is the only firmware read. After it,
the state changes only when a 0x601 event arrives, and I could find
several ways an event can be missed.
First, in ice_probe() the state is read before event delivery is
enabled:
ice_probe()
ice_load()
... ice_dpll_init_unmanaged() <- 0xFF22 read here
ice_init_devlink()
ice_health_init()
ice_config_health_events(pf, true) <- 0xFF20 sent here
A transition between these two points is never reported. That seems to
contradict the ice_dpll_lock_state_set_unmanaged() kernel-doc, which
says the state "is recorded even when the dpll device is not registered
yet".
Second, ice_health_init() enables events only under this condition:
if (ice_is_fw_health_report_supported(&pf->hw)) {
...
ice_config_health_events(pf, true);
}
ice_dpll_is_unmanaged() does not check it. Could unmanaged mode then be
enabled with no event source at all?
Third, ice_prepare_for_reset() calls ice_shutdown_all_ctrlq(hw, false),
which tears down the ARQ. ice_rebuild() only calls ice_health_clear(),
which neither re-sends 0xFF20 nor re-reads 0xFF22.
If the lock state changes during a PFR/CORER/GLOBR/EMPR, or firmware
drops the health subscription across EMPR, what brings the cached value
back in line? The driver code doesn't show whether firmware buffers
events across an ARQ shutdown or keeps the 0xFF20 subscription across
EMPR. The probe and reset windows are there in the code either way.
[ ... ]
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index c8f06c3d0fdf2..91ecf768e47c6 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -4703,6 +4703,9 @@ int ice_init_dev(struct ice_pf *pf)
> return -EIO;
> }
>
> + mutex_init(&pf->dplls.lock);
> + init_rwsem(&pf->dplls.health_notify_rwsem);
> +
> ice_start_service_task(pf);
>
> return 0;
> @@ -4712,6 +4715,8 @@ void ice_deinit_dev(struct ice_pf *pf)
> {
> ice_service_task_stop(pf);
>
> + mutex_destroy(&pf->dplls.lock);
> +
[Severity: Low]
This isn't a bug, but this changes the lifetime of pf->dplls.lock for
every ice device, E810/E823/E825 included. The commit message only
describes a new E830 mode. health_notify_rwsem is also now initialized
for all devices.
This patch has a few other changes that affect every variant and that
the commit message doesn't mention:
- ice_dpll_deinit_dpll() now sets d->dpll to NULL.
- ice_dpll_deinit_info() now zeroes num_inputs and num_outputs.
- ice_dpll_init_direct_pins() and ice_dpll_deinit_direct_pins() now
accept NULL dpll devices.
The lock move looks necessary, because health events can now take
pf->dplls.lock from the service task outside the
ice_init_features()/ice_deinit_features() window. Could the commit
message say so?
> @@ -4725,14 +4730,6 @@ static void ice_init_features(struct ice_pf *pf)
> if (ice_is_safe_mode(pf))
> return;
>
> - /* pf->dplls.lock guards TSPLL/CGU access shared between the DPLL
> - * subsystem callbacks and the PTP periodic worker's TSPLL monitor.
> - * Initialize it before ice_ptp_init() so the PTP kworker never sees
> - * an uninitialized mutex, and destroy it in ice_deinit_features()
> - * only after ice_ptp_release() has drained the kworker.
> - */
> - mutex_init(&pf->dplls.lock);
> -
[Severity: Low]
With the init and destroy moved, this comment in ice_ptp_tspll_monitor()
in ice_ptp.c is now stale:
* pf->dplls.lock is initialized in ice_init_features() before the PTP
* kworker starts and destroyed in ice_deinit_features() only after
* ice_ptp_release() has drained the kworker, so it is always valid.
Should it refer to ice_init_dev() and ice_deinit_dev() instead?
There is a second, pre-existing issue that this patch did not introduce.
This other comment in ice_ptp.c was already inaccurate before this
change, because mutex_init() ran before ice_ptp_init():
* selection). No locking is needed because this runs during
* ice_ptp_init() before pf->dplls.lock exists and before any
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203002248.348492-1-anthony.l.nguyen%40intel.com
next prev parent reply other threads:[~2026-12-04 0:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 0:22 [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (ice) Tony Nguyen
2026-12-03 0:22 ` [PATCH net-next 1/4] ice: add support for unmanaged DPLL on E830 NIC Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko [this message]
2026-12-03 0:22 ` [PATCH net-next 2/4] ice: describe generic DPLL pins from firmware pin classification Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko
2026-12-03 0:22 ` [PATCH net-next 3/4] ice: translate FW to SW for max num TCs encoding Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko
2026-12-03 0:22 ` [PATCH net-next 4/4] ice: remove excessive memory allocation in ice_create_lag_recipe() Tony Nguyen
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=179634387184.3146.17623140627118251979@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=edumazet@kernel.org \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=marcin.szycik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patryk.holda@intel.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=willemb@google.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