diff options
author | Valentin Caron <valentin.caron@foss.st.com> | 2023-08-08 18:19:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-22 15:28:51 +0200 |
commit | a01ae50d7eae9e145e595b17fd16a7559e99492b (patch) | |
tree | 0904ec16d78e1f43332c9770b0643ce8523fc254 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 7f28bcea824e4fb192214c6121161053efe738a8 (diff) |
serial: stm32: replace access to DMAR bit by dmaengine_pause/resume
It's rather advised to rely on DMA pause / resume instead of
clearing/setting DMA request enable bit for the same purpose. Some DMA
request/acknowledge race may encountered by doing so. We prefer to use
dmaengine_pause and resume instead to pause a dma transfer when it is
necessary.
Create two new functions (stm32_usart_rx_dma_pause, stm32_usart_rx_dma
_resume) to handle dma error when pausing/resuming.
And rename stm32_usart_start_rx_dma_cyclic() to
stm32_usart_rx_dma_start_or_resume() and use this function to resume an
rx dma transfer. If resume fail, stm32_usart_rx_dma_start_or_resume can
create a new transfer to continue.
It is also safer to close DMA before reset DMAR in stm32_usart_shutdown.
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Link: https://lore.kernel.org/r/20230808161906.178996-6-valentin.caron@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions