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:	Wed, 05 Dec 2012 18:39:04 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Axel Lin <axel.lin@...ics.com>
CC:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFT] spi: spi-xcomm: Fix wrong setting for SPI_XCOMM_SETTINGS_CPHA

On 12/04/2012 07:27 AM, Axel Lin wrote:
> The logic of setting SPI_XCOMM_SETTINGS_CPHA bit is reversed.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> Hi Lars,
> The logic of setting SPI_XCOMM_SETTINGS_CPHA bit looks wrong to me.
> Can you check if this patch works?
> 
> Thanks,
> Axel

Hi Axel,

Thanks for the patch. But the code is correct as it is. The CPHA definition
of the chip is inverted to that of Linux.

Thanks,
- Lars


> 
>  drivers/spi/spi-xcomm.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
> index 266a847..c2a3e8f 100644
> --- a/drivers/spi/spi-xcomm.c
> +++ b/drivers/spi/spi-xcomm.c
> @@ -99,9 +99,9 @@ static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm,
>  		*settings &= ~SPI_XCOMM_SETTINGS_CPOL;
>  
>  	if (spi->mode & SPI_CPHA)
> -		*settings &= ~SPI_XCOMM_SETTINGS_CPHA;
> -	else
>  		*settings |= SPI_XCOMM_SETTINGS_CPHA;
> +	else
> +		*settings &= ~SPI_XCOMM_SETTINGS_CPHA;
>  
>  	if (spi->mode & SPI_3WIRE)
>  		*settings |= SPI_XCOMM_SETTINGS_3WIRE;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ