* [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
@ 2026-02-24 15:09 Alain Volmat
2026-02-24 15:25 ` Antonio Quartulli
2026-02-27 1:23 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Alain Volmat @ 2026-02-24 15:09 UTC (permalink / raw)
To: Mark Brown, Maxime Coquelin, Alexandre Torgue, Clement LE GOFFIC,
Antonio Quartulli
Cc: linux-spi, linux-stm32, linux-arm-kernel, linux-kernel,
Alain Volmat
Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
introduced a regression since dma descriptors generated as part of the
stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
to the caller function, leading to mdma-dma chaining being no more
functional.
Fixes: c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
drivers/spi/spi-stm32.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index b99de8c4cc99..33f211e159ef 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1625,6 +1625,9 @@ static int stm32_spi_prepare_rx_dma_mdma_chaining(struct stm32_spi *spi,
return -EINVAL;
}
+ *rx_mdma_desc = _mdma_desc;
+ *rx_dma_desc = _dma_desc;
+
return 0;
}
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260224-spi-stm32-chaining-fix-5363946e7f3a
Best regards,
--
Alain Volmat <alain.volmat@foss.st.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
2026-02-24 15:09 [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining Alain Volmat
@ 2026-02-24 15:25 ` Antonio Quartulli
2026-02-26 16:46 ` Alain Volmat
2026-02-27 1:23 ` Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Antonio Quartulli @ 2026-02-24 15:25 UTC (permalink / raw)
To: Alain Volmat, Mark Brown, Maxime Coquelin, Alexandre Torgue,
Clement LE GOFFIC
Cc: linux-spi, linux-stm32, linux-arm-kernel, linux-kernel
Hi,
On 24/02/2026 16:09, Alain Volmat wrote:
> Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
> introduced a regression since dma descriptors generated as part of the
> stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
> to the caller function, leading to mdma-dma chaining being no more
> functional.
>
> Fixes: c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
> drivers/spi/spi-stm32.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> index b99de8c4cc99..33f211e159ef 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1625,6 +1625,9 @@ static int stm32_spi_prepare_rx_dma_mdma_chaining(struct stm32_spi *spi,
> return -EINVAL;
> }
>
> + *rx_mdma_desc = _mdma_desc;
> + *rx_dma_desc = _dma_desc;
> +
Thanks for catching this!
Indeed my fix lost the pointer-to-pointer logic, which was needed to
pass back the computed values.
This patch looks good, but at this point I think you can also remove the
lines:
_dma_desc = NULL;
in the error paths above? Setting them to NULL makes no sense as they
are not going anywhere.
Regards,
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
2026-02-24 15:25 ` Antonio Quartulli
@ 2026-02-26 16:46 ` Alain Volmat
2026-02-26 23:03 ` Antonio Quartulli
0 siblings, 1 reply; 5+ messages in thread
From: Alain Volmat @ 2026-02-26 16:46 UTC (permalink / raw)
To: Antonio Quartulli
Cc: Mark Brown, Maxime Coquelin, Alexandre Torgue, Clement LE GOFFIC,
linux-spi, linux-stm32, linux-arm-kernel, linux-kernel
Hi,
On Tue, Feb 24, 2026 at 04:25:14PM +0100, Antonio Quartulli wrote:
> Hi,
>
> On 24/02/2026 16:09, Alain Volmat wrote:
> > Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
> > introduced a regression since dma descriptors generated as part of the
> > stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
> > to the caller function, leading to mdma-dma chaining being no more
> > functional.
> >
> > Fixes: c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
> > Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> > ---
> > drivers/spi/spi-stm32.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> > index b99de8c4cc99..33f211e159ef 100644
> > --- a/drivers/spi/spi-stm32.c
> > +++ b/drivers/spi/spi-stm32.c
> > @@ -1625,6 +1625,9 @@ static int stm32_spi_prepare_rx_dma_mdma_chaining(struct stm32_spi *spi,
> > return -EINVAL;
> > }
> > + *rx_mdma_desc = _mdma_desc;
> > + *rx_dma_desc = _dma_desc;
> > +
>
> Thanks for catching this!
>
> Indeed my fix lost the pointer-to-pointer logic, which was needed to pass
> back the computed values.
>
> This patch looks good, but at this point I think you can also remove the
> lines:
>
> _dma_desc = NULL;
>
> in the error paths above? Setting them to NULL makes no sense as they are
> not going anywhere.
I agree that those lines can be removed. However my feeling is that this
is not part of this fix since this is more about removing useless lines.
If this is ok for you I will propose another patch on top of the current
one for that purpose and without the Fixes on it.
Regards,
Alain
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
2026-02-26 16:46 ` Alain Volmat
@ 2026-02-26 23:03 ` Antonio Quartulli
0 siblings, 0 replies; 5+ messages in thread
From: Antonio Quartulli @ 2026-02-26 23:03 UTC (permalink / raw)
To: Alain Volmat
Cc: Mark Brown, Maxime Coquelin, Alexandre Torgue, Clement LE GOFFIC,
linux-spi, linux-stm32, linux-arm-kernel, linux-kernel
On 26/02/2026 17:46, Alain Volmat wrote:
> Hi,
>
> On Tue, Feb 24, 2026 at 04:25:14PM +0100, Antonio Quartulli wrote:
>> Hi,
>>
>> On 24/02/2026 16:09, Alain Volmat wrote:
>>> Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
>>> introduced a regression since dma descriptors generated as part of the
>>> stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
>>> to the caller function, leading to mdma-dma chaining being no more
>>> functional.
>>>
>>> Fixes: c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
>>> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
>>> ---
>>> drivers/spi/spi-stm32.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
>>> index b99de8c4cc99..33f211e159ef 100644
>>> --- a/drivers/spi/spi-stm32.c
>>> +++ b/drivers/spi/spi-stm32.c
>>> @@ -1625,6 +1625,9 @@ static int stm32_spi_prepare_rx_dma_mdma_chaining(struct stm32_spi *spi,
>>> return -EINVAL;
>>> }
>>> + *rx_mdma_desc = _mdma_desc;
>>> + *rx_dma_desc = _dma_desc;
>>> +
>>
>> Thanks for catching this!
>>
>> Indeed my fix lost the pointer-to-pointer logic, which was needed to pass
>> back the computed values.
>>
>> This patch looks good, but at this point I think you can also remove the
>> lines:
>>
>> _dma_desc = NULL;
>>
>> in the error paths above? Setting them to NULL makes no sense as they are
>> not going anywhere.
>
> I agree that those lines can be removed. However my feeling is that this
> is not part of this fix since this is more about removing useless lines.
> If this is ok for you I will propose another patch on top of the current
> one for that purpose and without the Fixes on it.
I agree.
This fix gets my
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
However, I'd let Mark (the maintainer) decide.
Regards,
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
2026-02-24 15:09 [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining Alain Volmat
2026-02-24 15:25 ` Antonio Quartulli
@ 2026-02-27 1:23 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-02-27 1:23 UTC (permalink / raw)
To: Maxime Coquelin, Alexandre Torgue, Clement LE GOFFIC,
Antonio Quartulli, Alain Volmat
Cc: linux-spi, linux-stm32, linux-arm-kernel, linux-kernel
On Tue, 24 Feb 2026 16:09:22 +0100, Alain Volmat wrote:
> Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
> introduced a regression since dma descriptors generated as part of the
> stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
> to the caller function, leading to mdma-dma chaining being no more
> functional.
>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: stm32: fix missing pointer assignment in case of dma chaining
commit: e96493229a6399e902062213c6381162464cdd50
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-27 1:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 15:09 [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining Alain Volmat
2026-02-24 15:25 ` Antonio Quartulli
2026-02-26 16:46 ` Alain Volmat
2026-02-26 23:03 ` Antonio Quartulli
2026-02-27 1:23 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox