Re: [PATCH net v6] net: dsa: qca8k: preserve port state across MTU changes
From: Yongzhao Chen
Date: Thu Oct 22 2026 - 12:04:29 EST
On Thu, 22 Oct 2026 08:37:21 +0000 netdev-bot+sashiko@xxxxxxxxxx wrote:
> Can this write bits outside of mask into PORT_STATUS?
Yes. The qca8k regmap passes the raw value to its update_bits callbacks,
which OR write_val without masking it. My previous register model
applied val & mask and hid this difference. v7 passes
port_status_value[port] & mask for partial updates.
> If ports 0 and 6 are both CPU ports, can qca8k_port_change_mtu() return
> an error after the frame size has already been committed?
Yes. My previous test called the driver once per MTU change instead of
going through dsa_switch_mtu(), which calls it for every CPU port. v7
records the committed frame size and returns success for a repeated
request with the same value, so the second CPU port cannot reject the
first port's commit.
The NULL PHY call in qca8k_port_enable() is already present in the v6
base. From the source, a user port without an attached PHY reaches it,
but I found no in-tree qca8k DTS with such a user port. It is
independent of this MTU change, so v7 leaves it alone. If it is fixed
later, dropping the call looks better than a NULL check:
phylink_bringup_phy() already calls phy_support_asym_pause() for every
PHY it attaches.
v7: https://lore.kernel.org/netdev/20261022155837.760-1-yongzhao.derek@xxxxxxxxx/
Yongzhao Chen
pw-bot: cr