]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: mdio: add comment about c22/command register
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 3 May 2026 16:57:49 +0000 (18:57 +0200)
committerRobert Marko <robimarko@gmail.com>
Tue, 5 May 2026 11:12:17 +0000 (13:12 +0200)
The C22 aka command register is a wild bit mix. Avoid confusion
for reviewers and add a comment.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23204
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c

index 329bafcc961bfc16bca0672862fe9a4abae8439d..d7c06b3f58ea836e6bc4be56814138efc8e8c42b 100644 (file)
@@ -308,6 +308,7 @@ static int rtmdio_run_cmd(struct mii_bus *bus, int cmd, void *smi_access, u32 *v
        if (ret)
                return ret;
 
+       /* Use masks as C22 data and command bits share the same register. */
        ret = regmap_update_bits(ctrl->map, ctrl->cfg->cmd_reg,
                                 ctrl->cfg->cmd_mask, cmd | RTMDIO_RUN);
        if (ret)