dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugeniu Rosca <roscaeugeniu@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Vinod Koul <vkoul@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	dmaengine@vger.kernel.org,
	"George G . Davis" <george_davis@mentor.com>,
	Eugeniu Rosca <erosca@de.adit-jv.com>,
	Eugeniu Rosca <roscaeugeniu@gmail.com>
Subject: Re: [PATCH 0/2] serial: sh-sci: Fix .flush_buffer() issues
Date: Wed, 26 Jun 2019 19:34:34 +0200	[thread overview]
Message-ID: <20190626173434.GA24702@x230> (raw)
In-Reply-To: <20190624123540.20629-1-geert+renesas@glider.be>

Hi Geert, CC: George

On Mon, Jun 24, 2019 at 02:35:38PM +0200, Geert Uytterhoeven wrote:
> Hi Greg, Jiri,
> 
> This patch series attempts to fix the issues Eugeniu Rosca reported
> seeing, where .flush_buffer() interfered with transmit DMA operation[*].
> 
> There's a third patch "dmaengine: rcar-dmac: Reject zero-length slave
> DMA requests", which is related to the issue, but further independent,
> hence submitted separately.
> 
> Eugeniu: does this fix the issues you were seeing?

Many thanks for both sh-sci and the rcar-dmac patches.
The fixes are very much appreciated.

> Geert Uytterhoeven (2):
>   serial: sh-sci: Fix TX DMA buffer flushing and workqueue races
>   serial: sh-sci: Terminate TX DMA during buffer flushing
> 
>  drivers/tty/serial/sh-sci.c | 33 ++++++++++++++++++++++++---------
>  1 file changed, 24 insertions(+), 9 deletions(-)

I reserved some time to get a feeling about how the patches behave on
a real system (H3-ES2.0-ULCB-KF-M06), so here come my observations.

First of all, the issue I have originally reported in [0] is only
reproducible in absence of [4]. So, one of my questions would be how
do you yourself see the relationship between [1-3] and [4]?

That said, all my testing assumes:
 - Vanilla tip v5.2-rc6-15-g249155c20f9b with [4] reverted.
 - DEBUG is undefined in {sh-sci.c,rcar-dmac.c}, since I've noticed
   new issues arising in the debug build, which are unrelated to [0].

Below is the summary of my findings:

 Version         IS [0]       Is console       Error message when
(vanilla+X)    reproduced?  usable after [0]   [0] is reproduced
                             is reproduced?
 ------------------------------------------------------------
 -[4]             Yes           No                [5]
 -[4]+[1]         Yes           No                -
 -[4]+[2]         Yes           Yes               [5]
 -[4]+[3]         Yes           Yes               [6]
 -[4]+[1]+[2]     No            -                 -
 -[4]+[1]+[2]+[3] No            -                 -
 pure vanilla     No            -                 -

This looks a little too verbose, but I thought it might be interesting.

The story which I see is that [1] does not fix [0] alone, but it seems
to depend on [2]. Furthermore, if cherry picked alone, [1] makes the
matters somewhat worse in the sense that it hides the error [5].

My only question is whether [1-3] are supposed to replace [4] or they
are supposed to happily coexist. Since I don't see [0] being reproduced
with [1-3], I personally prefer to re-enable DMA on SCIF (when the
latter is used as console) so that more features and code paths are
exercised to increase test coverage.

[0] https://lore.kernel.org/lkml/20190504004258.23574-3-erosca@de.adit-jv.com/
[1] https://patchwork.kernel.org/patch/11012983/
    ("serial: sh-sci: Fix TX DMA buffer flushing and workqueue races")
[2] https://patchwork.kernel.org/patch/11012987/
    ("serial: sh-sci: Terminate TX DMA during buffer flushing")
[3] https://patchwork.kernel.org/patch/11012991/
    ("dmaengine: rcar-dmac: Reject zero-length slave DMA requests")
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=099506cbbc79c0
    ("serial: sh-sci: disable DMA for uart_console")

[5] rcar-dmac e7300000.dma-controller: Channel Address Error
[6] rcar-dmac e7300000.dma-controller: rcar_dmac_prep_slave_sg: bad parameter: len=1, id=19
    sh-sci e6e88000.serial: Failed preparing Tx DMA descriptor

Thanks!

-- 
Best regards,
Eugeniu.

  parent reply	other threads:[~2019-06-26 17:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 12:35 [PATCH 0/2] serial: sh-sci: Fix .flush_buffer() issues Geert Uytterhoeven
2019-06-24 12:35 ` [PATCH 1/2] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races Geert Uytterhoeven
2019-06-28 12:53   ` Eugeniu Rosca
2019-06-24 12:35 ` [PATCH 2/2] serial: sh-sci: Terminate TX DMA during buffer flushing Geert Uytterhoeven
2019-06-28 14:04   ` Eugeniu Rosca
2019-06-26 17:34 ` Eugeniu Rosca [this message]
2019-06-28 11:51   ` [PATCH 0/2] serial: sh-sci: Fix .flush_buffer() issues Geert Uytterhoeven
2019-06-28 12:39     ` Eugeniu Rosca
2019-06-28 12:55       ` Wolfram Sang
2019-06-28 13:02         ` Eugeniu Rosca
2019-06-28 13:14           ` Wolfram Sang
2019-07-03 17:30           ` Greg Kroah-Hartman
2019-07-03 18:15             ` Eugeniu Rosca
2019-07-03 18:44               ` Greg Kroah-Hartman
2019-07-03 21:08                 ` Wolfram Sang
2019-06-28 16:29     ` George G. Davis

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=20190626173434.GA24702@x230 \
    --to=roscaeugeniu@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=erosca@de.adit-jv.com \
    --cc=geert+renesas@glider.be \
    --cc=george_davis@mentor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.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).