[i2c] [patch 2.6.25-git] i2c_adapters: return -Errno not -1

David Brownell david-b at pacbell.net
Sun May 11 19:13:25 CEST 2008


On Saturday 10 May 2008, you wrote:
> >  
> >  static int ali1563_block_start(struct i2c_adapter * a)
> > @@ -170,7 +170,7 @@ static int ali1563_block_start(struct i2
> >               data & HST_STS_BUSERR ? "No response or Bus Collision " : "",
> >               data & HST_STS_DEVERR ? "Device Error " : "",
> >               !(data & HST_STS_DONE) ? "Transaction Never Finished " : "");
> > -     return -1;
> > +     return -EIO;
> >  }
> 
> And same here. That's a little more work, admittedly.

Returning ENXIO for BUSERR/no-response doesn't follow your
heuristic of trusting the logspam-eliminators ... plus, it's
not clear that's not a different failure mode on that path.

NVidia seems to not have ALI 1563 specs on line (sigh) so
for now I'll just stick to your heuristic.
 
I did make the "timeout" fault unique there, since that
fault was clearly distinguishable.




More information about the i2c mailing list