lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 27 Jun 2019 15:13:23 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Baruch Siach <baruch@...s.co.il>
Cc:     Vivien Didelot <vivien.didelot@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: dsa: mv88e6xxx: wait after reset deactivation

On Thu, Jun 27, 2019 at 07:29:46AM +0300, Baruch Siach wrote:
> 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@...s.co.il>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index f4e2db44ad91..549f528f216c 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -4910,6 +4910,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
>  		err = PTR_ERR(chip->reset);
>  		goto out;
>  	}
> +	mdelay(1);
>  
>  	err = mv88e6xxx_detect(chip);
>  	if (err)

Hi Baruch

So your switch is held in reset by default, by the bootloader? So you
need to take it out of reset in order to detect it. Yes, this makes
sense.

However, please use usleep_range(10000, 20000), and only do this if
the GPIO is valid.

Thanks

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ