From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] serial: 8250_dw: Take port lock while accessing LSR
Date: Wed, 15 Jun 2022 13:07:10 +0300 [thread overview]
Message-ID: <YqmvTrV3o9CfgBbx@smile.fi.intel.com> (raw)
In-Reply-To: <20220615090651.15340-3-ilpo.jarvinen@linux.intel.com>
On Wed, Jun 15, 2022 at 12:06:50PM +0300, Ilpo Järvinen wrote:
> Accessing LSR requires port lock because it mutates lsr_saved_flags
> in serial_lsr_in().
I got this as patch 2/3, where are the 1/3 and 3/3?
...
> @@ -266,7 +266,10 @@ static int dw8250_handle_irq(struct uart_port *p)
>
> /* Manually stop the Rx DMA transfer when acting as flow controller */
> if (quirks & DW_UART_QUIRK_IS_DMA_FC && up->dma && up->dma->rx_running && rx_timeout) {
> + spin_lock_irqsave(&p->lock, flags);
> status = serial_lsr_in(up);
> + spin_unlock_irqrestore(&p->lock, flags);
This reminds me the question, why do we need to save flags here? Aren't we in
IRQ context already? (Perhaps another patch might be issued.)
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-06-15 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220615090651.15340-1-ilpo.jarvinen@linux.intel.com>
2022-06-15 9:06 ` [PATCH 1/3] serial: 8250: Fix __stop_tx() & DMA Tx restart races Ilpo Järvinen
2022-06-15 9:06 ` [PATCH 2/3] serial: 8250_dw: Take port lock while accessing LSR Ilpo Järvinen
2022-06-15 10:07 ` Andy Shevchenko [this message]
2022-06-15 10:29 ` Ilpo Järvinen
2022-06-27 12:49 ` Greg KH
2022-06-15 9:06 ` [PATCH 3/3] serial: 8250_dma: No need for if (dma->tx_err) Ilpo Järvinen
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=YqmvTrV3o9CfgBbx@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@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