[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<SEYPR06MB5134571388AC51EEAC45AF739DA2A@SEYPR06MB5134.apcprd06.prod.outlook.com>
Date: Mon, 8 Dec 2025 03:13:24 +0000
From: Jacky Chou <jacky_chou@...eedtech.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Heiner Kallweit <hkallweit1@...il.com>, Russell King
<linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Joel Stanley <joel@....id.au>, Andrew Jeffery
<andrew@...econstruct.com.au>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-aspeed@...ts.ozlabs.org"
<linux-aspeed@...ts.ozlabs.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: [PATCH net-next] net: mdio: aspeed: add dummy read to avoid
read-after-write issue
Hi Andrew,
Thank you for your reply
> > The Aspeed MDIO controller may return incorrect data when a read
> > operation follows immediately after a write. Due to a controller bug,
> > the subsequent read can latch stale data, causing the polling logic to
> > terminate earlier than expected.
> >
> > To work around this hardware issue, insert a dummy read after each
> > write operation. This ensures that the next actual read returns the
> > correct data and prevents premature polling exit.
> >
> > This workaround has been verified to stabilize MDIO transactions on
> > affected Aspeed platforms.
> >
> > Signed-off-by: Jacky Chou <jacky_chou@...eedtech.com>
>
> This seems like a bug fix. Please add a Fixes: tag, for base it on net, not
> net-next.
>
Yes, it is a bug fix on HW design.
I will send it to net again and add Fixes tag.
> > ---
> > drivers/net/mdio/mdio-aspeed.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/mdio/mdio-aspeed.c
> > b/drivers/net/mdio/mdio-aspeed.c index e55be6dc9ae7..00e61b922876
> > 100644
> > --- a/drivers/net/mdio/mdio-aspeed.c
> > +++ b/drivers/net/mdio/mdio-aspeed.c
> > @@ -62,6 +62,12 @@ static int aspeed_mdio_op(struct mii_bus *bus, u8 st,
> u8 op, u8 phyad, u8 regad,
> > | FIELD_PREP(ASPEED_MDIO_DATA_MIIRDATA, data);
> >
> > iowrite32(ctrl, ctx->base + ASPEED_MDIO_CTRL);
> > + /* Workaround for read-after-write issue.
>
> Blank line before the comment please.
>
Agreed.
Thanks,
Jacky
Powered by blists - more mailing lists