03.12.2016 10:06, Bhuvanchandra DV ÐÐÑÐÑ:
On 12/03/2016 02:58 AM, Nikita Yushchenko wrote:Then, ok to use
The check is to make sure the reconfiguration of DMA is done only whenPer my code reading, checking for sport->lpuart_dma_rx_use should beProblem found via lockdep:Yeah I saw that too, never really came around to look closer into it.
- lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while
holding sport->port.lock
- sport->lpuart_timer routine is lpuart_timer_func() that calls
lpuart_copy_rx_to_tty() that acquires same lock.
To fix, move Rx DMA stopping out of lock, as it already is in other
places
in the same file.
While at it, also make Rx DMA start/stop code to look the same is in
other places in the same file.
Thanks for looking into it.
You removed the check whether there was an old configuration, I think
the idea of that was that we only resize DMA if it was configured
differently before...
enough, this flag will be set only if DMA was previously enabled,
the baudrate is altered.
if (old && sport->lpuart_dma_rx_use) {...}
in both places?