Skip to content
Commit 321254f4 authored by Andriy Gelman's avatar Andriy Gelman Committed by Carles Cufí
Browse files

drivers: serial: uart_xmc4xxx: Fix race condition



Fixes a race condition between uart_xmc4xxx_dma_rx_cb() and rx timeout.
Although uart_xmc4xxx_dma_rx_cb() called k_work_cancel_delayable()
to cancel the timeout callback, it would not actually be cancelled if
the callback was already in a running state.

Fix the race condition by checking if dma transaction is already
completed in the timeout callback.

This also fixes unit test tests/drivers/uart/uart_async_api on
xmc45_relax_kit which started to fail after commit
f3afd5a4.

Signed-off-by: default avatarAndriy Gelman <andriy.gelman@gmail.com>
parent 087add3b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment