]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: dsa: mv88e6xxx: Fix writing to a PHY page.
authorAndrew Lunn <andrew@lunn.ch>
Sun, 2 Sep 2018 16:13:14 +0000 (18:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Sep 2018 23:16:23 +0000 (16:16 -0700)
After changing to the needed page, actually write the value to the
register!

Fixes: 09cb7dfd3f14 ("net: dsa: mv88e6xxx: describe PHY page and SerDes")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/phy.c

index 46af8052e535361e7d73ce62f4e6a017c1352bbc..152a65d46e0b85d26326e2c39f8452e5da5a3806 100644 (file)
@@ -110,6 +110,9 @@ int mv88e6xxx_phy_page_write(struct mv88e6xxx_chip *chip, int phy,
        err = mv88e6xxx_phy_page_get(chip, phy, page);
        if (!err) {
                err = mv88e6xxx_phy_write(chip, phy, MV88E6XXX_PHY_PAGE, page);
+               if (!err)
+                       err = mv88e6xxx_phy_write(chip, phy, reg, val);
+
                mv88e6xxx_phy_page_put(chip, phy);
        }