Article View: linux.kernel.netdev
Article #26931Re: [PATCH net v4 3/4] net: ethernet: ti: cpsw_ale: serialize control register updates
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 12:47
Date: Fri, 04 Dec 2026 12:47
76 lines
11009 bytes
11009 bytes
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
Technical Details
Message-ID:
<179638845211.3146.15846010964997411812@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377362-linux-kernel-netdev=dewy.ruReferences:
<20261203-cpsw-ale-lock-v4-3-4ecfbc4bb042@amperfied.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377362-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179638845211.3146.15846010964997411812@kernel.org> References: <20261203-cpsw-ale-lock-v4-3-4ecfbc4bb042@amperfied.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2765143"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ocKFiHamMcFgAPkc0kZgHv+PAHE= sha256:IjaUr5y9QaOtqIDcntfqzrz5u/+LbQjlbjxE+RusZzQ= sha1:TlHFoWevOKtFJcnZ9M9dRUxRmwE= sha256:AwypK3Rzz8Bx1klOSpYZpsZa/Undd1+W8IoIQ6D+CZg= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id B3285117BED; Fri, 4 Dec 2026 15:48:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.541 X-Spam-Status: No, score=-3.541 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gNdJ1oYasSjC; Fri, 4 Dec 2026 15:48:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377362-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 9C5B7117BD8; Fri, 4 Dec 2026 15:48:05 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 290C44898C; Fri, 4 Dec 2026 12:47:35 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796388454; b=Y2syQOi9nUYVxBgrZDUHvppS9OmGTxRYYutNbxtZWjPhRHhloWswrBdle5uUc9kSJlEh LIWXVdIE3Ab74VVKCWFuNDbOK1/02vekaav9A4ergQiitzE86a7AjCmg+hpTHTj7zcYFO iF3AQhqzniGFeZg6AnDDMDHbYh5JALQAL8eqiogVcL224PV7ZZHTSEsM7guqgJLGm+vO2 gnSONO1YRBrdPP9BCf3tTJYtfGphWRwqjTgOw6VmHSiYh2cb+V/g1uiNZSX+Vc/Odqonu p8+BN9IOVpk/wO2juu6Z2A8wuQS39nSHPRQBXCLYmwHiuvPUesJVkD3SUmVVOqX1vqA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388454; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=7Z4FEypaQ+qtwk5uKns/lc40HiKd/2hXXv7Xthk6yIk=; b=ZLDZl8yncnXWB9gPAuhPilWotBrPQA38SeysAAX6rCCLToXvOvyEcMrjqz696b20fbut 1bbIoAgnNBzrVpIBBzFig01wAVEpElyWgDG6bLsSEQPe/daqbZWRW4NTMTyIGIJMy36sx JNcNp0NkLCMlIA0V/D696YfSIgMfmku2F5dBuhXId2tEDEWi+1pCBCbibJl6oOnaC3vCz xhLYG85ZrFVfUvUL6hhKeKr9Ojuc7Abj/HJQPOn93wkJPhxg+qVXK/tWdGXlkSZiiQbrU mLrubhI82BQfx9NRel90BlOjFDEK2jUH4wP5wb375JoMZIu3m+Eew5XD/ekLdKmxfrA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehMGjyll; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FDC3606A322; Fri, 4 Dec 2026 12:47:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehMGjyll X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388453; b=PvaPmd53UWaus04BMkEUCoVZ34PY7/oZ2aOwM3nA0xeM8Rg720J9XXPeM+jFi91OLHe7 1ITRwUtrWgrTlAg3ymomrZaUtLVV0gqBlLTAavkF406fuOcdpjYEXFqVIWfdPchPurAtT 4buAwTBa8Vg6g6ib+21WcQuW8J5yajSeSiz89D32mApz8NGtayBesa0REAn78sUIQuLU6 Ydj6whU8lh8K9/KuAZpzXHOnDW6ltYUa5pLoWXIT6dLWlozaJxsd0BGA/LGhwLUqWMINk 4Iam0j0YVl31W0Wrs6arIMapfrAoYUp+QIbOyJgAVARrbwT6TPvoMC76+DkD7PLJN0g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388453; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=7Z4FEypaQ+qtwk5uKns/lc40HiKd/2hXXv7Xthk6yIk=; b=j2chPiafArwNCIm1HqwdNVPzMHXOoCLExV3Kyv5qoljVgX+Mk2kUPARK4HZ6deiMIGuM +JyaZg2i5wgiLjhFEcz7pq/RBPyIDX+5Fni72CSFTr0IE5SZaDBrbHzPwDumgwhVo9iPg mfNKlJCJe9v9brCrk+jzCOJUGdeUB0jGaKOEu5iIPJ0YPw0uuQ+W6ySTxfVWW3PGVd8BQ aUx0dH2VLaq/4RGJGEExZDQ5qOvEH2DqfmCixqvb+oN7zOxDFoHFprIMsTZAkU7p9nr3i 4lazxT/f4oV1trMdLDeeBfhKu7GCulT/iCjsY06rqg7/rlkFTjiHVxQtf8oIQlk3TCA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehMGjyll; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71DFA606A336; Fri, 4 Dec 2026 12:47:33 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 858F51F00897; Fri, 4 Dec 2026 12:47:32 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796388453; bh=7Z4FEypaQ+qtwk5uKns/lc40HiKd/2hXXv7Xthk6yIk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ehMGjyllHiwuX47QeKahFQU2vkXrA1kc1Azt8BM+9i7Mkgy6/qDHnABwxx35wFztI HEESfbK74BFkRVXOalu1l+dPq23kvqrHQD0d9mifF9OiT2OqbsCwwxiEdVU7nVcPWT Wqic4OAnaACNP7fGH+IJ0p9UMDI7u3w7QXx/QoKNdbSVO3/rPgTgVlx6e6nKloyLVc qdpR7v+ARrlP3yz3ptd/ViJ46FCSGAwlcBbnktuDJ9UZd3PlZ2R/CDr8DSeyTXDR1x cy2NsTdd9MyMaid7gYOMevSFFaNWzChowWasEHdAWftIKsahreWjuVXUO9b0X0uFET XYjufqpwxOKHg== X-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 X-In-Reply-To: <20261203-cpsw-ale-lock-v4-3-4ecfbc4bb042@amperfied.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list