linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vicente Bergas <vicencb@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	giulio.benetti@micronovasrl.com,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	heikki.krogerus@linux.intel.com,
	"Heiko Stübner" <heiko@sntech.de>,
	jirislaby@kernel.org, johan@kernel.org,
	linux-api@vger.kernel.org,
	linux-serial <linux-serial@vger.kernel.org>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v3 00/12] Add RS485 support to DW UART
Date: Mon, 25 Apr 2022 14:16:06 +0300 (EEST)	[thread overview]
Message-ID: <12b796f6-faf4-dec8-772f-6eda784af493@linux.intel.com> (raw)
In-Reply-To: <CAAMcf8DQcArMRqL-uYUt-aUT-LaETn4a7+wjqeet15cFQuy3uQ@mail.gmail.com>

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

On Sun, 24 Apr 2022, Vicente Bergas wrote:

> Hi Ilpo, thank you for your quick reply with a solution!
> 
> On Fri, Apr 22, 2022 at 3:07 PM Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> wrote:
> >
> > On Fri, 22 Apr 2022, Ilpo Järvinen wrote:
> >
> > > On Thu, 21 Apr 2022, Vicente Bergas wrote:
> > >
> > > > 1.- rs485_stop_tx is never called because there are no interrupts.
> > > > I worked around this by disabling DMA:
> > >
> > > I'll need to look into this.
> >
> > 8250 DMA tx complete path lacks calls to normal 8250 stop handling and
> > I think it probably also assumes too much from dmaengine's completion
> > callback. ...It also seems bit early to call serial8250_rpm_put_tx from
> > there(?).
> >
> > This patch allowed em485_start/stop_tx to be called in my tests:
> > [PATCH 1/1] serial: 8250: use THRE & __stop_tx also with DMA
> 
> I confirm that this patch fixes the issue when DMA is enabled.
> 
> I also confirm that your other patch
> > +                       stop_delay = p->port.frame_time + DIV_ROUND_UP(p->port.frame_time, 7);
> fixes the issue with RTS/DriverEnable deassertion time.
> I've tested it again at 19200e1 and now RTS is deasserted
> approximately at the same time as the end of the stop bit.
> Please, note the "e" for even parity bit, that extra bit after the
> data byte might have an impact on this timings.

Great, thanks again for testing.

I don't think that parity "e" makes the calculations incorrect as parity 
bit should be taken into account in tty_get_frame_size(). My guess is it's 
more about whether THRE might get asserted already during the stop bit or 
only after the stop bit has been fully sent.


-- 
 i.

      reply	other threads:[~2022-04-25 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  8:33 [PATCH v3 00/12] Add RS485 support to DW UART Ilpo Järvinen
2022-04-11  8:33 ` [PATCH v3 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode Ilpo Järvinen
2022-04-11  8:33 ` [PATCH v3 08/12] serial: General support for multipoint addresses Ilpo Järvinen
2022-04-21 15:36 ` [PATCH v3 00/12] Add RS485 support to DW UART Vicente Bergas
2022-04-21 19:38   ` Lukas Wunner
2022-04-21 20:41     ` Vicente Bergas
2022-04-22  9:25   ` Ilpo Järvinen
2022-04-22 13:07     ` Ilpo Järvinen
2022-04-23 23:57       ` Vicente Bergas
2022-04-25 11:16         ` 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=12b796f6-faf4-dec8-772f-6eda784af493@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=giulio.benetti@micronovasrl.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=heiko@sntech.de \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vicencb@gmail.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).