[linux-dvb] Re: IRQ issues with Nova-S CI when using CI Module

Michael Ditum mrskensington at gmail.com
Thu Jul 14 16:10:05 CEST 2005


ok we've done a bit more investigating... we enabled cam_debug for
dvb_core and looking at the output it comes up with the error message
in the dvb_ca_en50221_read_data function which is in dvb_ca_en50221.c.

More specifically its on line 604 with the code...

down_read(&ca->slot_info[slot].sem);

As far as we can tell the read data function is being called by an
interrupt request handler (line 895 dvb_ca_en50221_frda_irq)... it
then calls down_read which tries to lock a semaphore which is already
locked and attempts to sleep until it becomes available.

Another developer here believeds that you cannot sleep in a IRQ
handler so this looks to be the reason for the error...

Does anyone have any ideas?

Here is the /var/log/messages output with cam_debug enabled...

Jul 14 15:04:46 bloodhound kernel: Valid DVB CAM detected MANID:ffff
DEVID:1 CONFIGBASE:0x1fe CONFIGOPTION:0xf
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_set_configoption
Jul 14 15:04:46 bloodhound kernel: Set configoption 0xf, read configoption 0xf
Jul 14 15:04:46 bloodhound kernel: DVB CAM validated successfully
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_link_init
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_wait_if_status
Jul 14 15:04:46 bloodhound kernel: FR/DA IRQ slot:0
Jul 14 15:04:46 bloodhound kernel: CAM supports DA IRQ
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_wait_if_status
succeeded timeout:2
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_read_data
Jul 14 15:04:46 bloodhound kernel: Received CA packet for slot 0
connection id 0x0 last_frag:0 size:0x2
Jul 14 15:04:46 bloodhound kernel: Chosen link buffer size of 128
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_wait_if_status
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_wait_if_status
succeeded timeout:0
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_write_data
Jul 14 15:04:46 bloodhound kernel: Wrote CA packet for slot 0,
connection id 0x0 last_frag:0 size:0x2
Jul 14 15:04:46 bloodhound kernel: dvb_ca adapter 0: DVB CAM detected
and initialised successfully
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_io_do_ioctl
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_io_write
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_write_data
Jul 14 15:04:46 bloodhound kernel: Wrote CA packet for slot 0,
connection id 0x1 last_frag:1 size:0x5
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_io_poll
Jul 14 15:04:46 bloodhound kernel: FR/DA IRQ slot:0
Jul 14 15:04:46 bloodhound kernel: dvb_ca_en50221_read_data
Jul 14 15:04:46 bloodhound kernel: Debug: sleeping function called
from invalid context at include/linux/rwsem.h:43
Jul 14 15:04:46 bloodhound kernel: in_atomic():1, irqs_disabled():0
Jul 14 15:04:46 bloodhound kernel:  [<c0120223>] __might_sleep+0xa3/0xc0
Jul 14 15:04:46 bloodhound kernel:  [<e09393da>]
dvb_ca_en50221_read_data+0x22a/0x460 [dvb_core]
Jul 14 15:04:46 bloodhound kernel:  [<c0158cd8>] mempool_free+0xc8/0x200
Jul 14 15:04:47 bloodhound last message repeated 2 times
Jul 14 15:04:47 bloodhound kernel:  [<c0187f6d>] bio_endio+0x5d/0xa0
Jul 14 15:04:47 bloodhound kernel:  [<c0187073>] bio_put+0x23/0x30
Jul 14 15:04:47 bloodhound kernel:  [<e088b27c>] clone_endio+0xdc/0x120 [dm_mod]
Jul 14 15:04:47 bloodhound kernel:  [<c0158cd8>] mempool_free+0xc8/0x200
Jul 14 15:04:47 bloodhound kernel:  [<c036f278>] udp_rcv+0xa8/0x390
Jul 14 15:04:47 bloodhound kernel:  [<e0845747>]
scsi_put_command+0x197/0x2f0 [scsi_mod]
Jul 14 15:04:47 bloodhound kernel:  [<c02b2f91>] as_put_request+0x41/0xf0
Jul 14 15:04:47 bloodhound kernel:  [<c02a76da>] elv_queue_empty+0x1a/0x20
Jul 14 15:04:47 bloodhound kernel:  [<c0274f77>] vt_console_print+0x67/0x2c0
Jul 14 15:04:47 bloodhound kernel:  [<e084d774>]
scsi_end_request+0x154/0x220 [scsi_mod]
Jul 14 15:04:47 bloodhound kernel:  [<c0274f10>] vt_console_print+0x0/0x2c0
Jul 14 15:04:47 bloodhound kernel:  [<c0124010>]
__call_console_drivers+0x40/0x60
Jul 14 15:04:47 bloodhound kernel:  [<c012419d>] call_console_drivers+0xdd/0x100
Jul 14 15:04:47 bloodhound kernel:  [<c0124513>] vprintk+0x203/0x410
Jul 14 15:04:47 bloodhound kernel:  [<c011d7bc>] activate_task+0x5c/0x70
Jul 14 15:04:47 bloodhound kernel:  [<c0130930>] process_timeout+0x0/0x10
Jul 14 15:04:47 bloodhound kernel:  [<e0939ac8>]
dvb_ca_en50221_frda_irq+0x98/0xe0 [dvb_core]
Jul 14 15:04:47 bloodhound kernel:  [<c012b627>] tasklet_action+0x37/0x60
Jul 14 15:04:47 bloodhound kernel:  [<c012b3a2>] __do_softirq+0x42/0xa0
Jul 14 15:04:47 bloodhound kernel:  [<c0105a81>] do_softirq+0x41/0x50
Jul 14 15:04:47 bloodhound kernel:  =======================
Jul 14 15:04:47 bloodhound kernel:  [<c010595f>] do_IRQ+0x5f/0xa0
Jul 14 15:04:47 bloodhound kernel:  [<c0103c16>] common_interrupt+0x1a/0x20
Jul 14 15:04:47 bloodhound kernel:  [<c0101195>] mwait_idle+0x25/0x50
Jul 14 15:04:47 bloodhound kernel:  [<c01010e2>] cpu_idle+0x42/0x60
Jul 14 15:04:47 bloodhound kernel:  [<c04497ca>] start_kernel+0x17a/0x1c0
Jul 14 15:04:47 bloodhound kernel:  [<c0449340>] unknown_bootoption+0x0/0x1e0
Jul 14 15:04:47 bloodhound kernel: Received CA packet for slot 0
connection id 0x1 last_frag:1 size:0x9
Jul 14 15:04:47 bloodhound kernel: dvb_ca_en50221_io_poll
Jul 14 15:04:47 bloodhound kernel: dvb_ca_en50221_io_read
Jul 14 15:04:47 bloodhound kernel: dvb_ca_en50221_io_write
Jul 14 15:04:47 bloodhound kernel: dvb_ca_en50221_write_data
Jul 14 15:04:47 bloodhound kernel: Wrote CA packet for slot 0,
connection id 0x1 last_frag:1 size:0x5
Jul 14 15:04:47 bloodhound kernel: dvb_ca_en50221_io_poll

Mike

On 7/13/05, Michael Ditum <mrskensington at gmail.com> wrote:
> I've successfully got my Nexus Card and CI module working with vlc for
> streaming encrypted channels. I've now got the budget version, the
> Nova-S CI and attempting to get that to work.
> 
> Sometimes when I start vlc it gets to a certain point and prints the
> following to /var/log/messages
> 
> Jul 13 15:43:07 bloodhound kernel: Uhhuh. NMI received. Dazed and
> confused, but trying to continue
> Jul 13 15:43:07 bloodhound kernel: You probably have a hardware
> problem with your RAM chips
> Jul 13 15:43:07 bloodhound kernel: irq 11: nobody cared!
> Jul 13 15:43:07 bloodhound kernel:  [<c014efc4>] __report_bad_irq+0x24/0x7d
> Jul 13 15:43:07 bloodhound kernel:  [<c014f0a6>] note_interrupt+0x6b/0x89
> Jul 13 15:43:07 bloodhound kernel:  [<c014e5c1>] __do_IRQ+0x180/0x2ff
> Jul 13 15:43:07 bloodhound kernel:  [<c011b6d2>] scheduler_tick+0x1a/0x4d4
> Jul 13 15:43:07 bloodhound kernel:  [<c0105928>] do_IRQ+0x69/0x85
> Jul 13 15:43:07 bloodhound kernel:  [<c0103aea>] common_interrupt+0x1a/0x20
> Jul 13 15:43:07 bloodhound kernel:  [<c014e407>] handle_IRQ_event+0x28/0x62
> Jul 13 15:43:07 bloodhound kernel:  [<c014e4ff>] __do_IRQ+0xbe/0x2ff
> Jul 13 15:43:07 bloodhound kernel:  [<c010590b>] do_IRQ+0x4c/0x85
> Jul 13 15:43:07 bloodhound kernel:  =======================
> Jul 13 15:43:07 bloodhound kernel:  [<c012c6e0>] process_timeout+0x0/0x5
> Jul 13 15:43:07 bloodhound kernel:  [<c0103aea>] common_interrupt+0x1a/0x20
> Jul 13 15:43:08 bloodhound kernel:  [<c012797c>] __do_softirq+0x2c/0x8a
> Jul 13 15:43:08 bloodhound kernel:  [<c0105a17>] do_softirq+0x39/0x40
> Jul 13 15:43:08 bloodhound kernel:  =======================
> Jul 13 15:43:08 bloodhound kernel:  [<c0105912>] do_IRQ+0x53/0x85
> Jul 13 15:43:08 bloodhound kernel:  [<c0103aea>] common_interrupt+0x1a/0x20
> Jul 13 15:43:08 bloodhound kernel:  [<c0112592>] delay_pmtmr+0xb/0x13
> Jul 13 15:43:08 bloodhound kernel:  [<c0208779>] __delay+0x9/0xa
> Jul 13 15:43:08 bloodhound kernel:  [<e08fc1cc>]
> start_ts_capture+0x14a/0x280 [budget_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e08fd475>]
> ttpci_budget_set_video_port+0xfd/0x1a8 [budget_core]
> Jul 13 15:43:08 bloodhound kernel:  [<c011bbcd>] __wake_up_common+0x35/0x55
> Jul 13 15:43:08 bloodhound kernel:  [<e091a4c8>]
> ciintf_slot_shutdown+0x2d/0x31 [budget_ci]
> Jul 13 15:43:08 bloodhound kernel:  [<e09a6d9b>]
> dvb_ca_en50221_slot_shutdown+0x5d/0xf5 [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e09a776a>]
> dvb_ca_en50221_io_do_ioctl+0x116/0x151 [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e099f5d8>]
> dvb_usercopy+0x93/0x102 [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e099f0b3>]
> dvb_device_open+0x54/0xe8 [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<c0182c51>] chrdev_open+0x14c/0x36b
> Jul 13 15:43:08 bloodhound kernel:  [<c01e9ec4>] file_alloc_security+0x29/0x7d
> Jul 13 15:43:08 bloodhound kernel:  [<c0176019>] dentry_open+0xaf/0x1a5
> Jul 13 15:43:08 bloodhound kernel:  [<e09a77a5>]
> dvb_ca_en50221_io_ioctl+0x0/0x1d [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e09a77bd>]
> dvb_ca_en50221_io_ioctl+0x18/0x1d [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<e09a7654>]
> dvb_ca_en50221_io_do_ioctl+0x0/0x151 [dvb_core]
> Jul 13 15:43:08 bloodhound kernel:  [<c018de89>] do_ioctl+0x39/0x52
> Jul 13 15:43:08 bloodhound kernel:  [<c018df97>] vfs_ioctl+0x55/0x193
> Jul 13 15:43:08 bloodhound kernel:  [<c018e134>] sys_ioctl+0x5f/0x6f
> Jul 13 15:43:08 bloodhound kernel:  [<c010392d>] syscall_call+0x7/0xb
> Jul 13 15:43:08 bloodhound kernel: handlers:
> Jul 13 15:43:08 bloodhound kernel: [<e08c70af>]
> (interrupt_hw+0x0/0x345 [saa7146])
> Jul 13 15:43:08 bloodhound kernel: [<c02c4d70>] (usb_hcd_irq+0x0/0x57)
> Jul 13 15:43:08 bloodhound kernel: [<c02c4d70>] (usb_hcd_irq+0x0/0x57)
> Jul 13 15:43:08 bloodhound kernel: Disabling IRQ #11
> Jul 13 15:43:12 bloodhound kernel: dvb_ca adaptor 0: PC card did not respond :(
> 
> and then it can't get any further... othertimes when I start it I get
> the following...
> 
> Jul 13 16:45:41 bloodhound kernel: dvb_ca adapter 0: DVB CAM detected
> and initialised successfully
> Jul 13 16:45:42 bloodhound kernel: Debug: sleeping function called
> from invalid context at include/linux/rwsem.h:43
> Jul 13 16:45:42 bloodhound kernel: in_atomic():1, irqs_disabled():0
> Jul 13 16:45:42 bloodhound kernel:  [<c011d3a4>] __might_sleep+0x9c/0xaa
> Jul 13 16:45:42 bloodhound kernel:  [<e09a6972>]
> dvb_ca_en50221_read_data+0x1bf/0x3c0 [dvb_core]
> Jul 13 16:45:42 bloodhound kernel:  [<c011bbcd>] __wake_up_common+0x35/0x55
> Jul 13 16:45:42 bloodhound kernel:  [<c02f1830>] sock_def_readable+0x59/0x5b
> Jul 13 16:45:42 bloodhound kernel:  [<c033933c>] udp_queue_rcv_skb+0x224/0x37f
> Jul 13 16:45:42 bloodhound kernel:  [<c0326625>] tcp_ack+0xc7/0x597
> Jul 13 16:45:42 bloodhound kernel:  [<c03396c0>]
> udp_v4_mcast_deliver+0x229/0x2bb
> Jul 13 16:45:42 bloodhound kernel:  [<c03398a2>] udp_rcv+0xa8/0x3a4
> Jul 13 16:45:42 bloodhound kernel:  [<c0103aea>] common_interrupt+0x1a/0x20
> Jul 13 16:45:42 bloodhound kernel:  [<c0317187>] ip_local_deliver+0x93/0x240
> Jul 13 16:45:42 bloodhound kernel:  [<c03177ca>] ip_rcv+0x2f5/0x4c2
> Jul 13 16:45:42 bloodhound kernel:  [<e093845c>]
> tg3_alloc_rx_skb+0x6e/0x127 [tg3]
> Jul 13 16:45:42 bloodhound kernel:  [<c011aadf>] recalc_task_prio+0x8a/0x150
> Jul 13 16:45:42 bloodhound kernel:  [<c011abfb>] activate_task+0x56/0x65
> Jul 13 16:45:42 bloodhound kernel:  [<e09356ae>]
> tg3_restart_ints+0x16/0x76 [tg3]
> Jul 13 16:45:42 bloodhound kernel:  [<c012c6e0>] process_timeout+0x0/0x5
> Jul 13 16:45:42 bloodhound kernel:  [<e09a6f70>]
> dvb_ca_en50221_frda_irq+0x7f/0xb6 [dvb_core]
> Jul 13 16:45:42 bloodhound kernel:  [<c0127bcc>] tasklet_action+0x3a/0x58
> Jul 13 16:45:42 bloodhound kernel:  [<c012798e>] __do_softirq+0x3e/0x8a
> Jul 13 16:45:42 bloodhound kernel:  [<c0105a17>] do_softirq+0x39/0x40
> 
> This is then continuously repeated (or messages very similar) but the
> program actually manages to start showing the encrypted channels. It
> just prints this to /var/log/messages at the same time.
> 
> I've tried removing the CAM and Smart Card and do no get this problem
> (though obviously it doesn't show encrypted channels),
> 
> I've also tried different CAMs and get the same result. So It seems to
> be a problem with the CI I had this working with the Nexus-S card
> which had a 3.5" CI but this card one has the PCI CI.
> 
> This is using the drivers that come in 2.6.12 I found another issue
> similar to mine which had no replies here...
> 
> http://thread.gmane.org/gmane.linux.drivers.dvb/15273
> 
> Does anyone have any ideas what the cause of this is and how to stop it?
> 
> Thanks a lot for your help!
> 
> Mike
>




More information about the linux-dvb mailing list