summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2017-05-02 17:15:42 +0930
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 16:19:16 +0200
commitea5244e2af3b4813bf3d90ba6a6481d1a3c33d15 (patch)
treefd749101b10ce79c833f5dd8f212039cf32bdd8e /drivers/tty
parent70b2fe355a4cac3488a208ff13defefef45d6f77 (diff)
downloadop-kernel-dev-ea5244e2af3b4813bf3d90ba6a6481d1a3c33d15.zip
op-kernel-dev-ea5244e2af3b4813bf3d90ba6a6481d1a3c33d15.tar.gz
serial: 8250: Add flag so drivers can avoid THRE probe
The probing of THRE irq behaviour assumes the other end will be reading bytes out of the buffer in order to probe the port at driver init. In some cases the other end cannot be relied upon to read these bytes, so provide a flag for them to skip this step. Bit 19 was chosen as the flags are a int and the top bits are taken. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 09a65a3..d5b6cee 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2229,7 +2229,7 @@ int serial8250_do_startup(struct uart_port *port)
}
}
- if (port->irq) {
+ if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
unsigned char iir1;
/*
* Test for UARTs that do not reassert THRE when the
OpenPOWER on IntegriCloud