[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200319103230.16867-3-vigneshr@ti.com>
Date: Thu, 19 Mar 2020 16:02:30 +0530
From: Vignesh Raghavendra <vigneshr@...com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>
CC: Vignesh Raghavendra <vigneshr@...com>,
<linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Oliver Barta <o.barta89@...il.com>
Subject: [PATCH 2/2] serial: 8250: 8250_omap: Fix throttle to call stop_rx()
Call stop_rx() to halt reception when throttle is requested. Update
unthrottle callback to restart reception.
Signed-off-by: Vignesh Raghavendra <vigneshr@...com>
---
drivers/tty/serial/8250/8250_omap.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 449f1519e70f..82fca112409c 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -699,14 +699,12 @@ static void omap_8250_shutdown(struct uart_port *port)
static void omap_8250_throttle(struct uart_port *port)
{
struct omap8250_priv *priv = port->private_data;
- struct uart_8250_port *up = up_to_u8250p(port);
unsigned long flags;
pm_runtime_get_sync(port->dev);
spin_lock_irqsave(&port->lock, flags);
- up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
- serial_out(up, UART_IER, up->ier);
+ port->ops->stop_rx(port);
priv->throttled = true;
spin_unlock_irqrestore(&port->lock, flags);
@@ -727,6 +725,7 @@ static void omap_8250_unthrottle(struct uart_port *port)
if (up->dma)
up->dma->rx_dma(up);
up->ier |= UART_IER_RLSI | UART_IER_RDI;
+ port->read_status_mask |= UART_LSR_DR;
serial_out(up, UART_IER, up->ier);
spin_unlock_irqrestore(&port->lock, flags);
--
2.25.2
Powered by blists - more mailing lists