Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: imx: Grab port lock in imx_uart_enable_wakeup()

The port lock needs to be held when doing read-modify-write on UCR1 and
UCR3.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Link: https://lore.kernel.org/r/20240913-serial-imx-lockfix-v1-1-4d102746c89d@geanix.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Esben Haabendal and committed by
Greg Kroah-Hartman
3c199ed5 5cbb9b17

+5
+5
drivers/tty/serial/imx.c
··· 2580 2580 uart_port_unlock_irqrestore(&sport->port, flags); 2581 2581 } 2582 2582 2583 + /* called with irq off */ 2583 2584 static void imx_uart_enable_wakeup(struct imx_port *sport, bool on) 2584 2585 { 2585 2586 u32 ucr3; 2587 + 2588 + uart_port_lock(&sport->port); 2586 2589 2587 2590 ucr3 = imx_uart_readl(sport, UCR3); 2588 2591 if (on) { ··· 2606 2603 } 2607 2604 imx_uart_writel(sport, ucr1, UCR1); 2608 2605 } 2606 + 2607 + uart_port_unlock(&sport->port); 2609 2608 } 2610 2609 2611 2610 static int imx_uart_suspend_noirq(struct device *dev)