From: Jiri Slaby Date: Tue, 3 May 2022 06:31:22 +0000 (+0200) Subject: serial: pic32: restore disabled irqs in pic32_uart_startup() X-Git-Tag: v5.19-rc1~47^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfb9afb6c0e7af7c381c88d72d6d9c64268c160f;p=thirdparty%2Fkernel%2Flinux.git serial: pic32: restore disabled irqs in pic32_uart_startup() pic32_uart_startup() disables interrupts by local_irq_save(). But the function never enables them. The serial core only holds a mutex, so irqs are not restored. So how could this driver work? This irq handling was already present in the driver's initial commit 157b9394709ed (serial: pic32_uart: Add PIC32 UART driver). So is it a candidate for removal? Anyone has a contact to the author: Andrei Pistirica (I believe the one below -- @microchip.com -- will bounce)? Or to someone else @microchip.com? Cc: Andrei Pistirica Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220503063122.20957-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index c5584628f8c44..b399aac530fe6 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -564,6 +564,8 @@ static int pic32_uart_startup(struct uart_port *port) /* enable all interrupts and eanable uart */ pic32_uart_en_and_unmask(port); + local_irq_restore(flags); + enable_irq(sport->irq_rx); return 0;