From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Sun, 12 Sep 2010 21:18:48 -0700 Subject: [U-Boot] [PATCH] UEC PHY: Speed up initial PHY neg. In-Reply-To: <1281451009-26015-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1281451009-26015-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <4C8DA628.3080708@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jocke, On 8/10/2010 7:36 AM, Joakim Tjernlund wrote: > 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 > --- > drivers/qe/uec_phy.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c > index 3baffe4..5237960 100644 > --- a/drivers/qe/uec_phy.c > +++ b/drivers/qe/uec_phy.c > @@ -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) > { > 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); > genmii_restart_aneg (mii_info); > } else Applied to net/next regards, Ben