lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Sluggish AT91 I2C driver causes SMBus timeouts
From
Date
On 2017-10-13 15:29, Alan Cox wrote:
> On Thu, 12 Oct 2017 13:35:17 +0200
> Peter Rosin <peda@axentia.se> wrote:
>
>> Hi!
>>
>> I have encountered an "interesting" bug. It silently corrupts data
>> and is generally nasty...
>>
>> On an I2C bus, driven by the at91 driver and DMA (an Atmel
>> sama5d31 chip), I have an 256 byte eeprom (NXP SE97BTP). I'm using
>> Linux v4.13.
>
> If your force the transfer to PIO does it behave ? Does the controller in
> fact need to siwtch to PIO for SMBUS ?

Like, what if I disable DMA?

I saw no way to do that, short of short-cutting a few things in the
driver code. So, did that and I cannot tickle the bug. But I don't
know if that makes me safe?

Ludovic, any reason to believe disabling DMA will prevent these
stalls, or will they just appear under different circumstances?

I used this dirty "patch" to i2c-at91.c:at91_twi_configure_dma() for
testing:

- dev->use_dma = true;
+ //dev->use_dma = true;

Cheers,
Peter

\
 
 \ /
  Last update: 2017-10-13 17:01    [W:0.273 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site