]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mdio: aspeed: add dummy read to avoid read-after-write issue
authorJacky Chou <jacky_chou@aspeedtech.com>
Thu, 11 Dec 2025 06:24:58 +0000 (14:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:11:53 +0000 (13:11 +0100)
commite2eae34c93c22b757a2c4f7111f1bdfca3fc43fd
tree5d36f03e3b0b252191c1ee2fe492faad4c3a1248
parent692ead5233ff1a144f88f2d7689e410a32580b7a
net: mdio: aspeed: add dummy read to avoid read-after-write issue

[ Upstream commit d1a1a4bade4b20c0858d0b2f81d2611de055f675 ]

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.

Fixes: f160e99462c6 ("net: phy: Add mdio-aspeed")
Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251211-aspeed_mdio_add_dummy_read-v3-1-382868869004@aspeedtech.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/mdio/mdio-aspeed.c