From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: delisun <delisun@pateo.com.cn>
Cc: linux@armlinux.org.uk,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
Date: Thu, 10 Nov 2022 12:24:41 +0200 (EET) [thread overview]
Message-ID: <ef8361c6-fce6-b874-ff1e-d81dd63dac14@linux.intel.com> (raw)
In-Reply-To: <20221110020108.7700-1-delisun@pateo.com.cn>
[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]
On Thu, 10 Nov 2022, delisun wrote:
> Clearing the RX FIFO will cause data loss.
> Copy the pl011_enabl_interrupts implementation, and remove the clear
> interrupt and FIFO part of the code.
>
> Fixes: 211565b10099 ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle")
> Signed-off-by: delisun <delisun@pateo.com.cn>
> ---
> drivers/tty/serial/amba-pl011.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 5cdced39eafd..08034e5dcec0 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -1828,8 +1828,17 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap)
> static void pl011_unthrottle_rx(struct uart_port *port)
> {
> struct uart_amba_port *uap = container_of(port, struct uart_amba_port, port);
> + unsigned long flags;
>
> - pl011_enable_interrupts(uap);
> + spin_lock_irqsave(&uap->port.lock, flags);
> +
> + uap->im = UART011_RTIM;
> + if (!pl011_dma_rx_running(uap))
> + uap->im |= UART011_RXIM;
> +
> + pl011_write(uap->im, uap, REG_IMSC);
> +
> + spin_unlock_irqrestore(&uap->port.lock, flags);
> }
>
> static int pl011_startup(struct uart_port *port)
Thanks.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2022-11-10 10:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 2:01 delisun
2022-11-10 10:24 ` Ilpo Järvinen [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-09 10:58 delisun
2022-11-09 11:55 ` Ilpo Järvinen
2022-11-17 21:10 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef8361c6-fce6-b874-ff1e-d81dd63dac14@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=delisun@pateo.com.cn \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®