From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Marek Vasut" <marex-ynQEQJNshbs@public.gmane.org>,
"Ben Dooks (embedded platforms)"
<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
"Uwe Kleine-König"
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Subject: Re: [PATCH v2 1/2] i2c: mxs: remove races in PIO code
Date: Mon, 15 Apr 2013 18:30:54 +0200 [thread overview]
Message-ID: <20130415163054.GC6286@the-dreams.de> (raw)
In-Reply-To: <1366021015-5936-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
On Mon, Apr 15, 2013 at 12:16:54PM +0200, Lucas Stach wrote:
> This commit fixes the three following races in PIO code:
>
> - The CTRL0 register is racy in itself, when programming transfer state and
> run bit in the same cycle the hardware sometimes ends up using the state
> from the last transfer. Fix this by programming state in one cycle, make
> sure the write is flushed down APBX bus by reading back the reg and only
> then trigger the run bit.
>
> - Only clear the DMAREQ bit in DEBUG0 after the read/write to the data reg
> happened. Otherwise we are racing with the hardware about who touches
> the data reg first.
>
> - When checking for completion of a transfer it's not sufficient to check
> if the data engine finished, but also a check for i2c bus idle is needed.
> In PIO mode we are really fast to program the next transfer after a finished
> one, so the controller possibly tries to start a new transfer while the
> clkgen engine is still busy writing the NAK/STOP from the last transfer to
> the bus.
>
> Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Applied to for-next, thanks! Both.
I'd prefer to not use reply-to <old_series> when sending <new_series>.
prev parent reply other threads:[~2013-04-15 16:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 11:49 [PATCH 1/3] i2c: mxs: always end a transfer with a proper STOP Lucas Stach
[not found] ` <1363261750-26645-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-03-14 11:49 ` [PATCH 2/3] i2c: mxs: remove races in PIO code Lucas Stach
[not found] ` <1363261750-26645-2-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-04-01 22:58 ` Marek Vasut
2013-03-14 11:49 ` [PATCH 3/3] i2c: mxs: do error checking and handling in PIO mode Lucas Stach
[not found] ` <1363261750-26645-3-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-04-01 22:59 ` Marek Vasut
[not found] ` <201304020059.22550.marex-ynQEQJNshbs@public.gmane.org>
2013-04-08 17:19 ` Wolfram Sang
[not found] ` <20130408171933.GA6865-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-04-08 17:23 ` Marek Vasut
2013-04-08 17:21 ` [PATCH 1/3] i2c: mxs: always end a transfer with a proper STOP Wolfram Sang
[not found] ` <20130408172147.GB6865-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-04-09 7:26 ` Lucas Stach
[not found] ` <1365492362.4131.9.camel-WzVe3FnzCwFR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2013-04-09 8:32 ` Wolfram Sang
[not found] ` <20130409083252.GA3624-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-04-15 7:50 ` Lucas Stach
2013-04-15 10:16 ` [PATCH v2 1/2] i2c: mxs: remove races in PIO code Lucas Stach
[not found] ` <1366021015-5936-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-04-15 10:16 ` [PATCH v2 2/2] i2c: mxs: do error checking and handling in PIO mode Lucas Stach
2013-04-15 16:30 ` Wolfram Sang [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=20130415163054.GC6286@the-dreams.de \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).