linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] serial: 8250_dw: Rework ->serial_out() LCR write retry logic
Date: Wed, 29 Jun 2022 11:47:36 +0300 (EEST)	[thread overview]
Message-ID: <29b084c-183b-4a84-2376-2c88eff7d5a@linux.intel.com> (raw)
In-Reply-To: <CAHp75Vf36sFqX1SL4Sjz6ZgNXP41Nom0Q1s6Psgv9WMFkKtGtg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

On Tue, 28 Jun 2022, Andy Shevchenko wrote:

> On Tue, Jun 28, 2022 at 3:43 PM Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> wrote:
> >
> > Currently dw8250_verify_write() (was dw8250_check_lcr()) nullifies the
> > benefit from differentiated ->serial_out() by having big if tree to
> > select correct write type.
> >
> > Rework the logic such that the LCR write can be retried within the
> > relevant ->serial_out() handler:
> >   1. Move retries counter on the caller level and pass as pointer to
> >      dw8250_verify_write()
> >   2. Make dw8250_verify_write() return bool
> >   3. Retry the write on caller level (if needed)
> 
> I'm wondering if it's possible to utilize one of iopoll.h macro here
> instead of copying retries and that not-so-obvious IO poll write.

Eh, are you suggesting I should do write as a side-effect inside one of 
the iopoll.h macros? Because those available seem to only read?

Or should I create another macro there which writes too?


-- 
 i.

  reply	other threads:[~2022-06-29  8:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 13:42 [PATCH 0/4] serial: 8250_dw: Rework ->serial_out() & LCR retry logic Ilpo Järvinen
2022-06-28 13:42 ` [PATCH 1/4] serial: 8250_dw: Use dw8250_serial_out() in dw8250_serial_out38x() Ilpo Järvinen
2022-06-28 13:42 ` [PATCH 2/4] serial: 8250_dw: Rename offset to reg_offset Ilpo Järvinen
2022-06-28 21:25   ` Andy Shevchenko
2022-06-29  7:47     ` Ilpo Järvinen
2022-06-29  9:38       ` Andy Shevchenko
2022-06-28 13:42 ` [PATCH 3/4] serial: 8250_dw: Move 16550 compatible & LCR checks to dw8250_verify_write() Ilpo Järvinen
2022-06-28 20:06   ` Andy Shevchenko
2022-06-28 13:42 ` [PATCH 4/4] serial: 8250_dw: Rework ->serial_out() LCR write retry logic Ilpo Järvinen
2022-06-28 20:11   ` Andy Shevchenko
2022-06-29  8:47     ` Ilpo Järvinen [this message]
2022-06-29  9:33       ` Andy Shevchenko
2022-06-29  9:40         ` Ilpo Järvinen
2022-06-29  9:51           ` Andy Shevchenko

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=29b084c-183b-4a84-2376-2c88eff7d5a@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --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;
as well as URLs for NNTP newsgroup(s).