aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorYongzhao Chen <yongzhao.derek@gmail.com>2026-10-03 19:24:03 +0200
committerJakub Kicinski <kuba@kernel.org>2026-10-06 17:52:26 -0700
commit2fc23f832e30a7918ca3e97e03845ea2f863af45 (patch)
tree2b7b83546bbaf48bd2c5c60106c2ea8a48002d13 /scripts/Makefile.thinlto
parentnet: dsa: qca8k: propagate MDIO errors (diff)
net: dsa: qca8k: do not clear MASTER_EN after a failed page select
qca8k_mdio_write() and qca8k_mdio_read() take the common exit path when selecting the page of QCA8K_MDIO_MASTER_CTRL fails. That path clears MASTER_CTRL[31:16] with a raw write to phy 0x10, reg 0x1f, which only addresses MASTER_CTRL while page 0 is selected. After a failed page select that did not reach the switch, the previous page remains selected. The write can then clear the upper half of an unrelated register at page * 0x200 + 0x3c. No MDIO master transaction has been started at that point, so there is nothing to clean up. Unlock and return the error directly. qca8k_set_page() also keeps the old cached page when the page write fails. If the write did reach the switch, a later access to the cached page skips the page select and reaches the wrong register. Invalidate the cache on failure so that the next access selects the page again. The Sashiko review of v1 identified the stray cleanup write. A userspace model of the driver's functions reproduces both problems by injecting page-select failures with and without a hardware page change; these cases pass after this change. The cleanup write comes from commit 759bafb8a322 ("net: dsa: qca8k: add support for internal phy and internal mdio"), and the stale page cache from commit ba5707ec58cf ("net: dsa: qca8k: handle qca8k_set_page errors"). Signed-off-by: Yongzhao Chen <yongzhao.derek@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261003172405.342-3-yongzhao.derek@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions