]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: read MMD ID from all present MMDs
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 18 Jun 2020 13:46:13 +0000 (14:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:17:15 +0000 (20:17 -0700)
commit7f2cfb923db3565c3f89c02cef319ef8f5ed9495
tree5158362df1f7e86d8478deeca913d56f04021ab1
parenteebf2485f5002fe7ab0c4bc87ebc8faa3f4e5874
net: phy: read MMD ID from all present MMDs

Expand the device_ids[] array to allow all MMD IDs to be read rather
than just the first 8 MMDs, but only read the ID if the MDIO_STAT2
register reports that a device really is present here for these new
devices to maintain compatibility with our current behaviour.  Note
that only a limited number of devices have MDIO_STAT2.

88X3310 PHY vendor MMDs do are marked as present in the
devices_in_package, but do not contain IEE 802.3 compatible register
sets in their lower space.  This avoids reading incorrect values as MMD
identifiers.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h