From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] serial: dz: Replace DZ_XMIT_SIZE with UART_XMIT_SIZE
Date: Thu, 25 Aug 2022 15:03:51 +0300 (EEST) [thread overview]
Message-ID: <89359013-85fe-76e1-a425-fabdfa3572f9@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2208251219120.26998@angie.orcam.me.uk>
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
On Thu, 25 Aug 2022, Maciej W. Rozycki wrote:
> On Thu, 25 Aug 2022, Ilpo Järvinen wrote:
>
> > Use the normal UART_XMIT_SIZE directly.
>
> I gather this is to fix a potential inconsistency with the size of the
> buffer allocated by the serial core (though in reality this driver will
> only be used with 4KiB-page systems), right? If so, then please state it
> in the change description.
No idea, but I guess it has to be true because nobody has complained about
the missing characters such an inconsistency would cause. It could
seemingly also cause infinite bogus tx as tail cannot never reach head
when head is about 4k (uart_circ_empty & uart_circ_chars_pending would
return bogus values).
> Also I'd rather:
>
> #define DZ_WAKEUP_CHARS UART_XMIT_SIZE
>
> and there's no need to include <linux/serial_core.h> in dz.h as the driver
> itself already does that (and dz.h is an auxiliary private header).
>
> Thanks for your submission.
I have started to becomes more inclined into the direction of dropping
DZ_WAKEUP_CHARS entirely and use WAKEUP_CHARS like most of the drivers do
after staring now at WAKEUP_CHARS & uart_write_wakeup() lines just now.
There is just a handful of exceptions, rest of the drivers all use 256 as
WAKEUP_CHARS. dz uses 1024 (4k/4) and rest of the exceptions use
uart_circ_empty() but I suspect they should also be just converted to
use WAKEUP_CHARS.
--
i.
next prev parent reply other threads:[~2022-08-25 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 9:19 [PATCH 1/1] serial: dz: Replace DZ_XMIT_SIZE with UART_XMIT_SIZE Ilpo Järvinen
2022-08-25 11:47 ` Maciej W. Rozycki
2022-08-25 12:03 ` Ilpo Järvinen [this message]
2022-08-25 14:33 ` Maciej W. Rozycki
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=89359013-85fe-76e1-a425-fabdfa3572f9@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@orcam.me.uk \
/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