linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <jgarzik@pobox.com>
Cc: super.firetwister@googlemail.com, netdev@vger.kernel.org,
	linuxppc-dev@ozlabs.org
Subject: [PATCH] ibm_newemac: Increase MDIO timeouts
Date: Wed, 23 Apr 2008 15:17:14 +1000	[thread overview]
Message-ID: <20080423051832.63BF7DDF65@ozlabs.org> (raw)

This patch doubles the MDIO timeouts in EMAC as there are field
cases where they are two short to communicate with some PHYs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/net/ibm_newemac/core.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-work.orig/drivers/net/ibm_newemac/core.c	2008-04-23 15:11:16.000000000 +1000
+++ linux-work/drivers/net/ibm_newemac/core.c	2008-04-23 15:14:20.000000000 +1000
@@ -738,7 +738,7 @@ static int __emac_mdio_read(struct emac_
 		rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
 
 	/* Wait for management interface to become idle */
-	n = 10;
+	n = 20;
 	while (!emac_phy_done(dev, in_be32(&p->stacr))) {
 		udelay(1);
 		if (!--n) {
@@ -763,7 +763,7 @@ static int __emac_mdio_read(struct emac_
 	out_be32(&p->stacr, r);
 
 	/* Wait for read to complete */
-	n = 100;
+	n = 200;
 	while (!emac_phy_done(dev, (r = in_be32(&p->stacr)))) {
 		udelay(1);
 		if (!--n) {
@@ -810,7 +810,7 @@ static void __emac_mdio_write(struct ema
 		rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
 
 	/* Wait for management interface to be idle */
-	n = 10;
+	n = 20;
 	while (!emac_phy_done(dev, in_be32(&p->stacr))) {
 		udelay(1);
 		if (!--n) {
@@ -836,7 +836,7 @@ static void __emac_mdio_write(struct ema
 	out_be32(&p->stacr, r);
 
 	/* Wait for write to complete */
-	n = 100;
+	n = 200;
 	while (!emac_phy_done(dev, in_be32(&p->stacr))) {
 		udelay(1);
 		if (!--n) {

             reply	other threads:[~2008-04-23  5:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23  5:17 Benjamin Herrenschmidt [this message]
2008-04-25  6:04 ` [PATCH] ibm_newemac: Increase MDIO timeouts Jeff Garzik
2008-04-25 20:57 ` Bill Fink
2008-04-25 22:22   ` Benjamin Herrenschmidt
2008-04-25 23:58     ` Josh Boyer
2008-04-26  3:35       ` Benjamin Herrenschmidt

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=20080423051832.63BF7DDF65@ozlabs.org \
    --to=benh@kernel.crashing.org \
    --cc=jgarzik@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=super.firetwister@googlemail.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;
as well as URLs for NNTP newsgroup(s).