Skip to content

Commit

Permalink
drivers: console: uart_mcumgr: Skip reading FIFO during setup
Browse files Browse the repository at this point in the history
Drops calling the UART FIFO read function during the setup
function (when not in async mode) which could cause issues on
some devices since this function is not called in an ISR.

(cherry picked from commit 1b364c1)

Original-Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
GitOrigin-RevId: 1b364c1
Change-Id: I4e4ab6e289662614b63b64b9707c92f3bbc8ad78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5062256
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
  • Loading branch information
nordicjm authored and Chromeos LUCI committed Nov 27, 2023
1 parent c9eb06a commit c16bee4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/console/uart_mcumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,9 @@ static void uart_mcumgr_setup(const struct device *uart)
#else
static void uart_mcumgr_setup(const struct device *uart)
{
uint8_t c;

uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);

/* Drain the fifo */
while (uart_fifo_read(uart, &c, 1)) {
continue;
}

uart_irq_callback_set(uart, uart_mcumgr_isr);

uart_irq_rx_enable(uart);
Expand Down

0 comments on commit c16bee4

Please sign in to comment.