mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Chris Healy <cphealy@gmail.com>
Subject: [PATCH] fixup! net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
Date: Sat, 14 Sep 2019 19:53:01 -0700	[thread overview]
Message-ID: <20190915025301.24456-1-andrew.smirnov@gmail.com> (raw)

---

Looks like I forgot to change my debugging timeout value as well as
finish a comment. Sorry about that.

 drivers/net/phy/mv88e6xxx/global1.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/mv88e6xxx/global1.c b/drivers/net/phy/mv88e6xxx/global1.c
index 2331195fb3..218f877de3 100644
--- a/drivers/net/phy/mv88e6xxx/global1.c
+++ b/drivers/net/phy/mv88e6xxx/global1.c
@@ -24,7 +24,7 @@ static int mv88e6xxx_g1_read(struct mv88e6xxx_chip *chip, int reg, u16 *val)
 void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip)
 {
 	const uint64_t start   = get_time_ns();
-	const uint64_t timeout = 20 * SECOND;
+	const uint64_t timeout = SECOND;
 	u16 val;
 	int err;
 
@@ -38,7 +38,9 @@ void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip)
 			return;
 		}
 
-		if (val != 0xFFFF && /* switch will return 0xffff it it */
+		if (val != 0xFFFF && /* switch will return 0xffff until
+				      * EEPROM is loaded
+				      */
 		    val & BIT(MV88E6XXX_G1_STS_IRQ_EEPROM_DONE))
 			return;
 
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2019-09-15  2:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190915025301.24456-1-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=cphealy@gmail.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