lkml.org 
[lkml]   [2021]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11] i2c: virtio: add a virtio i2c frontend driver
On Fri, Jul 02, 2021 at 12:51:27PM +0530, Viresh Kumar wrote:
> On 02-07-21, 15:15, Jie Deng wrote:
> > Then what is the need to design this interface as "return the number of
> > messages successfully
> > processed, or a negative value on error". Just return success or fail is
> > enough.

Let me quote a comment from the I2C core which is there since 2008:

/* REVISIT the fault reporting model here is weak:
*
* - When we get an error after receiving N bytes from a slave,
* there is no way to report "N".
*
* - When we get a NAK after transmitting N bytes to a slave,
* there is no way to report "N" ... or to let the master
* continue executing the rest of this combined message, if
* that's the appropriate response.
*
* - When for example "num" is two and we successfully complete
* the first message but get an error part way through the
* second, it's unclear whether that should be reported as
* one (discarding status on the second message) or errno
* (discarding status on the first one).
*/

> for 5.14-rc1/2.. So it would be better if you resend the next version as soon as
> possible :)

I won't be around for the next two weeks after today.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-07-02 09:37    [W:0.040 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site