Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Subject: Re: [PATCH 1/2] i2c: rcar: fix concurrency issue related to ICDMAER
Date: Mon, 4 Mar 2019 23:27:49 +0100	[thread overview]
Message-ID: <20190304222749.srrttj3hnsyf2cot@ninjato> (raw)
In-Reply-To: <20190303150314.6528-2-wsa+renesas@sang-engineering.com>

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


> Reproduction test:
> 1. Add udelay(1) after disabling ICDMAER. (It is expected to
> generate an interrupt of rcar_i2c_irq())
> 
>     void rcar_i2c_dma_unmap(struct rcar_i2c_priv *priv)
>     {
>         ...
>         rcar_i2c_write(priv, ICDMAER, 0);
>         udelay(1);                        <-- Add this line

For the record (and self-documentation): I needed to increase the delay
and was using usleep_range(500, 800) in the end.

>         ...
>         priv->dma_direction = DMA_NONE;
>     }
> 
> 2. Execute DMA transfer.
> Performs DMA transfer of read or write. In the sample, write was used.
> 
>  $ i2cset -y -f 4 0x6a 0x01 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 i

And I used this command instead to make sure another message is waiting:

$ i2ctransfer -y 4 w9@0x6a 1 1+ r16

Yet, in general, I could reproduce that this patch fixes the issue, so
all is fine, I think.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-03-04 22:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 15:03 [PATCH 0/2] i2c: rcar: improve concurrency Wolfram Sang
2019-03-03 15:03 ` [PATCH 1/2] i2c: rcar: fix concurrency issue related to ICDMAER Wolfram Sang
2019-03-04 22:27   ` Wolfram Sang [this message]
2019-03-06 12:59   ` Simon Horman
2019-03-09 10:10   ` Wolfram Sang
2019-03-03 15:03 ` [PATCH 2/2] i2c: rcar: explain the lockless design Wolfram Sang
2019-03-06 12:59   ` Simon Horman
2019-03-09 10:11   ` Wolfram Sang

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=20190304222749.srrttj3hnsyf2cot@ninjato \
    --to=wsa@the-dreams.de \
    --cc=hiromitsu.yamasaki.ym@renesas.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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