From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Moteen Shah <m-shah@ti.com>
Cc: "Kumar, Udit" <u-kumar1@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
krzk+dt@kernel.org, linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Jiri Slaby <jirislaby@kernel.org>,
devicetree@vger.kernel.org, gehariprasath@ti.com,
vigneshr@ti.com, nm@ti.com, a-limaye@ti.com,
y-abhilashchandra@ti.com
Subject: Re: [PATCH v2 2/2] serial: 8250_dw: Add capability to skip empty FIFO read
Date: Fri, 18 Sep 2026 12:56:24 +0300 (EEST) [thread overview]
Message-ID: <ee666d60-1838-c54a-375b-1173b8140c01@linux.intel.com> (raw)
In-Reply-To: <307c005e-9a37-41cc-871a-6167a54d3a37@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2755 bytes --]
On Fri, 18 Sep 2026, Moteen Shah wrote:
> Hey Ilpo,
>
> On 17/09/26 15:10, Ilpo Järvinen wrote:
> > On Wed, 16 Sep 2026, Kumar, Udit wrote:
> > > On 9/16/2026 4:22 PM, Ilpo Järvinen wrote:
> > > > On Wed, 16 Sep 2026, Moteen Shah wrote:
> > > >
> > > > > dw8250_handle_irq() does a bogus RX read on RX_TIMEOUT with no data
> > > > > present, to avoid an interrupt storm. The UART core also performs
> > > > > unconditional reads on the empty FIFO during startup and shutdown
> > > > > of the port. On the IP version used in TDA54, that interrupt storm
> > > > > no longer occurs, but reading an empty FIFO instead triggers a data
> > > > > abort.
> > > > >
> > > > > Add a new capability to guard against the empty FIFO reads, avoiding
> > > > > the data aborts.
> > > > >
> > > > > Signed-off-by: Moteen Shah <m-shah@ti.com>
> > > > > ---
> > > > > drivers/tty/serial/8250/8250.h | 1 +
> > > > > drivers/tty/serial/8250/8250_dw.c | 16 +++++++++++++++-
> > > > > drivers/tty/serial/8250/8250_port.c | 12 +++++++++---
> > > > > 3 files changed, 25 insertions(+), 4 deletions(-)
> > > > >
> > > > > diff --git a/drivers/tty/serial/8250/8250.h
> > > > > b/drivers/tty/serial/8250/8250.h
> > > > > index 77fe0588fd6b..45e13c3a8c14 100644
> > > > > --- a/drivers/tty/serial/8250/8250.h
> > > > > +++ b/drivers/tty/serial/8250/8250.h
> > > > > @@ -86,6 +86,7 @@ struct serial8250_config {
> > > > > * STOP PARITY EPAR SPAR WLEN5
> > > > > WLEN6
> > > > > */
> > > > > #define UART_CAP_NOTEMT BIT(18) /* UART without interrupt on
> > > > > TEMT available */
> > > > > +#define UART_CAP_RXFIFO_EMPTY_READ BIT(19) /* UART needs LSR_DR
> > > > > check before RX read (TDA54) */
> > > > IMO, this define naming contradicts with the comment because you
> > > > effectively say "capable of reading Rx while receive buffer is empty",
> > > > not
> > > > that it needs DR check before issuing that read on buffer (~ named
> > > > exactly
> > > > opposite of the actual meaning it is being used in the code).
> > > >
> > > I echo your comments; the naming should reflect that the IP does not
> > > allow reading an empty FIFO.
> > I now recalled we've also the pending RBR -> SRBR change:
> >
> > https://lore.kernel.org/linux-serial/20260908141524.20302-1-yang.yicong@picoheart.com/#t
> >
> > I wonder if a similar thing would help in this case as well?
> >
> > I understand this patch covers more ground than the SRBR patch but can the
> > IP used in this case read SRBR without aborting?
>
> The IP that TDA54 uses does not supports the shadow registers, hence we will
> have to go through the quirk/capability path.
Fair. Thanks for confirming.
--
i.
prev parent reply other threads:[~2026-09-18 9:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 8:55 [PATCH v2 0/2] serial: 8250_dw: Add ti,tda54-uart support Moteen Shah
2026-09-16 8:55 ` [PATCH v2 1/2] dt-bindings: serial: snps-dw-apb-uart: Add ti,tda54-uart Moteen Shah
2026-09-16 8:55 ` [PATCH v2 2/2] serial: 8250_dw: Add capability to skip empty FIFO read Moteen Shah
2026-09-16 10:52 ` Ilpo Järvinen
2026-09-16 12:55 ` Moteen Shah
2026-09-16 14:32 ` Hari Prasath G E
2026-09-16 13:47 ` Kumar, Udit
2026-09-17 9:40 ` Ilpo Järvinen
2026-09-18 4:05 ` Kumar, Udit
2026-09-18 9:23 ` Moteen Shah
2026-09-18 9:56 ` Ilpo Järvinen [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=ee666d60-1838-c54a-375b-1173b8140c01@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=a-limaye@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=gehariprasath@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m-shah@ti.com \
--cc=nm@ti.com \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.com \
--cc=y-abhilashchandra@ti.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
all inboxes | Powered by JetHome®