[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Check for slave nack on all transactions

2010-09-27 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: cx23885: Check for slave nack on all transactions
Author:  Jean Delvare 
Date:Sun Jul 18 16:52:05 2010 -0300

Don't just check for nacks on zero-length transactions. Check on
other transactions too.

Signed-off-by: Jean Delvare 
Signed-off-by: Andy Walls 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/video/cx23885/cx23885-i2c.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=44835f197bf1e3f57464f23dfb239fef06cf89be

diff --git a/drivers/media/video/cx23885/cx23885-i2c.c 
b/drivers/media/video/cx23885/cx23885-i2c.c
index 154c914..afb8d6f 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -125,6 +125,10 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
goto err;
if (retval == 0)
goto eio;
+   if (!i2c_slave_did_ack(i2c_adap)) {
+   retval = -ENXIO;
+   goto err;
+   }
if (i2c_debug) {
printk(" addr << 1, msg->buf[0]);
if (!(ctrl & I2C_NOSTOP))
@@ -214,6 +218,10 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
goto err;
if (retval == 0)
goto eio;
+   if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) {
+   retval = -ENXIO;
+   goto err;
+   }
msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff;
if (i2c_debug) {
dprintk(1, " %02x", msg->buf[cnt]);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: Check for slave nack on all transactions

2010-08-05 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: cx23885: Check for slave nack on all transactions
Author:  Jean Delvare 
Date:Sun Jul 18 16:52:05 2010 -0300

Don't just check for nacks on zero-length transactions. Check on
other transactions too.

Signed-off-by: Jean Delvare 
Signed-off-by: Andy Walls 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/video/cx23885/cx23885-i2c.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=84f382bbbee8fbd4b1469c489ba06b906816bc9b

diff --git a/drivers/media/video/cx23885/cx23885-i2c.c 
b/drivers/media/video/cx23885/cx23885-i2c.c
index 154c914..afb8d6f 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -125,6 +125,10 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
goto err;
if (retval == 0)
goto eio;
+   if (!i2c_slave_did_ack(i2c_adap)) {
+   retval = -ENXIO;
+   goto err;
+   }
if (i2c_debug) {
printk(" addr << 1, msg->buf[0]);
if (!(ctrl & I2C_NOSTOP))
@@ -214,6 +218,10 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
goto err;
if (retval == 0)
goto eio;
+   if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) {
+   retval = -ENXIO;
+   goto err;
+   }
msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff;
if (i2c_debug) {
dprintk(1, " %02x", msg->buf[cnt]);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits