summaryrefslogtreecommitdiffstats
path: root/drivers/tty/mxser.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-11-18 08:31:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-25 18:33:21 +0100
commite25ed43b4b603c1f7727bfede684b165dc5cd18c (patch)
tree62cc845cd9bce8a6ebe80d383517ace291ffc97d /drivers/tty/mxser.c
parent862f72187a41008df2cce3f8e97f57070cbc7060 (diff)
downloadlinux-stable-e25ed43b4b603c1f7727bfede684b165dc5cd18c.tar.gz
linux-stable-e25ed43b4b603c1f7727bfede684b165dc5cd18c.tar.bz2
linux-stable-e25ed43b4b603c1f7727bfede684b165dc5cd18c.zip
mxser: remove wait for sent from mxser_close_port
mxser_close() behaves like this: -> tty_port_close_start() -> tty_wait_until_sent() -> mxser_wait_until_sent() -> mxser_close_port -> wait for TEMT So it is already waited for TEMT through mxser_wait_until_sent() and there is another round of waiting in mxser_close_port(). The latter one is superfluous as nothing could be filled into the output FIFO. Remove the call. This helps unification among drivers (so that all behave the same) and future use of tty_port_close(). Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20211118073125.12283-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/mxser.c')
-rw-r--r--drivers/tty/mxser.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 93a95a135a71..f9615245a60a 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -878,7 +878,6 @@ static void mxser_flush_buffer(struct tty_struct *tty)
static void mxser_close_port(struct tty_port *port)
{
struct mxser_port *info = container_of(port, struct mxser_port, port);
- unsigned long timeout;
/*
* At this point we stop accepting input. To do this, we
* disable the receive line status interrupts, and tell the
@@ -890,17 +889,6 @@ static void mxser_close_port(struct tty_port *port)
info->IER &= ~MOXA_MUST_RECV_ISR;
outb(info->IER, info->ioaddr + UART_IER);
- /*
- * Before we drop DTR, make sure the UART transmitter
- * has completely drained; this is especially
- * important if there is a transmit FIFO!
- */
- timeout = jiffies + HZ;
- while (!(inb(info->ioaddr + UART_LSR) & UART_LSR_TEMT)) {
- schedule_timeout_interruptible(5);
- if (time_after(jiffies, timeout))
- break;
- }
}
/*