Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400724 > unrolled thread

Re: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling

Started byWolfram Sang <wsa@the-dreams.de>
First post2016-05-13 13:50 +0200
Last post2016-05-16 08:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling Wolfram Sang <wsa@the-dreams.de> - 2016-05-13 13:50 +0200
    Re: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling Wolfram Sang <wsa@the-dreams.de> - 2016-05-13 14:00 +0200
      RE: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling "Sricharan" <sricharan@codeaurora.org> - 2016-05-16 08:00 +0200

#1400724 — Re: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling

FromWolfram Sang <wsa@the-dreams.de>
Date2016-05-13 13:50 +0200
SubjectRe: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling
Message-ID<ryjLs-2sD-15@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 06, 2016 at 05:01:14PM +0530, Sricharan R wrote:
> Among the bus errors reported from the QUP_MASTER_STATUS register
> only NACK is considered and transfer gets suspended, while
> other errors are ignored. Correct this and suspend the transfer
> for other errors as well. This avoids unnessecary 'timeouts' which
> happens when waiting for events that would never happen when there
> is already an error condition on the bus.
> 
> Signed-off-by: Sricharan R <sricharan@codeaurora.org>
> Reviewed-by: Andy Gross <andy.gross@linaro.org>

Please check Documentation/i2c/fault-codes for proper fault codes.

[toc] | [next] | [standalone]


#1400727

FromWolfram Sang <wsa@the-dreams.de>
Date2016-05-13 14:00 +0200
Message-ID<ryjV7-2yY-13@gated-at.bofh.it>
In reply to#1400724

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 13, 2016 at 01:48:23PM +0200, Wolfram Sang wrote:
> On Fri, May 06, 2016 at 05:01:14PM +0530, Sricharan R wrote:
> > Among the bus errors reported from the QUP_MASTER_STATUS register
> > only NACK is considered and transfer gets suspended, while
> > other errors are ignored. Correct this and suspend the transfer
> > for other errors as well. This avoids unnessecary 'timeouts' which
> > happens when waiting for events that would never happen when there
> > is already an error condition on the bus.
> > 
> > Signed-off-by: Sricharan R <sricharan@codeaurora.org>
> > Reviewed-by: Andy Gross <andy.gross@linaro.org>
> 
> Please check Documentation/i2c/fault-codes for proper fault codes.

And while we are here: NACK is not an error but a valid response. Can
you remove the dev_err related to that? Otherwise tools like i2cdetect
will probably flood your log.

[toc] | [prev] | [next] | [standalone]


#1401321

From"Sricharan" <sricharan@codeaurora.org>
Date2016-05-16 08:00 +0200
Message-ID<rzjJn-2Xk-1@gated-at.bofh.it>
In reply to#1400727
Hi,
> > > Among the bus errors reported from the QUP_MASTER_STATUS register
> > > only NACK is considered and transfer gets suspended, while other
> > > errors are ignored. Correct this and suspend the transfer for other
> > > errors as well. This avoids unnessecary 'timeouts' which happens
> > > when waiting for events that would never happen when there is
> > > already an error condition on the bus.
> > >
> > > Signed-off-by: Sricharan R <sricharan@codeaurora.org>
> > > Reviewed-by: Andy Gross <andy.gross@linaro.org>
> >
> > Please check Documentation/i2c/fault-codes for proper fault codes.
> 
    Ok, Thanks for pointing this out. So, for NACK I think it is more
appropriate to
    return -ENXIO and -EIO for other errors. Will correct this.

> And while we are here: NACK is not an error but a valid response. Can you
> remove the dev_err related to that? Otherwise tools like i2cdetect will
> probably flood your log.
  Ok, will correct this.

Regards,
 Sricharan         

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web