From: Zhao Dongdong Added the mdio_c45_bad_oui_list to facilitate adding more PHYs that do not support C45 scanning. Signed-off-by: Zhao Dongdong --- drivers/net/phy/mdio_bus_provider.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio_bus_provider.c b/drivers/net/phy/mdio_bus_provider.c index ce3a607a40cb..928586602eff 100644 --- a/drivers/net/phy/mdio_bus_provider.c +++ b/drivers/net/phy/mdio_bus_provider.c @@ -522,15 +522,21 @@ static int mdiobus_scan_bus_c45(struct mii_bus *bus) * devices have been found, see if any of them are bad for C45, and if we * should skip the C45 scan. */ +static const u32 mdio_c45_bad_oui_list[] = { + MICREL_OUI, +}; static bool mdiobus_prevent_c45_scan(struct mii_bus *bus) { struct phy_device *phydev; mdiobus_for_each_phy(bus, phydev) { u32 oui = phydev->phy_id >> 10; + int i; - if (oui == MICREL_OUI) - return true; + for (i = 0; i < ARRAY_SIZE(mdio_c45_bad_oui_list); i++) { + if (oui == mdio_c45_bad_oui_list[i]) + return true; + } } return false; -- 2.25.1