Re: CA_CI_MODULE_READY not reset when CAM removed from AV7110 DVB card

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

 



Klaus Schmidinger wrote:
Oliver Endriss wrote:
Klaus Schmidinger wrote:
I'm currently improving VDR's CAM handling, and while doing so
I came across what seems to be a bug in the AV7110 driver code.

If I do

   int fd = open("/dev/dvb/adapter0/ca0", O_RDWR);
   ca_slot_info_t sinfo;
   sinfo.num = 0;
   ioctl(fd, CA_GET_SLOT_INFO, &sinfo);

to check whether the CI adapter contains a CAM, the value of
sinfo.flags is 0 as long as no CAM is inserted. When I insert a CAM,
it first goes to 1 (CA_CI_MODULE_PRESENT) and then to 3
(CA_CI_MODULE_PRESENT | CA_CI_MODULE_READY). So far everything is ok.

However, when I remove the CAM from the slot, sinfo.flags still remains
set to 3. It never goes back to 0.

Is this a bug or "intended behavior"?

Afaics it is a bug. Could you check whether CI_handle(in av7110_ca.c) is
called when you remove the CAM? If not it's a firmware bug.

CI_handle(in av7110_ca.c) never gets called.

...

Well, apparently this is a firmware problem - and, shame on me, one
I created myself...

Back in 2003 I was debugging problems with CAM access, and my findings
then were that if the CiMAX version 2.0 chip's registers were read too
often, this caused frequent failures. So I changed that to no longer
read the CiMAX registers once a CAM has been detected.

Well, looks like this is now backfiring at me.

I'll test what happens if I revert to the old version, maybe the
problem back then was something else...

Klaus

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux