[PATCH v2 00/24] ARM: zte: Add support for Sanechips ZX279128S and ZTE ZXHN H3600
Agustin Santiago Isasmendi
isasmendi.agus at gmail.com
Thu Nov 19 02:37:38 PST 2026
Hi Navid,
Thanks for the tests and the numbers.
On Fri, Nov 13, 2026 at 00:36, Navid Ghahremani wrote:
> With the lock on both sides, PCIe config reads of the MT7915 still hang
> my unit.
That fits: a config read is a PCIe read like any other. I hadn't
covered them in my lock either; when they were left unprotected in one
of my tests the board hung the same way.
> Because of these numbers OpenWrt will keep the cache on with the lock.
Makes sense. Two things that may help there.
The stock kernel makes the PCIe DMA hardware-coherent: in
zx279128_init_machine it writes
0x00a20080 = 0x40000001, 0x00a20084 = 0xbfffffff,
0x00a20078 = 0x00a20088 = 0x1f0f1f0f, 0x00a20000 = 0x0d000000
and mt7915.ko uses the coherent DMA ops. With those writes and
dma-coherent on the PCIe nodes the mt7915 needs no cache maintenance
(md5-checked transfers, L2 on and off); without them its firmware does
not load. The switch DMA stays non-coherent. The same setting also
makes the IDM ring coherent (stock uses it through the cacheable alias
with no maintenance), so the WiFi offload RFC has to treat the ring as
coherent when this is on.
On my unit, with the L2 on and the lock (Mbit/s):
plain coherent coherent + offload
TCP router->phone 432 525 530
TCP phone->router 235 283 288
routed WAN->WiFi 253 237 270 (CPU 46% -> 16%)
And the lock: I reworked ours so that only a small hook is left in
mt76 and the rest lives in platform code, which may suit your OpenWrt
PR. The L2C side wraps outer_cache in mach-zte (cache-l2x0.c
untouched), config accesses take the lock in the PCIe host driver
(your lspci case), and mt76 only calls a small outer_io_lock() pair
around its register reads. Your config-read test with WiFi and
Ethernet ran 3 x 10 minutes without a hang, with the same throughput as
the old lock. I can send it to you.
Agustin
More information about the linux-arm-kernel
mailing list