Hello,

I have been using the ivtv driver for a few months now, and generally it 
has been  excellent. However, I have encountered one problem: I can't 
reliably unload the ivtv module. In order to get my box to wake-on-alarm 
to record a tv show, it must be in S3 (suspend-to-ram). To get the 
system to go to S3, I have to remove the ivtv driver (as well as some 
other drivers). The friendly version 'modprobe -r ivtv' does not work; 
even with the front end and the back end shutdown, ivtv claims to be in 
use. So, I resorted to the scorched earth approach 'rmmod -f ivtv' and 
this works- most of the time. It almost always works when I have woken 
it up manually and sent it back to sleep manually. When the system wakes 
up automatically and records, it sometimes gets through the reboot 
procedure (the bios must be restarted to set the time) and then hangs. I 
can login remotely by ssh and dmesg puts out the following complaint 
(reconstructed from /var/log/kern.log):

Unable to handle kernel NULL pointer dereference at virtual address 
00000000
printing eip:
e0c293b1
*pde = 00000000
Oops: 0000 [#1]
PREEMPT SMP
Modules linked in: ehci_hcd shpchp pci_hotplug 8250_pnp pcspkr cx8800 
cx88xx ir_common ivtv bttv lirc_i2c lirc_dev wlan_wep ipv6 dvb_ttpci 
l64781 tda8083 stv0297 sp8870 ttpci_eeprom saa7146_vv saa7146 mt312 
btcx_risc cx24110 tda1004x ves1820 stv0299 ves1x93 dvb_core video_buf 
v4l2_common v4l1_compat evdev usbhid skge autofs4 af_packet snd_ice1724 
snd_ice17xx_ak4xxx snd_ak4114 snd_ak4xxx_adda snd_ac97_codec 
snd_ac97_bus snd_pcm snd_timer snd_page_alloc snd_mpu401_uart 
snd_rawmidi snd_seq_device snd soundcore tda9887 msp3400 saa7127 saa7115 
tuner tveeprom i2c_algo_bit videodev ath_pci ath_rate_sample wlan 
ath_hal via_rhine mii agpgart i2c_viapro i2c_core parport_pc parport 
8250 serial_core pcmcia firmware_class yenta_socket rsrc_nonstatic 
pcmcia_core video thermal processor fan container button battery ac rtc 
ohci1394 ieee1394 usb_storage ohci_hcd uhci_hcd usbcore a100u2w megaraid 
tmscsim tsdev
CPU: 0
EIP: 0060:[pg0+543769521/1067881472] Tainted: P VLI
EFLAGS: 00010217 (2.6.15-chw-2)
EIP is at i2c_del_adapter+0xc1/0x250 [i2c_core]
eax: db1f1bd8 ebx: 00000000 ecx: db1f19b4 edx: 00000000
esi: dfc32c44 edi: e0f5c8a8 ebp: db1f19b4 esp: d925fec8
ds: 007b es: 007b ss: 0068
Process rmmod (pid: 4537, threadinfo=d925e000 task=d9269a70)
Stack: db1f19b4 00000000 db1f0000 dfc32c44 e0f5c8a8 e0f5c8f8 e0f30bcd 
db1f19b4
db1f0000 dfc32c00 c02c5c6b dfc32c00 dfc32ccc c031d1f8 dfc32c44 dfc32c44
dfc32c84 e0f5c8a8 c031d2a6 dfc32c44 e0f5c900 e0f5c8a8 00000001 00000000
Call Trace:
[pg0+546945997/1067881472] ivtv_remove+0x1ed/0x4c0 [ivtv]
[pci_device_remove+43/48] pci_device_remove+0x2b/0x30
[__device_release_driver+104/128] __device_release_driver+0x68/0x80
[driver_detach+102/117] driver_detach+0x66/0x75
[bus_remove_driver+66/112] bus_remove_driver+0x42/0x70
[driver_unregister+11/32] driver_unregister+0xb/0x20
[pci_unregister_driver+14/32] pci_unregister_driver+0xe/0x20
[pg0+546947036/1067881472] module_cleanup+0x4c/0x50 [ivtv]
[pg0+546946960/1067881472] module_cleanup+0x0/0x50 [ivtv]
[sys_delete_module+316/384] sys_delete_module+0x13c/0x180
[syscall_call+7/11] syscall_call+0x7/0xb
Code: 93 50 ff ff ff 85 d2 0f 85 5f 01 00 00 89 c3 8b 00 0f 18 00 90 81 
fb c8 ce c2 e0 75 e2 8b 9d 24 02 00 00 8d 85 24 02 00 00 39 c3 <8b> 3b 
89 04 24 74 27 8d b3 a4 fe ff ff 8b 46 0c 56 ff 50 38 89
<6>ACPI: PCI interrupt for device 0000:00:09.0 disabled

Looking back through kern.log this is the same error I see on other 
occassions where the system has woken up automatically to record, then 
failed to go back to sleep.

I should also mention that this problem has happened intermittently in 
the past (sometimes the system would wake from S3 automatically, record 
and go back to sleep without a problem); but the last four times it has 
failed with the error above.

One other relvant piece of information: my /etc/mythtv/modules/ivtv and 
/etc/mythtv/modules/ivtv0 (called by /etc/modprobe.d/KnoppMyth) file 
looks like this:

ivtv:
alias char-major-81 videodev
alias char-major-61 lirc_i2c
#options ivtv debug=1
#options tuner type=2
options msp3400 once=1
install ivtv /sbin/modprobe tuner; /sbin/modprobe msp3400; 
/sbin/modprobe saa7115; /sbin/modprobe --ignore-install ivtv
remove ivtvt /sbin/modprobe -r ivtv --ignore-remove ivtv && 
/sbin/modprobe -r saa7115 && /sbin/modprobe -r msp3400 && /sbin/modprobe 
-r tuner

ivtv0:
alias char-major-81-0 ivtv

So, after this rather long post, my question is: does anyone know of a 
'cleaner' way to unload ivtv? It seems that it doesn't like rmmod -f; I 
have searched the fountain of all knowledge (google) but I can't find 
anything on this, I can't even determine what exactly would be using 
ivtv if the front end and backend are not up and running. Alternatively, 
if anyone out there knows how to stop ivtv from loading on boot I think 
I could make my scheme work. Any other solutions to my problem would 
also be welcome.

Thanks!
Jeremiah

Hardware:
Hauppage PVR-350
   lspci -v :
   0000:00:0a.0 Multimedia video controller: Internext Compression Inc 
iTVC15 MPEG-2 Encoder (rev 01)
   Subsystem: Hauppauge computer works Inc. WinTV PVR-350
   Flags: bus master, medium devsel, latency 64, IRQ 21
   Memory at e8000000 (32-bit, prefetchable) [size=64M]
   Capabilities: [44] Power Management version 2
Abit KV-85 mobo (Via K8M800/VT8237R)
AMD Sempron 3100+
512 MB Ram
Chaintech AV-710 Sound Card
Generic GeForce MX4000 128 MB Nvidia video card
DLink DWL-G510 Wireless PCI card
Seagate 160 GB SATA-300 hard drive

Software:
Knoppmyth R5C7
Kernel: 2.6.15-chw-2
ivtv 0.4.4

ivtv modules output at startup (from kern.log)

ivtv:  ==================== START INIT IVTV ====================
ivtv:  version 0.4.4 (tagged release) loading
ivtv:  Linux version: 2.6.15-chw-2 SMP preempt 586 gcc-3.3
ivtv:  In case of problems please include the debug info between
ivtv:  the START INIT IVTV and END INIT IVTV lines, along with
ivtv:  any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected WinTV PVR 350 card (cx23415 based)
ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 21
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
tveeprom: ivtv version
tveeprom: Hauppauge: model = 48132, rev = K268, serial# = 8602980
tveeprom: tuner = LG TAPE H001F MK3 (idx = 68, type = 47)
tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = MSP4448 (type = 1b)
tveeprom: decoder processor = SAA7115 (type = 13)
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
saa7115 1-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=saa7115, addr=21]
saa7127 1-0044: saa7129 found @ 0x88 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=saa7127, addr=44]
msp3400 1-0040: chip=MSP4448G-B3 +nicam +simple +simpler +radio 
mode=simpler
msp3400 1-0040: msp34xxg daemon started
ivtv0: i2c attach to card #0 ok [client=MSP4448G-B3, addr=40]
tda9887 1-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02050032
ivtv0: Decoder revision: 0x02020023
ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv0: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv0: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB 
total)
ivtv0: Create encoder radio stream
ivtv0: Allocate DMA decoder MPEG stream: 16 x 65536 buffers (1024KB total)
ivtv0: Allocate DMA decoder VBI stream: 512 x 2048 buffers (1024KB total)
ivtv0: Create decoder VOUT stream
ivtv0: Allocate DMA decoder YUV stream: 24 x 43200 buffers (1024KB total)
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
tuner: type set to 47 (LG NTSC (TAPE series)) by ivtv i2c driver #0
ivtv0: Initialized WinTV PVR 350, card #0
ivtv:  ====================  END INIT IVTV  ====================


_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to