Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
r8152 conflicts are the NAPI fixes in 'net' overlapping with some tasklet stuff in net-next Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -523,6 +523,32 @@ int genphy_c45_read_status(struct phy_device *phydev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(genphy_c45_read_status);
|
||||
|
||||
/**
|
||||
* genphy_c45_config_aneg - restart auto-negotiation or forced setup
|
||||
* @phydev: target phy_device struct
|
||||
*
|
||||
* Description: If auto-negotiation is enabled, we configure the
|
||||
* advertising, and then restart auto-negotiation. If it is not
|
||||
* enabled, then we force a configuration.
|
||||
*/
|
||||
int genphy_c45_config_aneg(struct phy_device *phydev)
|
||||
{
|
||||
bool changed = false;
|
||||
int ret;
|
||||
|
||||
if (phydev->autoneg == AUTONEG_DISABLE)
|
||||
return genphy_c45_pma_setup_forced(phydev);
|
||||
|
||||
ret = genphy_c45_an_config_aneg(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (ret > 0)
|
||||
changed = true;
|
||||
|
||||
return genphy_c45_check_and_restart_aneg(phydev, changed);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(genphy_c45_config_aneg);
|
||||
|
||||
/* The gen10g_* functions are the old Clause 45 stub */
|
||||
|
||||
int gen10g_config_aneg(struct phy_device *phydev)
|
||||
|
@@ -507,7 +507,7 @@ static int phy_config_aneg(struct phy_device *phydev)
|
||||
* allowed to call genphy_config_aneg()
|
||||
*/
|
||||
if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
|
||||
return -EOPNOTSUPP;
|
||||
return genphy_c45_config_aneg(phydev);
|
||||
|
||||
return genphy_config_aneg(phydev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user