summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/bcm63xx_uart.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-11-15 16:56:11 -0800
committerDan Williams <dan.j.williams@intel.com>2017-11-15 16:56:11 -0800
commit4247f24c23589bcc3bc3490515ef8c9497e9ae55 (patch)
tree89726a0e171c443a3e8def2992b56dbd8a21df21 /drivers/tty/serial/bcm63xx_uart.c
parent79ab67ede21f536851a99ea68ee6fc1f5435e055 (diff)
parent9f586fff6574f6ecbf323f92d44ffaf0d96225fe (diff)
Merge branch 'for-4.15/dax' into libnvdimm-for-next
Diffstat (limited to 'drivers/tty/serial/bcm63xx_uart.c')
-rw-r--r--drivers/tty/serial/bcm63xx_uart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 583c9a0c7ecc..8c48c3784831 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -507,9 +507,14 @@ static void bcm_uart_set_termios(struct uart_port *port,
{
unsigned int ctl, baud, quot, ier;
unsigned long flags;
+ int tries;
spin_lock_irqsave(&port->lock, flags);
+ /* Drain the hot tub fully before we power it off for the winter. */
+ for (tries = 3; !bcm_uart_tx_empty(port) && tries; tries--)
+ mdelay(10);
+
/* disable uart while changing speed */
bcm_uart_disable(port);
bcm_uart_flush(port);