From: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
To: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Jon Povey <Jon.Povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org>
Cc: "davinci-linux-open-source@linux.davincidsp.com"
<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
"linux-i2c@vger.kernel.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v4] i2c: davinci: Fix race when setting up for TX
Date: Thu, 07 Oct 2010 10:01:53 -0700 [thread overview]
Message-ID: <87wrpu9bsu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <70E876B0EA86DD4BAF101844BC814DFE093EE3EA57-lPJtnb2sqtq44ywRPIzf9A@public.gmane.org> (Jon Povey's message of "Thu, 7 Oct 2010 09:39:31 +0100")
Jon Povey <Jon.Povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org> writes:
> Hi Ben,
>
> I am not on the i2c list but noticed this pull request:
> http://www.spinics.net/linux/lists/linux-i2c/msg04022.html
>
> I think you have the wrong (old) version of this patch in that branch,
> http://git.fluff.org/gitweb?p=bjdooks/linux.git;a=commitdiff;h=4bba0fd8d1c6d405df666e2573e1a1f917098be0
>
> The correct v4 one from the start of this thread has more lines
> of patch and this commit message:
It is also available in my davinci-i2c branch:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git davinci-i2c
Thanks Jon for catching this,
Kevin
>>>>>> When setting up to transmit, a race exists between the ISR and
>>>>>> i2c_davinci_xfer_msg() trying to load the first byte and adjust
>>>>>> counters. This is mostly visible for transmits > 1 byte long.
>>>>>>
>>>>>> The hardware starts sending immediately that MDR.STT is set. IMR
>>>>>> trickery doesn't work because if we start sending, finish the
>>>>>> first byte and an XRDY event occurs before we load IMR to unmask
>>>>>> it, we never get an interrupt, and we timeout.
>>>>>>
>>>>>> Sudhakar Rajashekhara explains that at least OMAP-L138 requires
>>>>>> MDR mode settings before DXR for correct behaviour, so load MDR
>>>>>> first with STT cleared and later load again with STT set.
>>>>>>
>>>>>> Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985
>>>>>>
>>>>>> Signed-off-by: Jon Povey <jon.povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org>
>>>>>> CC: Sudhakar Rajashekhara <sudhakar.raj-l0cyMroinI0@public.gmane.org>
>>>>>> CC: Troy Kisky <troy.kisky-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
>
> It also has some more acks and a tested, via Kevin:
>
>> Acked-by: Troy Kisky <troy.kisky-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
>> Tested-by: Sudhakar Rajashekhara <sudhakar.raj-l0cyMroinI0@public.gmane.org>
>> Acked-by: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>
>
> --
> Jon Povey
> jon.povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org
>
> Racelogic is a limited company registered in England. Registered number 2743719 .
> Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .
>
> The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network
next prev parent reply other threads:[~2010-10-07 17:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 2:46 [PATCH v2] i2c: davinci: Fix race when setting up for TX Jon Povey
[not found] ` <1284691607-9697-1-git-send-email-jon.povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org>
2010-09-17 3:02 ` [PATCH v3] " Jon Povey
[not found] ` <1284692531-10100-1-git-send-email-jon.povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org>
2010-09-17 13:09 ` Sudhakar Rajashekhara
[not found] ` <001201cb5669$a0200940$e0601bc0$@raj@ti.com>
[not found] ` <001201cb5669$a0200940$e0601bc0$@raj-l0cyMroinI0@public.gmane.org>
2010-09-17 19:15 ` Troy Kisky
[not found] ` <4C93BE5B.6090701-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2010-09-20 4:40 ` Jon Povey
[not found] ` <70E876B0EA86DD4BAF101844BC814DFE093ED5F50E-lPJtnb2sqtq44ywRPIzf9A@public.gmane.org>
2010-09-20 21:14 ` Troy Kisky
[not found] ` <4C97CEC9.8060602-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2010-09-21 4:13 ` [PATCH v4] " Jon Povey
[not found] ` <026901cb597f$86fa9980$94efcc80$@raj@ti.com>
[not found] ` <026901cb597f$86fa9980$94efcc80$@raj-l0cyMroinI0@public.gmane.org>
2010-09-21 19:17 ` Troy Kisky
[not found] ` <4C9904E6.7070608-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2010-09-22 0:09 ` Ben Dooks
[not found] ` <20100922000916.GH7494-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-09-22 10:50 ` Sudhakar Rajashekhara
2010-09-30 13:10 ` Kevin Hilman
[not found] ` <87wrq3l6m0.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2010-10-07 8:39 ` Jon Povey
[not found] ` <70E876B0EA86DD4BAF101844BC814DFE093EE3EA57-lPJtnb2sqtq44ywRPIzf9A@public.gmane.org>
2010-10-07 17:01 ` Kevin Hilman [this message]
[not found] ` <87wrpu9bsu.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2010-10-07 17:20 ` Kevin Hilman
[not found] ` <87hbgxapig.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2010-10-12 4:48 ` Jon Povey
2010-09-23 14:27 ` Kevin Hilman
[not found] ` <87d3s47cx1.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2010-09-23 20:27 ` Troy Kisky
[not found] ` <1285042408-13200-1-git-send-email-jon.povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org>
2010-09-21 11:24 ` Sudhakar Rajashekhara
2010-09-24 4:42 ` Sudhakar Rajashekhara
[not found] ` <022501cb5ba2$d801d760$88058620$@raj@ti.com>
[not found] ` <022501cb5ba2$d801d760$88058620$@raj-l0cyMroinI0@public.gmane.org>
2010-09-24 14:37 ` Kevin Hilman
[not found] ` <87sk0zky28.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2010-09-24 16:37 ` Ben Dooks
[not found] ` <20100924163754.GH27885-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-09-27 14:16 ` Kevin Hilman
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=87wrpu9bsu.fsf@deeprootsystems.com \
--to=khilman-1d3hcaltpluheniveurvkkeocmrvltnr@public.gmane.org \
--cc=Jon.Povey-Ean/AyPsLtfkYMGBc/C6ZA@public.gmane.org \
--cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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