Re: [PATCH v3] i2c: davinci: Fix race when setting up for TX

2010-09-20 Thread Troy Kisky
>> On 9/17/2010 6:09 AM, Sudhakar Rajashekhara wrote: >>> I remember I had some issues on OMAP-L138 with this fix, that's when >>> I reverted to configuring ICMDR before writing to DXR (Please see >>> here: https://patchwork.kernel.org/patch/75262/). I checked the BIOS >>> I2C driver code for OMAP-

RE: [PATCH v3] i2c: davinci: Fix race when setting up for TX

2010-09-19 Thread Jon Povey
Troy Kisky wrote: > On 9/17/2010 6:09 AM, Sudhakar Rajashekhara wrote: >> Hi, Seems I didn't get Sudhakar's email.. I wonder why? >> On Fri, Sep 17, 2010 at 08:32:11, Jon Povey wrote: >>> Move the MDR load after DXR,IMR loads to avoid this race without >>> locking. >> >> I remember I had some iss

Re: [PATCH v3] i2c: davinci: Fix race when setting up for TX

2010-09-17 Thread Troy Kisky
On 9/17/2010 6:09 AM, Sudhakar Rajashekhara wrote: > Hi, > > On Fri, Sep 17, 2010 at 08:32:11, Jon Povey wrote: >> 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

[PATCH v3] i2c: davinci: Fix race when setting up for TX

2010-09-16 Thread Jon Povey
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 is loaded. IMR trickery doesn't work because if we start sen