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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Jun 2021 17:47:33 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Dan Sneddon <dan.sneddon@...rochip.com>
Cc:     linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>
Subject: Re: [PATCH] spi: atmel: Fix CS and initialization bug

On Tue, Jun 29, 2021 at 09:29:14AM -0700, Dan Sneddon wrote:

> spi_setup won't get programmed into the hardware.  This patch makes
> sure the cs_activate call is made even with a gpio controlled chip
> select.

In what way does it do that?  I can't tell what the patch is supposed to
do.

> -	enable = (!!(spi->mode & SPI_CS_HIGH) == enable);
>  
> -	if (enable) {
> +	if ((enable && (spi->mode & SPI_CS_HIGH))
> +			|| (!enable && !(spi->mode & SPI_CS_HIGH))) {

This looks especially suspicious.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ