* [PATCH] fixup! net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset
@ 2019-09-15 2:53 Andrey Smirnov
0 siblings, 0 replies; only message in thread
From: Andrey Smirnov @ 2019-09-15 2:53 UTC (permalink / raw)
To: barebox; +Cc: Andrey Smirnov, Chris Healy
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-15 2:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 2:53 [PATCH] fixup! net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset Andrey Smirnov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox