From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: netdev@vger.kernel.org, Ziyang Huang <hzyitc@outlook.com>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 3/3] net: dsa: qca8k: support QCA8337 internal PHY CPU links
Date: Wed, 30 Sep 2026 23:24:12 +0200 [thread overview]
Message-ID: <20260930212412.1973-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <6abb54ff.332d3c56.21546b.7fef@mx.google.com>
Hi Christian,
Thanks for the review.
> Can you put an example DT for this? Also no additional register are needed
> to this special mode?
Here is an example using the switch's internal MDIO bus, with the other
user ports omitted. The SoC MAC has its own PHY at the other end of the
PHY-to-PHY connection; its phy-mode must follow that MAC's binding. The
full example passed dtc and the qca8k binding check.
switch@10 {
compatible = "qca,qca8337";
reg = <0x10>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
label = "lan1";
phy-mode = "internal";
phy-handle = <&switch_phy0>;
};
port@5 {
reg = <5>;
ethernet = <&soc_mac>;
phy-mode = "internal";
phy-handle = <&switch_phy4>;
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
switch_phy0: ethernet-phy@0 { reg = <0>; };
switch_phy4: ethernet-phy@4 { reg = <4>; };
};
};
I did not add any register writes for this mode: qca8k_setup() already
programs header mode for the CPU port, the four GLOBAL_FW_CTRL1
destination masks, and the CPU/user membership masks using the selected
port. CPU_PORT_EN remains set by the existing setup code; I have not
tested clearing it.
I tested port 5 as the only CPU port on a Redmi AX5400 (RA74) with an
OpenWrt Linux 6.18.52 backport. Readback showed header mode only on
port 5 and all four destination masks selecting port 5. BPDU, LLDP,
EAPOL-Start and broadcast ARP frames arrived intact in both directions,
and unknown unicast/multicast flooding toward the CPU, DHCP, MTU
changes, renegotiation and ping also passed.
That test used the external MDIO bus with wireless disabled, and needed
two workarounds that are not in the posted series: a dummy phy-handle on
port 6 (a fixed-link user port) for MDIO classification, and a NULL-PHY
guard in qca8k_port_enable(). So it does not validate the internal-MDIO
example above on hardware. I will reword the commit message in the next
revision to claim only what was tested.
Would you prefer the fixed-link NULL-PHY handling to be addressed in a
separate prerequisite patch? The guard skips phy_support_asym_pause()
when phy is NULL, as it is for a fixed-link user port. For port 5, are
there other CPU-port registers or traffic paths you would want checked,
or is testing the internal-MDIO configuration on hardware the main gap?
Thanks,
Yongzhao Chen
next prev parent reply other threads:[~2026-09-30 21:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 22:08 [PATCH net-next v4 0/3] net: dsa: qca8k: add a QCA8337 CPU PHY consumer Yongzhao Chen
2026-09-28 22:08 ` [PATCH net-next v4 1/3] net: dsa: pass PHY flags when connecting shared ports Yongzhao Chen
2026-09-28 22:08 ` [PATCH net-next v4 2/3] net: dsa: qca8k: serialize CPU MAC pause during MTU changes Yongzhao Chen
2026-09-29 5:57 ` Christian Marangi
2026-09-30 21:24 ` Yongzhao Chen
2026-10-02 4:10 ` netdev-bot+sashiko
2026-09-28 22:08 ` [PATCH net-next v4 3/3] net: dsa: qca8k: support QCA8337 internal PHY CPU links Yongzhao Chen
2026-09-29 6:04 ` Christian Marangi
2026-09-30 21:24 ` Yongzhao Chen [this message]
2026-10-02 4:10 ` netdev-bot+sashiko
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=20260930212412.1973-1-yongzhao.derek@gmail.com \
--to=yongzhao.derek@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=hzyitc@outlook.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®