From 486d7b2d1ef29c77bcc25153a1801ca746524e55 Mon Sep 17 00:00:00 2001 From: Mandar Mahesh Kamble Date: Wed, 11 Dec 2024 15:03:38 +0530 Subject: [PATCH] tty: msm: Update timer handling for interrupt-safe context Modified timer handling to address recent updates in del_timer_sync() behavior. The function is not permitted to be invoked from interrupt context unless the timer is marked with TIMER_IRQSAFE. To ensure compliance and avoid potential race conditions, the affected timer is now explicitly marked with TIMER_IRQSAFE. Change-Id: I5724f4172e6576ba2f0cce5e383d76dbdb0ce637 Signed-off-by: Mandar Mahesh Kamble --- drivers/tty/serial/msm_serial_hs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index cfee5b5799b6..47c50bb1eef3 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c @@ -2684,7 +2684,7 @@ static int msm_hs_startup(struct uart_port *uport) tx->dma_in_flight = false; MSM_HS_DBG("%s():desc usage flag 0x%lx\n", __func__, rx->queued_flag); timer_setup(&(tx->tx_timeout_timer), - tx_timeout_handler, 0); + tx_timeout_handler, TIMER_IRQSAFE); /* Enable reading the current CTS, no harm even if CTS is ignored */ msm_uport->imr_reg |= UARTDM_ISR_CURRENT_CTS_BMSK;