net: phy: add support for probing MMDs >= 8 for devices-in-package

Add support for probing MMDs above 7 for a valid devices-in-package
specifier, but only probe the vendor MMDs for this if they also report
that there the device is present in status register 2.  This avoids
issues where the MMD is implemented, but does not provide IEEE 802.3
compliant registers (such as the MV88X3310 PHY.)

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>
This commit is contained in:
Russell King
2020-06-18 14:45:58 +01:00
committed by David S. Miller
parent 439625a772
commit c746053d27
2 changed files with 40 additions and 2 deletions

View File

@@ -388,6 +388,8 @@ enum phy_state {
PHY_CABLETEST,
};
#define MDIO_MMD_NUM 32
/**
* struct phy_c45_device_ids - 802.3-c45 Device Identifiers
* @devices_in_package: Bit vector of devices present.