From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] phy: if the link partner just ack us wait the end of the autoneg
Date: Thu, 15 Nov 2012 09:01:51 +0100 [thread overview]
Message-ID: <20121115080150.GV10369@pengutronix.de> (raw)
In-Reply-To: <1352926999-14981-1-git-send-email-plagnioj@jcrosoft.com>
On Wed, Nov 14, 2012 at 10:03:19PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> drivers/net/phy/phy.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 43738c2..daa657f 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -578,6 +578,18 @@ int genphy_read_status(struct phy_device *phydev)
> if (lpa < 0)
> return lpa;
>
> + if (lpa & LPA_LPACK) {
> + int ret;
> +
> + ret = phy_aneg_done(phydev);
> + if (ret)
> + return ret;
> +
> + lpa = phy_read(phydev, MII_LPA);
> + if (lpa < 0)
> + return lpa;
> + }
> +
Still does not work:
barebox@Freescale i.MX53 LOCO:/ while [ ${done} != 0 ]; do dhcp;
done=$?; msleep 500; done
genphy_read_status MII_LPA 0x0001
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
dhcp failed: Network is down
dhcp: Network is down
genphy_read_status MII_LPA 0x45e1
100Mbps full duplex link detected
DHCP client bound to address 192.168.24.118
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-11-15 8:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 21:03 Jean-Christophe PLAGNIOL-VILLARD
2012-11-14 21:04 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-15 8:01 ` Sascha Hauer [this message]
2012-11-15 9:29 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121115080150.GV10369@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox