From: Adam Szalkowski <[email protected]>
Fix DiSEqC problems.
Signed-off-by: Adam Szalkowski <[email protected]>
Signed-off-by: Johannes Stezenbach <[email protected]>
drivers/media/dvb/frontends/cx24110.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- linux-2.6.13-git4.orig/drivers/media/dvb/frontends/cx24110.c 2005-09-04 22:28:09.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/frontends/cx24110.c 2005-09-04 22:28:10.000000000 +0200
@@ -398,7 +398,8 @@ static int cx24110_diseqc_send_burst(str
return -EINVAL;
rv = cx24110_readreg(state, 0x77);
- cx24110_writereg(state, 0x77, rv | 0x04);
+ if (!(rv & 0x04))
+ cx24110_writereg(state, 0x77, rv | 0x04);
rv = cx24110_readreg(state, 0x76);
cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit));
@@ -418,14 +419,16 @@ static int cx24110_send_diseqc_msg(struc
cx24110_writereg(state, 0x79 + i, cmd->msg[i]);
rv = cx24110_readreg(state, 0x77);
- cx24110_writereg(state, 0x77, rv & ~0x04);
- msleep(30); /* reportedly fixes switching problems */
+ if (rv & 0x04) {
+ cx24110_writereg(state, 0x77, rv & ~0x04);
+ msleep(30); /* reportedly fixes switching problems */
+ }
rv = cx24110_readreg(state, 0x76);
cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40) | ((cmd->msg_len-3) & 3));
- for (i=500; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
- ; /* wait for LNB ready */
+ for (i=100; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
+ msleep(1); /* wait for LNB ready */
return 0;
}
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|