The patch number 9781 was added via Patrick Boettcher <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Antti Sepp?l?  <[EMAIL PROTECTED]>
[PATCH] Cablestar 2 I2C retries (fix CableStar2 support)


At some point the Flexcop driver was changed to support newer Flexcop cards.
These modifications however broke the detection of Cablestar 2 DVB-C cards.

The reason is that the earlier version of the driver used to retry
unsuccessful i2c operations. The demodulator of Cablestar 2 cards (stv0297)
seems to be very dependent on these retries and adding them back fixes
Cablestar detection.

This patch restores this behaviour for the CableStar2.

Priority: high

Signed-off-by: Antti Sepp?l? <[EMAIL PROTECTED]>
Signed-off-by: Patrick Boettcher <[EMAIL PROTECTED]>


---

 linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c |    2 ++
 linux/drivers/media/dvb/b2c2/flexcop-i2c.c      |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff -r fca548513583 -r 4ae91a60db72 
linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
--- a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c   Mon Dec 01 10:51:14 
2008 +0100
+++ b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c   Mon Dec 01 10:59:37 
2008 +0100
@@ -628,12 +628,14 @@ int flexcop_frontend_init(struct flexcop
        }
 
        /* try the cable dvb (stv0297) */
+       fc->fc_i2c_adap[0].no_base_addr = 1;
        fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c);
        if (fc->fe != NULL) {
                fc->dev_type = FC_CABLE;
                fc->fe->ops.tuner_ops.set_params = 
alps_tdee4_stv0297_tuner_set_params;
                goto fe_found;
        }
+       fc->fc_i2c_adap[0].no_base_addr = 0;
 
        /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
        fc->fe = dvb_attach(mt312_attach,
diff -r fca548513583 -r 4ae91a60db72 linux/drivers/media/dvb/b2c2/flexcop-i2c.c
--- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c        Mon Dec 01 10:51:14 
2008 +0100
+++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c        Mon Dec 01 10:59:37 
2008 +0100
@@ -47,8 +47,12 @@ static int flexcop_i2c_read4(struct flex
        int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is 
buflen-1 */
                ret;
 
-       r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
        ret = flexcop_i2c_operation(i2c->fc, &r100);
+       if (ret != 0) {
+               deb_i2c("Retrying operation\n");
+               r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
+               ret = flexcop_i2c_operation(i2c->fc, &r100);
+       }
        if (ret != 0) {
                deb_i2c("read failed. %d\n", ret);
                return ret;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/4ae91a60db724af451561813e64c11a8d7105ccb

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to