diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2008-12-01 10:59:37 +0100 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2008-12-01 10:59:37 +0100 |
commit | 714df90d630e253a910741d99b28b96fbd56ed7d (patch) | |
tree | c6e5ddec176eb5ee6919c1a39260a6507168ea99 /linux/drivers/media/dvb/b2c2/flexcop-i2c.c | |
parent | fd3e91675d5c7b8c8a82af7f8e3c5d706e458791 (diff) | |
download | mediapointer-dvb-s2-714df90d630e253a910741d99b28b96fbd56ed7d.tar.gz mediapointer-dvb-s2-714df90d630e253a910741d99b28b96fbd56ed7d.tar.bz2 |
[PATCH] Cablestar 2 I2C retries (fix CableStar2 support)
From: Antti Seppälä <a.seppala+linux-dvb@gmail.com>
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ä <a.seppala@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/b2c2/flexcop-i2c.c')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-i2c.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c index 05635c453..01d27613f 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c @@ -47,9 +47,13 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c, 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; } |