From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: [PATCH 4/4] serial: sh-sci: simplify locking when re-issuing RXDMA fails
Date: Mon, 6 May 2024 13:40:20 +0200 [thread overview]
Message-ID: <20240506114016.30498-10-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20240506114016.30498-6-wsa+renesas@sang-engineering.com>
Avoid a superfluous unlock/lock-pair by simply moving the printout to
the end of bailing out.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/tty/serial/sh-sci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7cc354ee6305..4dc9c142690a 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1361,14 +1361,12 @@ static void sci_dma_rx_complete(void *arg)
return;
fail:
- uart_port_unlock_irqrestore(port, flags);
- dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
/* Switch to PIO */
- uart_port_lock_irqsave(port, &flags);
dmaengine_terminate_async(chan);
sci_dma_rx_chan_invalidate(s);
sci_dma_rx_reenable_irq(s);
uart_port_unlock_irqrestore(port, flags);
+ dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
}
static void sci_dma_tx_release(struct sci_port *s)
--
2.43.0
prev parent reply other threads:[~2024-05-06 11:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 11:40 [PATCH 0/4] serial: sh-sci: response to Dirk's bugreport Wolfram Sang
2024-05-06 11:40 ` [PATCH 1/4] serial: sh-sci: protect invalidating RXDMA on shutdown Wolfram Sang
2024-05-06 11:40 ` [PATCH 2/4] serial: sh-sci: describe locking requirements for invalidating RXDMA Wolfram Sang
2024-05-06 11:40 ` [PATCH 3/4] serial: sh-sci: let timeout timer only run when DMA is scheduled Wolfram Sang
2024-05-06 11:40 ` Wolfram Sang [this message]
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=20240506114016.30498-10-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).