mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 09:08:20 +04:00
The gen2 and later Aquantia PHYs take their system interface from the per-speed global configuration words their firmware loads from flash. Where the board firmware selects XFI with pause-frame rate adaptation, the driver reports 10GBASE-R as the only possible interface and the MAC gets throttled by pause frames at every media speed below 10G, although the device tree asks for USXGMII. Apart from being ugly, this also causes the PHY's microcontroller to hang when ever a link-partner enters 100M mode (eg. during S3 idle with WoL active) and never returns to a working state, observed on CUX3410 running firmware 5.7, ironically even with an Aquantia AQtion AQC107 NIC on the other end (ie. the inter-Aquantia magic between the two same-vendor PHYs could be the actual root of the problem). Add a hack patch that rewrites the words to XFI with USX rate adaptation when phy-mode is usxgmii, with the PHY held in low power as the existing AQR112/AQR412 patch does. The PHY then runs USXGMII with symbol replication at the lower speeds (and no longer crashes when ever the link-partner enters S3 and reduces speed to 100M). Signed-off-by: Daniel Golle <daniel@makrotopia.org>