From 930d6688766c654bfb62e1a958f2433a6b4b9a51 Mon Sep 17 00:00:00 2001 From: Mihai Ordean Date: Thu, 30 Jul 2026 13:36:35 +0000 Subject: [PATCH] net: dsa: mxl862xx: don't log firmware rejections of internal GPHY MDIO 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 --- drivers/net/dsa/mxl862xx/mxl862xx-host.h | 2 ++ drivers/net/dsa/mxl862xx/mxl862xx.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mxl862xx/mxl862xx-host.h b/drivers/net/dsa/mxl862xx/mxl862xx-host.h index 4e054c6e4c0e..2161f88e0712 100644 --- a/drivers/net/dsa/mxl862xx/mxl862xx-host.h +++ b/drivers/net/dsa/mxl862xx/mxl862xx-host.h @@ -12,6 +12,8 @@ int mxl862xx_api_wrap(struct mxl862xx_priv *priv, u16 cmd, void *data, u16 size, #define MXL862XX_API_WRITE(dev, cmd, data) \ mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), false, false) +#define MXL862XX_API_WRITE_QUIET(dev, cmd, data) \ + mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), false, true) #define MXL862XX_API_READ(dev, cmd, data) \ mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), true, false) #define MXL862XX_API_READ_QUIET(dev, cmd, data) \ diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c index 5b412270b9d4..1e82d1e0e8d2 100644 --- a/drivers/net/dsa/mxl862xx/mxl862xx.c +++ b/drivers/net/dsa/mxl862xx/mxl862xx.c @@ -248,7 +248,7 @@ static int mxl862xx_phy_read_mmd(struct mxl862xx_priv *priv, int addr, }; int ret; - ret = MXL862XX_API_READ(priv, INT_GPHY_READ, param); + ret = MXL862XX_API_READ_QUIET(priv, INT_GPHY_READ, param); if (ret) return ret; @@ -265,7 +265,7 @@ static int mxl862xx_phy_write_mmd(struct mxl862xx_priv *priv, int addr, .data = cpu_to_le16(data), }; - return MXL862XX_API_WRITE(priv, INT_GPHY_WRITE, param); + return MXL862XX_API_WRITE_QUIET(priv, INT_GPHY_WRITE, param); } static int mxl862xx_phy_read_mii_bus(struct mii_bus *bus, int addr, int regnum)