mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
UEC PHY: Speed up initial PHY neg.
Instead of always performing an autoneg, check if the PHY already has a link and if it matches one of the requested modes. Initially only 100MbFD is optimized this way. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
68e1ede88a
commit
f29c181cd4
1 changed files with 9 additions and 0 deletions
|
@ -351,6 +351,15 @@ static int marvell_config_aneg (struct uec_mii_info *mii_info)
|
||||||
static int genmii_config_aneg (struct uec_mii_info *mii_info)
|
static int genmii_config_aneg (struct uec_mii_info *mii_info)
|
||||||
{
|
{
|
||||||
if (mii_info->autoneg) {
|
if (mii_info->autoneg) {
|
||||||
|
/* Speed up the common case, if link is already up, speed and
|
||||||
|
duplex match, skip auto neg as it already matches */
|
||||||
|
if (!genmii_read_status(mii_info) && mii_info->link)
|
||||||
|
if (mii_info->duplex == DUPLEX_FULL &&
|
||||||
|
mii_info->speed == SPEED_100)
|
||||||
|
if (mii_info->advertising &
|
||||||
|
ADVERTISED_100baseT_Full)
|
||||||
|
return 0;
|
||||||
|
|
||||||
config_genmii_advert (mii_info);
|
config_genmii_advert (mii_info);
|
||||||
genmii_restart_aneg (mii_info);
|
genmii_restart_aneg (mii_info);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Add table
Reference in a new issue