Skip to content

Stop ~100 lines of CMD 1802 returned error -19 on every R4 Pro boot - #201

Closed
meehien wants to merge 1 commit into
frank-w:7.1-mainfrom
meehien:bpi/mxl862xx-quiet-gphy-relay
Closed

Stop ~100 lines of CMD 1802 returned error -19 on every R4 Pro boot#201
meehien wants to merge 1 commit into
frank-w:7.1-mainfrom
meehien:bpi/mxl862xx-quiet-gphy-relay

Conversation

@meehien

Copy link
Copy Markdown

The four internal 2.5G PHYs on the MxL86252C are GPY cores reachable only
through the switch firmware's MDIO relay. mxl-gpy writes optional VEND1
vendor registers during config_init (LED config, temperature/WOL mailbox)
and tolerates failures. The R4 Pro's 1.0.70 firmware doesn't implement them
and rejects each write with -ENODEV, and the relay logs every one:

mxl862xx mdio-bus:10: CMD 1802 returned error -19

~100 lines per cold boot on a board where all four ports come up and pass
traffic normally. These are PHY-layer accesses whose success is the PHY
driver's business, not the switch's, so route both relay directions through
the existing quiet path (already used for the firmware-version probe).
Genuine switch-command failures are still logged.

…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

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Author

let me investigate this a bit more then.

@frank-w

frank-w commented Jul 31, 2026

Copy link
Copy Markdown
Owner

https://github.com/frank-w/BPI-Router-Linux/blob/7.1-main/drivers/net/phy/as21xx_1.9.2/as21xxx.c#L472

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

Copy link
Copy Markdown
Author

ok. i think I got this figured out. i'll do another PR tomorrow instead of this.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@meehien@frank-w