|
|
@@ -471,8 +471,14 @@ static int phy_config_aneg(struct phy_device *phydev)
|
|
|
{
|
|
|
if (phydev->drv->config_aneg)
|
|
|
return phydev->drv->config_aneg(phydev);
|
|
|
- else
|
|
|
- return genphy_config_aneg(phydev);
|
|
|
+
|
|
|
+ /* Clause 45 PHYs that don't implement Clause 22 registers are not
|
|
|
+ * allowed to call genphy_config_aneg()
|
|
|
+ */
|
|
|
+ if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
|
|
|
+ return -EOPNOTSUPP;
|
|
|
+
|
|
|
+ return genphy_config_aneg(phydev);
|
|
|
}
|
|
|
|
|
|
/**
|