]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: microchip: fix writes to phy registers >= 0x10
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 20 Jun 2023 11:38:54 +0000 (13:38 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jun 2023 02:48:37 +0000 (19:48 -0700)
commit5c844d57aa7894154e49cf2fc648bfe2f1aefc1c
tree83857be9935b39fb3526e2ff6b756307c7054b48
parentece28ecbec9f63e3f722d7c9a99fb965cbeafc1b
net: dsa: microchip: fix writes to phy registers >= 0x10

According to the errata sheets for ksz9477 and ksz9567, writes to the
PHY registers 0x10-0x1f (i.e. those located at addresses 0xN120 to
0xN13f) must be done as a 32 bit write to the 4-byte aligned address
containing the register, hence requires a RMW in order not to change
the adjacent PHY register.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230620113855.733526-4-linux@rasmusvillemoes.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz9477.c