From: Kartik <kkartik@nvidia.com>
To: <linux@armlinux.org.uk>, <gregkh@linuxfoundation.org>,
<jirislaby@kernel.org>, <theo.lebrun@bootlin.com>,
<linus.walleij@linaro.org>, <ilpo.jarvinen@linux.intel.com>,
<l.sanfilippo@kunbus.com>, <konradybcio@kernel.org>,
<christophe.jaillet@wanadoo.fr>, <arnd@arndb.de>,
<linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>
Subject: [PATCH] serial: amba-pl011: Fix RX stall when DMA is used
Date: Wed, 13 Nov 2024 10:40:23 +0530 [thread overview]
Message-ID: <20241113051023.3125-1-kkartik@nvidia.com> (raw)
Function pl011_throttle_rx() calls pl011_stop_rx() to disable RX, which
also disables the RX DMA by clearing the RXDMAE bit of the DMACR
register. However, to properly unthrottle RX when DMA is used, the
function pl011_unthrottle_rx() is expected to set the RXDMAE bit of
the DMACR register, which it currently lacks. This causes RX to stall
after the throttle API is called.
Set RXDMAE bit in the DMACR register while unthrottling RX if RX DMA is
used.
Fixes: 211565b10099 ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle")
Signed-off-by: Kartik <kkartik@nvidia.com>
---
drivers/tty/serial/amba-pl011.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 4c4b0d470c65..f40714685166 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1819,6 +1819,11 @@ static void pl011_unthrottle_rx(struct uart_port *port)
pl011_write(uap->im, uap, REG_IMSC);
+ if (uap->using_rx_dma) {
+ uap->dmacr |= UART011_RXDMAE;
+ pl011_write(uap->dmacr, uap, REG_DMACR);
+ }
+
uart_port_unlock_irqrestore(&uap->port, flags);
}
--
2.47.0
next reply other threads:[~2024-11-13 5:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 5:10 Kartik [this message]
2024-11-13 5:31 ` [PATCH] serial: amba-pl011: Fix RX stall when DMA is used Greg KH
2024-11-13 17:57 ` kernel test robot
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=20241113051023.3125-1-kkartik@nvidia.com \
--to=kkartik@nvidia.com \
--cc=arnd@arndb.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=konradybcio@kernel.org \
--cc=l.sanfilippo@kunbus.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=theo.lebrun@bootlin.com \
/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