[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241118104735.3741749-4-jacky_chou@aspeedtech.com>
Date: Mon, 18 Nov 2024 18:47:35 +0800
From: Jacky Chou <jacky_chou@...eedtech.com>
To: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <robh@...nel.org>,
<krzk+dt@...nel.org>, <conor+dt@...nel.org>, <joel@....id.au>,
<andrew@...econstruct.com.au>, <hkallweit1@...il.com>,
<linux@...linux.org.uk>, <netdev@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-aspeed@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>
CC: <jacky_chou@...eedtech.com>
Subject: [net-next 3/3] net: mdio: aspeed: Add dummy read for fire control
Add a dummy read to ensure triggering mdio controller before starting
polling the status of mdio controller.
Signed-off-by: Jacky Chou <jacky_chou@...eedtech.com>
---
drivers/net/mdio/mdio-aspeed.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c
index 4d5a115baf85..feae30bc3e78 100644
--- a/drivers/net/mdio/mdio-aspeed.c
+++ b/drivers/net/mdio/mdio-aspeed.c
@@ -62,6 +62,8 @@ 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);
+ /* Add dummy read to ensure triggering mdio controller */
+ (void)ioread32(ctx->base + ASPEED_MDIO_CTRL);
return readl_poll_timeout(ctx->base + ASPEED_MDIO_CTRL, ctrl,
!(ctrl & ASPEED_MDIO_CTRL_FIRE),
--
2.25.1
Powered by blists - more mailing lists