net: mdio: Add workaround for Micrel PHYs which are not C45 compatible
authorAndrew Lunn <andrew@lunn.ch>
Wed, 18 Jan 2023 10:01:37 +0000 (11:01 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Jan 2023 15:23:19 +0000 (16:23 +0100)
commit3486593374858b41ae6ef7720cb28ff39ad822f3
treea5cec58ec15b40bf569004d222d0423f0b5eb556
parentd41e127757f37d0d47ccda4af2fe74c32533f798
net: mdio: Add workaround for Micrel PHYs which are not C45 compatible

After scanning the bus for C22 devices, check if any Micrel PHYs have
been found.  They are known to do bad things if there are C45
transactions on the bus. Prevent the scanning of the bus using C45 if
such a PHY has been detected.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/mdio_bus.c
include/linux/micrel_phy.h