]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Sat, 27 Apr 2024 15:11:39 +0000 (17:11 +0200)
commit83290f9f07197deb423ea00bbbca2575b49852b7
treebe1aa626a77a928bd02b60eb4724761e7b7cb265
parent7ae7104d54342433a3a73975f6569beefdd86350
serial: core: Fix missing shutdown and startup for serial base port

commit 1aa4ad4eb695bac1b0a7ba542a16d6833c9c8dd8 upstream.

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