serial: core: Fix missing shutdown and startup for serial base port
authorTony Lindgren <tony@atomide.com>
Thu, 11 Apr 2024 05:58:45 +0000 (08:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2024 12:21:11 +0000 (14:21 +0200)
commit1aa4ad4eb695bac1b0a7ba542a16d6833c9c8dd8
treed79f905386c93a133076ec8f104136f05ca30534
parent9cf7ea2eeb745213dc2a04103e426b960e807940
serial: core: Fix missing shutdown and startup for serial base port

We are seeing start_tx being called after port shutdown as noted by Jiri.
This happens because we are missing the startup and shutdown related
functions for the serial base port.

Let's fix the issue by adding startup and shutdown functions for the
serial base port to block tx flushing for the serial base port when the
port is not in use.

Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
Cc: stable <stable@kernel.org>
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20240411055848.38190-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_base.h
drivers/tty/serial/serial_core.c
drivers/tty/serial/serial_port.c