From: Ivan Vecera <ivecera@redhat.com>
To: sashiko-reviews@lists.linux.dev
Cc: intel-wired-lan@lists.osuosl.org,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 02/10] ice: dpll: serialize changes of the SyncE CGU registers
Date: Tue, 10 Nov 2026 10:45:20 +0100 [thread overview]
Message-ID: <d5acc725-dd95-4e96-89ca-364db2444b61@redhat.com> (raw)
In-Reply-To: <sashiko-outbox-202874@kernel.org>
On 11/7/26 13:11, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issues to consider:
> - [Medium] ice: ptp: unconditional R10 write and lock scope in
> ice_ptp_link_change()
> - [Low] ice: dpll: missing Fixes trailer for commit ad1df4f2d591
> --
>
> commit 6fdc60cccd47bebe7d61ff60807ee77303bf58bd
> Author: Ivan Vecera <ivecera@redhat.com>
>
>> ice: dpll: serialize changes of the SyncE CGU registers
>>
>> On dual complex E825 only complex 0 has a functional CGU and the second
>> complex reaches it through cgu_peer, so PFs of both complexes share the
>> CGU registers R10 and R11. They read, modify and write them when the
>> state of an RCLK pin changes, and ice_ptp_link_change() rewrites R10 when
>> a link changes, under the pf->dplls.lock of their own PF only.
>>
>> ice_ptp_link_change() does not hold dpll_lock, so it can already overwrite
>> an update of another PF. RCLK callbacks are serialized by dpll_lock, but
>> the DPLL core is going to serialize callbacks per (module, clock_id), and
>> each complex has its own DSN and so its own clock_id. With that change, a
>> test toggling RCLK pins of both complexes lost an update.
>>
>> Add a mutex to struct ice_adapter, which all E825C PFs share, and hold it
>> around these sequences.
>>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>
> [Severity: Low]
> Since this fixes concurrent CGU register updates in E825-C SyncE support,
> should it include:
>
> Fixes: ad1df4f2d591 ("ice: dpll: Support E825-C SyncE and dynamic pin discovery")
>
Yes, the race with ice_ptp_link_change() is there since that commit. The
patch now goes to net with this tag:
https://lore.kernel.org/netdev/20261110094350.184185-1-ivecera@redhat.com/
v2 of this series will drop it.
> [ ... ]
>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> index 3df08714510da..4d4b6aaaf30c2 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> @@ -1395,7 +1395,9 @@ void ice_ptp_link_change(struct ice_pf *pf, bool linkup)
>> break;
>> }
>>
>> + mutex_lock(&pf->adapter->cgu_synce_lock);
>> err = ice_tspll_cfg_synce_ethdiv_e825c(hw, clk_pin);
>> + mutex_unlock(&pf->adapter->cgu_synce_lock);
>> if (active && err) {
>> dev_err_once(ice_pf_to_dev(pf),
>> "Failed to configure SyncE ETH divider for pin %d, err %d\n",
>
> [Severity: Medium]
> Should cgu_synce_lock also cover ice_tspll_bypass_mux_active_e825c(), and
> should ice_tspll_cfg_synce_ethdiv_e825c() be skipped when active is false?
Yes to both, also there since ad1df4f2d591. Patch 2 of the net posting
skips the outputs the port does not drive and checks the mux under
cgu_synce_lock.
Thanks,
Ivan
next prev parent reply other threads:[~2026-11-10 9:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 12:09 [PATCH net-next 00/10] dpll: do not serialize driver callbacks under global dpll_lock Ivan Vecera
2026-11-06 12:09 ` [PATCH net-next 01/10] ice: dpll: notify TSPLL lock status from the periodic work only Ivan Vecera
2026-11-10 12:20 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 10:55 ` Ivan Vecera
2026-11-06 12:09 ` [PATCH net-next 02/10] ice: dpll: serialize changes of the SyncE CGU registers Ivan Vecera
[not found] ` <sashiko-outbox-202874@kernel.org>
2026-11-10 9:45 ` Ivan Vecera [this message]
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 10:56 ` Ivan Vecera
2026-11-06 12:09 ` [PATCH net-next 03/10] dpll: add domain object Ivan Vecera
2026-11-10 12:23 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 10:58 ` Ivan Vecera
2026-11-06 12:09 ` [PATCH net-next 04/10] dpll: take domain locks around driver callbacks Ivan Vecera
2026-11-10 12:23 ` Petr Oros
2026-11-06 12:10 ` [PATCH net-next 05/10] dpll: convert dpll_lock to rwsem Ivan Vecera
2026-11-10 12:24 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 11:01 ` Ivan Vecera
2026-11-06 12:10 ` [PATCH net-next 06/10] dpll: add KUnit tests for core locking Ivan Vecera
[not found] ` <sashiko-outbox-202878@kernel.org>
2026-11-10 9:45 ` Ivan Vecera
2026-11-10 12:24 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 10:53 ` Ivan Vecera
2026-11-06 12:10 ` [PATCH net-next 07/10] dpll: reject measured_freq_get for foreign and on-pin registrations Ivan Vecera
2026-11-10 12:24 ` Petr Oros
2026-11-06 12:10 ` [PATCH net-next 08/10] dpll: zl3073x: update locking comments Ivan Vecera
2026-11-10 12:24 ` Petr Oros
2026-11-06 12:10 ` [PATCH net-next 09/10] ice: dpll: " Ivan Vecera
2026-11-10 15:31 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 11:03 ` Ivan Vecera
2026-11-06 12:10 ` [PATCH net-next 10/10] dpll: document locking rules Ivan Vecera
2026-11-10 12:25 ` Petr Oros
2026-11-10 17:53 ` netdev-bot+sashiko
2026-11-11 11:07 ` Ivan Vecera
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=d5acc725-dd95-4e96-89ca-364db2444b61@redhat.com \
--to=ivecera@redhat.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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