[coreboot-gerrit] New patch to review for coreboot: 7c40267 ipq806x: i2c: stop transfer as soon as an error is reported

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Apr 20 10:59:24 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9824

-gerrit

commit 7c40267230f21410d7b5b819fd15c415d7124902
Author: Sourabh Banerjee <sbanerje at codeaurora.org>
Date:   Fri Feb 27 19:11:19 2015 +0530

    ipq806x: i2c: stop transfer as soon as an error is reported
    
    I2c transfer may consist of multiple segments (for instance write
    segment to set the register address and then a read segment to read
    the register value). Transfer should be stopped as soon as a segment
    processing error has been reported.
    
    BRANCH=master
    BUG=chrome-os-partner:35328
    TEST=transfer shall not process the read segment when the write segment fails
    
    Change-Id: I85b7b59b376ce33ba3f6d2526be86e9f6585d97b
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 50cd4d40851b3cea99183c549c47b4486a3deb4a
    Original-Change-Id: Id65f995d860dd670b289fbdd9eb0ca19a50d7007
    Original-Signed-off-by: Sourabh Banerjee <sbanerje at codeaurora.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/254494
    Original-Reviewed-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Commit-Queue: Vadim Bendebury <vbendeb at chromium.org>
---
 src/soc/qualcomm/ipq806x/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/soc/qualcomm/ipq806x/i2c.c b/src/soc/qualcomm/ipq806x/i2c.c
index 9aaa173..e121ae8 100644
--- a/src/soc/qualcomm/ipq806x/i2c.c
+++ b/src/soc/qualcomm/ipq806x/i2c.c
@@ -150,7 +150,7 @@ int platform_i2c_transfer(unsigned bus, struct i2c_seg *segments, int seg_count)
 	if (i2c_init(bus))
 		return 1;
 
-	while (seg_count--) {
+	while (!ret && seg_count--) {
 		if (seg->read)
 			ret = i2c_read(bus, seg->chip, seg->buf, seg->len);
 		else



More information about the coreboot-gerrit mailing list