Re: [PATCH 4.4.y-cip 2/4] serial: sh-sci: Terminate TX DMA during buffer flushing


Pavel Machek
 

Hi!

From: Geert Uytterhoeven <geert+renesas@...>

commit 775b7ffd7d6d5db320d99b0a485c51e04dfcf9f1 upstream.

While the .flush_buffer() callback clears sci_port.tx_dma_len since
commit 1cf4a7efdc71cab8 ("serial: sh-sci: Fix race condition causing
garbage during shutdown"), it does not terminate a transmit DMA
operation that may be in progress.

Fix this by terminating any pending DMA operations, and resetting the
corresponding cookie.
What is the impact of the bug? DMA running during reboot, but not
doing any harm?

Anyway, this looks okay to me.

Best regards,
Pavel

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Join {cip-dev@lists.cip-project.org to automatically receive all group messages.