net: dsa: mv88e6xxx: wait after reset deactivation
authorBaruch Siach <baruch@tkos.co.il>
Thu, 27 Jun 2019 18:17:39 +0000 (21:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jun 2019 19:21:18 +0000 (12:21 -0700)
Add a 1ms delay after reset deactivation. Otherwise the chip returns
bogus ID value. This is observed with 88E6390 (Peridot) chip.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c

index 063c7a671b414c2f1d228b0120e2c142022ed251..2e8b1ab2c6f7f9299a12ad5284e26140b2cfda5e 100644 (file)
@@ -4711,6 +4711,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
                err = PTR_ERR(chip->reset);
                goto out;
        }
+       if (chip->reset)
+               usleep_range(1000, 2000);
 
        err = mv88e6xxx_detect(chip);
        if (err)