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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 17 Sep 2023 20:47:20 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Stefan Moring <stefanmoring@...il.com>
Cc:     broonie@...nel.org, shawnguo@...nel.org, s.hauer@...gutronxi.de,
        festevam@...il.com, linux-imx@...p.com, linux-psi@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] spi: imx: take in account bits per word instead of
 assuming 8-bits

Hi,

On Sun, Sep 17, 2023 at 06:40:37PM +0200, Stefan Moring wrote:
> The IMX spi driver has a hardcoded 8, breaking the driver for word
> lengths other than 8.
> 
> Signed-off-by: Stefan Moring <stefanmoring@...il.com>
> ---

patch subject is missing the 'spi: imx:' prefix. Otherwise:

Reported-by: Sebastian Reichel <sre@...nel.org>
Fixes: 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length")
Tested-by: Sebastian Reichel <sre@...nel.org>

(no need to Cc stable, since the regression is only in v6.6-rc1)

-- Sebastian

>  drivers/spi/spi-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index a8a74c7cb79f..498e35c8db2c 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -662,7 +662,7 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
>  		if (spi_imx->count >= 512)
>  			ctrl |= 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET;
>  		else
> -			ctrl |= (spi_imx->count*8 - 1)
> +			ctrl |= (spi_imx->count * spi_imx->bits_per_word - 1)
>  				<< MX51_ECSPI_CTRL_BL_OFFSET;
>  	}
>  
> -- 
> 2.42.0
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ