lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/4] i2c: imx: Fix race condition in dma read
Date
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:

> On Wed, May 23, 2018 at 11:56:21AM +0200, Esben Haabendal wrote:
>> From: Esben Haabendal <eha@deif.com>
>>
>> This fixes a race condition, where the DMAEN bit ends up being set after
>> I2C slave has transmitted a byte following the dummy read. When that
>> happens, an interrupt is generated instead, and no DMA request is generated
>> to kickstart the DMA read, and a timeout happens after DMA_TIMEOUT (1 sec).
>>
>> Fixed by setting the DMAEN bit before the dummy read.
>
> Does this fix the problem or just narrow the race window?

It should fix the problem.

/Esben

\
 
 \ /
  Last update: 2018-07-09 11:23    [W:0.049 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site