The patch number 11284 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:
        Linux Media Mailing List <[email protected]>

------

From: Patrick Boettcher  <[email protected]>
Fix i2c code of flexcop-driver for rare revisions


This patch adds a workaround in the i2c-code of the flexcop-driver to
fix support for SkyStar2 rev 2.7. There are not many devices out
there, that's why this bug was not revealed earlier.

Priority: high

Signed-off-by: Patrick Boettcher <[email protected]>


---

 linux/drivers/media/dvb/b2c2/flexcop-i2c.c       |   12 ++++++++++++
 linux/drivers/media/dvb/frontends/itd1000_priv.h |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff -r c770b20d15c6 -r 16bb3a4b96f6 linux/drivers/media/dvb/b2c2/flexcop-i2c.c
--- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c        Fri Feb 27 21:29:59 
2009 -0300
+++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c        Sat Feb 28 14:19:30 
2009 +0100
@@ -46,6 +46,18 @@ static int flexcop_i2c_read4(struct flex
        flexcop_ibi_value r104;
        int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is 
buflen-1 */
                ret;
+
+       /* work-around to have CableStar2 and SkyStar2 rev 2.7 work
+        * correctly:
+        *
+        * the ITD1000 is behind an i2c-gate which closes automatically
+        * after an i2c-transaction the STV0297 needs 2 consecutive reads
+        * one with no_base_addr = 0 and one with 1
+        *
+        * those two work-arounds are conflictin: we check for the card
+        * type, it is set when probing the ITD1000 */
+       if (i2c->fc->dev_type == FC_SKY_REV27)
+               r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
 
        ret = flexcop_i2c_operation(i2c->fc, &r100);
        if (ret != 0) {
diff -r c770b20d15c6 -r 16bb3a4b96f6 
linux/drivers/media/dvb/frontends/itd1000_priv.h
--- a/linux/drivers/media/dvb/frontends/itd1000_priv.h  Fri Feb 27 21:29:59 
2009 -0300
+++ b/linux/drivers/media/dvb/frontends/itd1000_priv.h  Sat Feb 28 14:19:30 
2009 +0100
@@ -31,7 +31,7 @@ struct itd1000_state {
        /* ugly workaround for flexcop's incapable i2c-controller
         * FIXME, if possible
         */
-       u8 shadow[255];
+       u8 shadow[256];
 };
 
 enum itd1000_register {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/16bb3a4b96f611328aa030b3a60b6386977149c0

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

Reply via email to