[PATCH] dvb: frontend: cx24110: DiSEqC fix

This change “[PATCH] dvb: frontend: cx24110: DiSEqC fix” (commit d897275) in Linux kernel is authored by Johannes Stezenbach <js [at] linuxtv.org> on Fri Sep 9 13:02:34 2005 -0700.

Description of "[PATCH] dvb: frontend: cx24110: DiSEqC fix"

The change “[PATCH] dvb: frontend: cx24110: DiSEqC fix” introduces changes as follows.

[PATCH] dvb: frontend: cx24110: DiSEqC fix

Fix DiSEqC switching (one bug fix suggested by Peter Hettkamp, and one
experimentally determined msleep(30) suggested by Adam Szalkowski).

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Linux kernel releases containing commit d897275

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "[PATCH] dvb: frontend: cx24110: DiSEqC fix"

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/media/dvb/frontends/cx24110.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c
index 555d472e42de..71b54094bda8 100644
--- a/drivers/media/dvb/frontends/cx24110.c
+++ b/drivers/media/dvb/frontends/cx24110.c
@@ -398,7 +398,7 @@ static int cx24110_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t
 		return -EINVAL;
 
 	rv = cx24110_readreg(state, 0x77);
-	cx24110_writereg(state, 0x77, rv|0x04);
+	cx24110_writereg(state, 0x77, rv | 0x04);
 
 	rv = cx24110_readreg(state, 0x76);
 	cx24110_writereg(state, 0x76, ((rv & 0x90) | 0x40 | bit));
@@ -418,7 +418,8 @@ static int cx24110_send_diseqc_msg(struct dvb_frontend* fe,
 		cx24110_writereg(state, 0x79 + i, cmd->msg[i]);
 
 	rv = cx24110_readreg(state, 0x77);
-	cx24110_writereg(state, 0x77, rv|0x04);
+	cx24110_writereg(state, 0x77, rv & ~0x04);
+	msleep(30); /* reportedly fixes switching problems */
 
 	rv = cx24110_readreg(state, 0x76);
 

The commit for this change in Linux stable tree is d897275 (patch).

Last modified: 2020/02/11