]> git.dujemihanovic.xyz Git - linux.git/commit
net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the...
authorYuiko Oshino <yuiko.oshino@microchip.com>
Wed, 1 Mar 2023 15:43:07 +0000 (08:43 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Mar 2023 06:21:07 +0000 (22:21 -0800)
commite57cf3639c323eeed05d3725fd82f91b349adca8
treeba88d64b7e1aa069ccffc298f725c34e11c96cdc
parent5c1ebbfabcd61142a4551bfc0e51840f9bdae7af
net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver

Move the LAN7800 internal phy (phy ID  0x0007c132) specific register
accesses to the phy driver (microchip.c).

Fix the error reported by Enguerrand de Ribaucourt in December 2022,
"Some operations during the cable switch workaround modify the register
LAN88XX_INT_MASK of the PHY. However, this register is specific to the
LAN8835 PHY. For instance, if a DP8322I PHY is connected to the LAN7801,
that register (0x19), corresponds to the LED and MAC address
configuration, resulting in unapropriate behavior."

I did not test with the DP8322I PHY, but I tested with an EVB-LAN7800
with the internal PHY.

Fixes: 14437e3fa284 ("lan78xx: workaround of forced 100 Full/Half duplex mode error")
Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230301154307.30438-1-yuiko.oshino@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/microchip.c
drivers/net/usb/lan78xx.c