]> www.infradead.org Git - linux.git/commitdiff
net: dsa: vsc73xx: pass value in phy_write operation
authorPawel Dembicki <paweldembicki@gmail.com>
Fri, 9 Aug 2024 19:38:03 +0000 (21:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Aug 2024 10:46:55 +0000 (11:46 +0100)
In the 'vsc73xx_phy_write' function, the register value is missing,
and the phy write operation always sends zeros.

This commit passes the value variable into the proper register.

Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver")
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/vitesse-vsc73xx-core.c

index f548ed4cb23f0c278d40b298353d7ffd1835c518..4b300c293dec47d5c031e174ee641afde1ad140c 100644 (file)
@@ -574,7 +574,7 @@ static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,
                return 0;
        }
 
-       cmd = (phy << 21) | (regnum << 16);
+       cmd = (phy << 21) | (regnum << 16) | val;
        ret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, 0, 1, cmd);
        if (ret)
                return ret;