Stop ~100 lines of CMD 1802 returned error -19 on every R4 Pro boot - #201
Stop ~100 lines of CMD 1802 returned error -19 on every R4 Pro boot#201meehien wants to merge 1 commit into
CMD 1802 returned error -19 on every R4 Pro boot#201Conversation
meehien
commented
Jul 30, 2026
…IO writes The internal 2.5G PHYs on the MxL86252C are GPY cores reachable only through the switch firmware's MDIO relay (INT_GPHY_READ/WRITE). When the mxl-gpy PHY driver probes them it writes VEND1 (MDIO devad 30) vendor registers during config_init - LED configuration and the temperature/WOL mailbox - and tolerates failures of those optional accesses. Minimal switch firmware does not implement all of those registers. On the BPI-R4 Pro's 1.0.70 (GPHY build 0.77) firmware every such write is rejected with the Zephyr -ENODEV, and the relay logs one error per write. A cold boot therefore floods the kernel log with ~100 lines of mxl862xx mdio-bus:10: CMD 1802 returned error -19 even though all four ports come up and pass traffic normally. These are PHY-layer register accesses whose success or failure is the PHY driver's concern, not the switch's; the switch relay should not report them as switch errors. Route both relay directions through the quiet path (mirroring MXL862XX_API_READ_QUIET, already used for the firmware-version probe) so a healthy board boots without the noise while genuine switch-command failures are still logged. Signed-off-by: Mihai Ordean <research@mihaiordean.com>
frank-w
commented
Jul 30, 2026
These errors are triggered by the as21 phy driver which is a workaround. It writes to non existent phy-id. But i had not figured out why mxl internal mdio reacts to the as21 phy which are on another mdio bus. You can disable the as21 driver and see the errors are gone. Sdk driver also just silece these errors,which imho is not the right way. |
meehien
commented
Jul 30, 2026
let me investigate this a bit more then. |
this is the workaround in 1.9.2 driver. afair without it register-writes got not executed (but i see it is called also for C45 read operations, and aeon_mdio_{read,write} use the same line without calling this function...maybe some can be dropped to reduce the flooding)...mtk told about a possible way to write to readonly phy register instead of non-existing device, but i have not found out such register in the as21 phy so have tried it yet. |
meehien
commented
Jul 31, 2026
ok. i think I got this figured out. i'll do another PR tomorrow instead of this. |