From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yicong Yang <yang.yicong@picoheart.com>
Cc: ilpo.jarvinen@linux.intel.com, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
jirislaby@kernel.org, geshijian@picoheart.com,
yangyang.8776@picoheart.com, yanligen@picoheart.com
Subject: Re: [PATCH v2] serial: 8250_dw: Prefer SRBR in bogus RX timeout workaround if available
Date: Tue, 8 Sep 2026 13:25:23 +0300 [thread overview]
Message-ID: <ap_ik82SVnEGkBPU@ashevche-desk.local> (raw)
In-Reply-To: <20260907074035.77796-1-yang.yicong@picoheart.com>
On Mon, Sep 07, 2026 at 03:40:35PM +0800, Yicong Yang wrote:
> The DW uart could get into the cases where a bogus RX timeout
> interrupt is asserted but no available data. This could be
> workaround by doing a bogus read.
>
> Currently the driver's using the standard RBR (receive buffer
> register) for this bogus read. However the reading of RBR
> in this case is allowed to raise a hardware error if vendor
> choose to implement in this way (our platform). It's also
> allowed to do the bogus read using SRBR (shadow RBR) for
> workaround which won't raise the hardware error. So change
> to use the SRBR to workaround the issue if it's available.
...
> struct dw8250_port_data {
>
> /* RS485 variables */
> bool hw_rs485_support;
>
> + /* Shadow RBR offset, fallback to RBR if no shadow register support */
This comment is for "section", so split it to two
/* Register offsets */
/* Shadow RBR (if not defined RBR will be used) */
> + unsigned int srbr;
In APIs this defined as int, I would follow (however I agree that ideally in
all of them it should be unsigned).
int srbr;
> };
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-08 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 7:40 [PATCH v2] serial: 8250_dw: Prefer SRBR in bogus RX timeout workaround if available Yicong Yang
2026-09-07 7:49 ` sashiko-bot
2026-09-08 10:25 ` Andy Shevchenko [this message]
2026-09-08 11:52 ` Yicong Yang
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=ap_ik82SVnEGkBPU@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=geshijian@picoheart.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 \
--cc=yang.yicong@picoheart.com \
--cc=yangyang.8776@picoheart.com \
--cc=yanligen@picoheart.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;
as well as URLs for NNTP newsgroup(s).