From: Daniel Golle <daniel@makrotopia.org>
To: "Chester A. Unal" <chester.a.unal@arinc9.com>,
Daniel Golle <daniel@makrotopia.org>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH net-next v5 0/9] net: dsa: mt7530: modernise register access and add two DSA ops
Date: Mon, 31 Aug 2026 16:37:43 +0100 [thread overview]
Message-ID: <cover.1788190568.git.daniel@makrotopia.org> (raw)
The mt7530 driver carries its own register accessors that predate the
regmap conversion and now largely duplicate what regmap already
provides, including locking. Most of this series removes that layer.
It first moves the MDIO bus locking into the switch regmap via
.lock/.unlock callbacks, matching the PCS regmaps, so any path reaching
the regmap is serialised automatically. With the wrappers no longer
adding locking, the thin mt7530_mii_* indirection is folded away and the
remaining accessors are replaced mechanically with the plain regmap API,
using the coccinelle semantic patches included in the commit messages.
The two remaining reset polls are converted to
regmap_read_poll_timeout() and the then-unused dummy poll machinery is
dropped. Open-coded register fields are converted to
FIELD_GET/FIELD_PREP. None of this is intended to change behaviour.
The last two patches implement .port_fast_age, which flushes dynamically
learned MAC entries on topology changes, and .port_change_conduit, which
moves a user port's CPU-port affinity at runtime.
The swallowed MDIO errors Sashiko flagged on v4 5/8 have meanwhile been
fixed in tree by "fix swallowed MDIO read errors" and "fix remaining
swallowed MDIO access errors", both merged into net-next. This respin is
rebased on top of them: regmap_* return values are no longer ignored,
which is what most of the semantic patches had to be reworked for.
---
v5:
* rebase onto current net-next, on top of the two MDIO error handling
fix series merged since v4
* new patch 6/9 dropping the mt7530_dummy_poll machinery
* 1/9: also revert commit dd52b3df25ed ("net: dsa: mt7530: serialize
the regmap IRQ chip like every other user"), whose workaround the
regmap's own locking makes redundant
* 7/9: list STAG_VPID among the repaired macros, document the
VTCR_VID() masking
* 8/9: check the ATC command write and poll via
regmap_read_poll_timeout()
* 9/9: list EN7528 among the single-CPU-port switches
v4:
* rebase onto current net-next
* 5/8: zero the read-back buffer in mt7530_regmap_read() instead of
initialising the result variables at every call site, as suggested
by Jakub
* 6/8: keep MT753X_CTRL_PHY_ADDR() as plain address arithmetic rather
than converting it to FIELD_PREP() as suggested in review: the macro
computes the MDIO bus address of the switch PHYs, used as the addr
argument of bus->read/write and as an iterator base in
mt7530_setup_mdio(), not a hardware register field
v3:
* 5/8: initialise register read-back variables to 0 so a failed
regmap_read keeps the previous read-as-zero behaviour, and use u32
for the value in mt7530_setup_port5
* 6/8: name the age timer field AGE_TIMER_MASK and document the
corrected ATC_HASH/VTCR_VID field macros
* 7/8: serialise the port_fast_age ATC flush under reg_mutex and log
on timeout, align a define, and correct the commit message which
wrongly claimed per-port parity with b53/realtek
* 8/8: populate the netlink extack on rejection and refuse a conduit
that lives on a different switch
v2:
* fix stray 'static void' left-over in 4/8 which had a fix accidentally
folded into 5/8 (byte-identical state at 8/8, but bisectability is
restored)
* extend port_change_conduit op commit message
Daniel Golle (9):
net: dsa: mt7530: move MDIO bus locking into regmap
net: dsa: mt7530: fold mt7530_mii_write/read into mt7530_write/read
net: dsa: mt7530: replace mt7530_write with regmap_write
net: dsa: mt7530: replace mt7530_rmw/set/clear with regmap API
net: dsa: mt7530: replace mt7530_read with regmap_read
net: dsa: mt7530: drop the dummy poll machinery
net: dsa: mt7530: convert to use field accessor macros
net: dsa: mt7530: implement port_fast_age
net: dsa: mt7530: implement port_change_conduit op
drivers/net/dsa/mt7530-mdio.c | 12 +-
drivers/net/dsa/mt7530.c | 834 ++++++++++++++++------------------
drivers/net/dsa/mt7530.h | 221 ++++-----
3 files changed, 530 insertions(+), 537 deletions(-)
base-commit: 1bb784eb6e38fd73143f021608e4ef3095d0c0d7
prerequisite-patch-id: 0000000000000000000000000000000000000000
--
2.55.0
next reply other threads:[~2026-08-31 15:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 15:37 Daniel Golle [this message]
2026-08-31 15:37 ` [PATCH net-next v5 1/9] net: dsa: mt7530: move MDIO bus locking into regmap Daniel Golle
2026-08-31 15:38 ` [PATCH net-next v5 2/9] net: dsa: mt7530: fold mt7530_mii_write/read into mt7530_write/read Daniel Golle
2026-08-31 15:38 ` [PATCH net-next v5 3/9] net: dsa: mt7530: replace mt7530_write with regmap_write Daniel Golle
2026-08-31 15:38 ` [PATCH net-next v5 4/9] net: dsa: mt7530: replace mt7530_rmw/set/clear with regmap API Daniel Golle
2026-08-31 15:38 ` [PATCH net-next v5 5/9] net: dsa: mt7530: replace mt7530_read with regmap_read Daniel Golle
2026-08-31 15:38 ` [PATCH net-next v5 6/9] net: dsa: mt7530: drop the dummy poll machinery Daniel Golle
2026-08-31 15:39 ` [PATCH net-next v5 7/9] net: dsa: mt7530: convert to use field accessor macros Daniel Golle
2026-08-31 15:39 ` [PATCH net-next v5 8/9] net: dsa: mt7530: implement port_fast_age Daniel Golle
2026-08-31 15:39 ` [PATCH net-next v5 9/9] net: dsa: mt7530: implement port_change_conduit op Daniel Golle
2026-09-02 12:34 ` [PATCH net-next v5 0/9] net: dsa: mt7530: modernise register access and add two DSA ops Andrew Lunn
2026-09-03 2:20 ` patchwork-bot+netdevbpf
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=cover.1788190568.git.daniel@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chester.a.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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