Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77321
b: refs/heads/master
c: bf3e2d1
h: refs/heads/master
i:
  77319: 0a50e12
v: v3
  • Loading branch information
David Brownell authored and Jean Delvare committed Jan 27, 2008
1 parent ab3bdc5 commit 1920520
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf978ab2846d86709802f38c80d1d53da364bf51
refs/heads/master: bf3e2d1d9b860591f3f204aa66d6a3c30058818d
24 changes: 20 additions & 4 deletions trunk/drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,26 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
count--;
temp++;
wrcount++;
} else { /* arbitration or no acknowledge */
dev_err(&i2c_adap->dev, "sendbytes: error - bailout.\n");
return (retval<0)? retval : -EFAULT;
/* got a better one ?? */

/* A slave NAKing the master means the slave didn't like
* something about the data it saw. For example, maybe
* the SMBus PEC was wrong.
*/
} else if (retval == 0) {
dev_err(&i2c_adap->dev, "sendbytes: NAK bailout.\n");
return -EIO;

/* Timeout; or (someday) lost arbitration
*
* FIXME Lost ARB implies retrying the transaction from
* the first message, after the "winning" master issues
* its STOP. As a rule, upper layer code has no reason
* to know or care about this ... it is *NOT* an error.
*/
} else {
dev_err(&i2c_adap->dev, "sendbytes: error %d\n",
retval);
return retval;
}
}
return wrcount;
Expand Down

0 comments on commit 1920520

Please sign in to comment.