Hi Wolfram, On Tue, 28 May 2019 at 14:48, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote: > > Hi Masahisa, > > > > I just noticed you have an open coded loop in synquacer_i2c_xfer() which > > > should not be needed because the I2C core does that? > > > > I'm not sure I correctly understand the meaning of "open coded loop", > > It means the driver has the same loop which is already present in the > I2C core. > > > > Your code does a HW > > > reset, though, but is it really needed for a lost arbitration? > > > > Other than handling lost arbitration, this loop also handles following errors. > > - transfer fails(expected size and actual transferred size is not matched) > > - transfer timeout > > I think it is reasonable to reset the I2C controller before xfer() retries. > > Resetting may be OK, but retrying is not correct. Retrying is only for > lost arbitration. For the above errors, we return the error without > retrying and let the upper layers decide what to do. Thank you for your reply, I understand. I will consider to update the current xfer() function. > Kind regards, > > Wolfram