Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: manuel.janocha@amperfied.com
Cc: s-vadapalli@ti.com, rogerq@kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, vigneshr@ti.com, linux-omap@vger.kernel.org,
	netdev@vger.kernel.org, kuniyu@google.com
Subject: Re: [PATCH net v4 3/4] net: ethernet: ti: cpsw_ale: serialize control register updates
Date: Fri, 04 Dec 2026 12:47:32 +0000	[thread overview]
Message-ID: <179638845211.3146.15846010964997411812@kernel.org> (raw)
In-Reply-To: <20261203-cpsw-ale-lock-v4-3-4ecfbc4bb042@amperfied.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] This patch has an undeclared stable-backport dependency, and its
  Fixes tag does not match the tag on the patch it depends on.

--

net: ethernet: ti: cpsw_ale: serialize control register updates

This patch takes the ALE spinlock around the read-modify-write in
cpsw_ale_control_set(). Without it, two concurrent updates of different
fields in the same control register, such as ALE_PORTCTL or ALE_CONTROL,
can lose each other's change. It also extends the comment on the lock in
struct cpsw_ale to cover the control registers.

> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
> index dc550142ed822..69861d451ce41 100644
> --- a/drivers/net/ethernet/ti/cpsw_ale.c
> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> @@ -1205,9 +1205,11 @@ int cpsw_ale_control_set(struct cpsw_ale *ale, int port, int control,
>  	offset = info->offset + (port * info->port_offset);
>  	shift  = info->shift  + (port * info->port_shift);
>  
> +	spin_lock_bh(&ale->lock);
>  	tmp = readl_relaxed(ale->params.ale_regs + offset);
>  	tmp = (tmp & ~(mask << shift)) | (value << shift);
>  	writel_relaxed(tmp, ale->params.ale_regs + offset);
> +	spin_unlock_bh(&ale->lock);

[Severity: Low]
Will this patch backport cleanly to the stable trees its tags select?

The baseline has neither ale->lock nor the comment that the cpsw_ale.h
hunk edits. The previous patch in the series, "net: ethernet: ti:
cpsw_ale: serialize ALE table accesses", adds both, along with the
spin_lock_init().

The two patches have different Fixes tags:

  previous patch:
    Fixes: 1767bb2d47b7 ("ipv6: mcast: Don't hold RTNL for IPV6_ADD_MEMBERSHIP and MCAST_JOIN_GROUP.")

  this patch:
    Fixes: db82173f23c5 ("netdev: driver: ethernet: add cpsw address lookup engine support")
    Cc: stable@vger.kernel.org

db82173f23c5 dates from 2012, so stable tooling would queue this patch
for every maintained branch. The prerequisite would only be picked for
branches that contain 1767bb2d47b7, which dates from July 2025.

Older LTS branches such as 5.10, 5.15, 6.1, 6.6 and 6.12 don't contain
1767bb2d47b7. There the cpsw_ale.h hunk wouldn't apply. If only the
cpsw_ale.c hunk were taken, the build would fail with 'struct cpsw_ale'
has no member named 'lock'.

The changelog also says:

  This does not depend on the RTNL change named in the previous patch.

That holds for the race itself. Could it lead a backporter to treat the
code change as standalone, though?

Would it help to add a stable dependency annotation, for example:

  Cc: stable@vger.kernel.org # depends on "net: ethernet: ti: cpsw_ale: serialize ALE table accesses"

Another option is to align the Fixes tags so both patches go to the same
stable branches.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203-cpsw-ale-lock-v4-0-4ecfbc4bb042%40amperfied.com

  reply	other threads:[~2026-12-04 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 12:14 [PATCH net v4 0/4] net: ethernet: ti: cpsw_ale: fix lost ALE entries Manuel Janocha via B4 Relay
2026-12-03 12:14 ` [PATCH net v4 1/4] net: netcp: do not disable interrupts in the VLAN callbacks Manuel Janocha via B4 Relay
2026-12-03 12:14 ` [PATCH net v4 2/4] net: ethernet: ti: cpsw_ale: serialize ALE table accesses Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko
2026-12-03 12:14 ` [PATCH net v4 3/4] net: ethernet: ti: cpsw_ale: serialize control register updates Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko [this message]
2026-12-04 13:18     ` Janocha, Manuel
2026-12-03 12:14 ` [PATCH net v4 4/4] net: ethernet: ti: cpsw_ale: verify ALE table reads Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko
2026-12-04 13:18     ` Janocha, Manuel

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=179638845211.3146.15846010964997411812@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manuel.janocha@amperfied.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=vigneshr@ti.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