2023-09-17 18:36:51

by Stefan Moring

[permalink] [raw]
Subject: [PATCH 1/1] take in account bits per word instead of assuming 8-bits

The IMX spi driver has a hardcoded 8, breaking the driver for word
lengths other than 8.

Signed-off-by: Stefan Moring <[email protected]>

---
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


2023-09-17 19:00:49

by Sebastian Reichel

[permalink] [raw]
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 <[email protected]>
> ---

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

Reported-by: Sebastian Reichel <[email protected]>
Fixes: 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length")
Tested-by: Sebastian Reichel <[email protected]>

(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
>


Attachments:
(No filename) (1.15 kB)
signature.asc (849.00 B)
Download all attachments

2023-09-18 12:54:56

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH 1/1] spi: imx: take in account bits per word instead of assuming 8-bits

Hi Stefan,

There is a typo in the spi mailing list. It should be [email protected].

On Sun, Sep 17, 2023 at 3:47 PM Sebastian Reichel <[email protected]> wrote:
>
> 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 <[email protected]>
> > ---
>
> patch subject is missing the 'spi: imx:' prefix. Otherwise:
>
> Reported-by: Sebastian Reichel <[email protected]>
> Fixes: 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length")
> Tested-by: Sebastian Reichel <[email protected]>

With the above tags added and the Subject line fixed:

Reviewed-by: Fabio Estevam <[email protected]>

2023-09-18 16:42:30

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/1] take in account bits per word instead of assuming 8-bits

On Sun, 17 Sep 2023 18:40:37 +0200, Stefan Moring wrote:
> The IMX spi driver has a hardcoded 8, breaking the driver for word
> lengths other than 8.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] take in account bits per word instead of assuming 8-bits
commit: 5f66db08cbd3ca471c66bacb0282902c79db9274

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark