]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: airoha: select QDMA block according LAN/WAN configuration
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 13 Mar 2026 16:28:36 +0000 (17:28 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Mar 2026 14:09:59 +0000 (15:09 +0100)
commit8737d7194d6d5947c3d7d8813895b44a25b84477
treea63b6748bf831697f9b8c899f52ae6d3584a679f
parent68e8619d221400f094490644dce9d3a4efffb6c5
net: airoha: select QDMA block according LAN/WAN configuration

Before this patch even GDM ports were assigned to QDMA0 while odd GDM
ports were using QDMA1, so, based on the DTS configuration, both QDMA0
and QDMA1 can theoretically receive traffic destinated to the host cpu
from LAN or WAN GDM ports.
Airoha folks reported the hw design assumes the LAN traffic destinated
to the host cpu is be forwarded to QDMA0 while traffic received on WAN
GDM port is managed by QDMA1. For this reason, select QDMA block according
to the GDM port LAN or WAN configuration:
- QDMA0 is used for GDM LAN devices
- QDMA1 is used for GDM WAN device

Assuming a device with three GDM ports, a typical configuration could be:
- MT7530 DSA switch -> GDM1 (eth0) -> QDMA0 (LAN traffic)
- External PHY      -> GDM2 (eth1) -> QDMA1 (WAN traffic)
- External PHY      -> GDM3 (eth2) -> QDMA0 (LAN traffic)

We can then bridge eth0 DSA port (lanX) with eth2 since they all tx/rx
LAN traffic.

Please note this patch introduces a change not visible to the user since
airoha_eth driver currently supports just the internal phy available via
the MT7530 DSA switch and there are no WAN interfaces officially supported
since PCS/external phy is not merged mainline yet (it will be posted with
following patches).

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260313-airoha-qdma-lan-wan-mode-v2-1-7d577db6e40c@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/airoha/airoha_eth.c
drivers/net/ethernet/airoha/airoha_eth.h