Commit 5bc184c
committed
dmaengine: stm32-dma3: set LL base address when transfer starts
Linked-list (LL) is allocated in stm32_dma3_chan_desc_alloc(). The LL is
then used when starting the transfer in stm32_dma3_chan_start(). Nothing
prevents a user from preparing another transfer before starting the
previous one. If, for the same channel, another kind of transfer is
prepared (using dmaengine_prep_xxx API), the LL base address may change.
This address could be overwritten in the CxLBAR register if the channel is
disabled, or the CxLBAR might not be updated if the channel is enabled,
leading to a mismatch between the transfer being started and the LL pointed
to by CxLBAR register.
To avoid this, write the LL base address in CxLBAR when starting the
transfer instead of when the linked-list is allocated.
Change-Id: Ia8e8cb9b2e423b994545154f09feb46bc6b51e4e
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/521392
ACI: CIBUILD <MDG-smet-aci-builds@list.st.com>
ACI: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@st.com>1 parent be95b31 commit 5bc184c
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | 671 | | |
673 | 672 | | |
674 | 673 | | |
| |||
713 | 712 | | |
714 | 713 | | |
715 | 714 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | 715 | | |
722 | 716 | | |
723 | 717 | | |
| |||
1073 | 1067 | | |
1074 | 1068 | | |
1075 | 1069 | | |
| 1070 | + | |
1076 | 1071 | | |
1077 | 1072 | | |
1078 | 1073 | | |
| |||
1096 | 1091 | | |
1097 | 1092 | | |
1098 | 1093 | | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| |||
0 commit comments