[PATCH 2/7] V4L/DVB (4785): Budget-ci: Change DEBIADDR_IR to a safer default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Härdeman <[email protected]>

The IR chip has no address decoding, so the IR data is always present in 
the high byte when doing a read from the saa7146 chip. This means that 
the DEBI address used is irrelevant to the IR decoding logic.
DEBI addresses 0x1XXX are mapped to the registers on the CI module 
itself, but only the lowest two bits are actually used (see EN50221, 
section A.2.2.1), meaning that 0x1234 is equivalent to 0x1000 which maps 
to register 0 (the data register). A read from the data register is 
supposed to be preceded by a read from the size register, so some CI 
modules will be confused (the AlphaCrypt CAM will hang completely).
The attached patch changes the address used when reading the IR data to 
use 0x4000 instead. This is the CI version address, which is a safer 
default, works with the AlphaCrypt CAM and matches the behaviour of the 
Windows driver (AFAIK).

Signed-off-by: David Härdeman <[email protected]>
Signed-off-by: Oliver Endriss <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---

 drivers/media/dvb/ttpci/budget-ci.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 2a2e9b4..ac0cecb 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -46,7 +46,14 @@ #include "lnbp21.h"
 #include "bsbe1.h"
 #include "bsru6.h"
 
-#define DEBIADDR_IR		0x1234
+/*
+ * Regarding DEBIADDR_IR:
+ * Some CI modules hang if random addresses are read.
+ * Using address 0x4000 for the IR read means that we
+ * use the same address as for CI version, which should
+ * be a safe default.
+ */
+#define DEBIADDR_IR		0x4000
 #define DEBIADDR_CICONTROL	0x0000
 #define DEBIADDR_CIVERSION	0x4000
 #define DEBIADDR_IO		0x1000

-
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]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux