Starting back with 0.4.x, I found it progressively became more of a pot
shoot as to whether ivtv would load all it's firmware properly after a
reboot of my PVR. After a lot of hunting, I read that other drivers were
having similar problems in the kernel and it had to do with races in
firmware loading code...
After more searching I found several messages on the kernel mailing list
which suggested to avoid this it was recommended to not request a bunch of
firmwares in short order,
Some of the other drivers got around this (such as some of the wireless NIC
drivers ipw*) by glueing firmware into a wad and loading it all at once.
That seemed like a load of grief for nothing. So I came up with this patch:
# cat ivtv-0.6.0-delay_request_firmware.patch
diff -urNbBp ivtv-0.6.0/driver/ivtv-firmware.c~
ivtv-0.6.0/driver/ivtv-firmware.c
--- ivtv-0.6.0/driver/ivtv-firmware.c~ 2006-04-14 16:19:21.000000000 -0400
+++ ivtv-0.6.0/driver/ivtv-firmware.c 2006-04-14 16:19:21.000000000 -0400
@@ -122,6 +122,9 @@ static int load_fw_direct(const char *fn
}
release_firmware(fw);
IVTV_INFO("loaded %s firmware (%d bytes)\n", fn, retval);
+// This firmware loading is racy, try waiting to let things settle
+ IVTV_DEBUG_INFO("Sleeping for 100ms\n");
+ ivtv_sleep_timeout(HZ / 10, 0);
} else {
IVTV_INFO("unable to open firmware %s\n", fn);
IVTV_INFO("did you put the firmware in the hotplug firmware
directory?\n");
This patch solved my firmware loading problems and I've had no problems with
the whole 0.6.x series.
I just tried 2.6.17-rh1 with the latest ivtv 0.7 SVN (without my patch
applied) and it locked my PVR solid trying to load the 2nd firmware file
just as it used to. I applied the patch above, rebooted and everything
has loaded fine and is working.
The failure mode is this. ivtv gets to the point of loading the 2nd firmware and
locks the box part of the time. The keyboard and everything was dead so I had to
hit reset. This is what I saw when it crashed:
Jun 27 17:57:09 vortex kernel: ivtv: ==================== START INIT
IVTV====================
Jun 27 17:57:09 vortex kernel: ivtv: version 0.7.0 (development snapshot
compiled on Tue 27 Jun 2006 05:32:38 PM EDT) loading
Jun 27 17:57:09 vortex kernel: ivtv: Linux version: 2.6.17-rh1 SMP preempt
mod_unload PENTIUM4 gcc-3.4
Jun 27 17:57:09 vortex kernel: ivtv: In case of problems please include the
debug info between
Jun 27 17:57:09 vortex kernel: ivtv: the START INIT IVTV and END INIT IVTV
lines, along with
Jun 27 17:57:09 vortex kernel: ivtv: any module options, when mailing the
ivtv-users mailinglist.
Jun 27 17:57:09 vortex kernel: ivtv0: Autodetected Hauppauge WinTV PVR-350 card
(cx23415 based)
Jun 27 17:57:09 vortex kernel: ACPI: PCI Interrupt 0000:03:05.0[A] -> GSI 21
(level, low) -> IRQ 209
Jun 27 17:57:09 vortex kernel: tveeprom 1-0050: Hauppauge model 48132, rev
J323, serial# 7012766
Jun 27 17:57:09 vortex kernel: tveeprom 1-0050: tuner model is Philips FM1236
(idx 23, type 2)
Jun 27 17:57:09 vortex kernel: tveeprom 1-0050: TV standards NTSC(M) (eeprom
0x08)
Jun 27 17:57:10 vortex kernel: tveeprom 1-0050: audio processor is MSP4448 (idx
27)
Jun 27 17:57:10 vortex kernel: tveeprom 1-0050: decoder processor is SAA7115
(idx 19)
Jun 27 17:57:10 vortex kernel: tveeprom 1-0050: has radio, has IR remote
Jun 27 17:57:10 vortex kernel: tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver
#0)
Jun 27 17:57:10 vortex kernel: saa7115 1-0021: saa7115 found @ 0x42 (ivtv i2c
driver #0)
Jun 27 17:57:10 vortex kernel: saa7127 1-0044: saa7127 found @ 0x88 (ivtv i2c
driver #0)
Jun 27 17:57:10 vortex kernel: msp3400 1-0040: MSP4448G-A2 found @ 0x80 (ivtv
i2c driver #0)
Jun 27 17:57:10 vortex kernel: msp3400 1-0040: MSP4448G-A2 supports radio, mode
is autodetect and autoselect
Jun 27 17:57:10 vortex kernel: ivtv0: loaded v4l-cx2341x-enc.fw firmware
(262144 bytes)
Jun 27 17:57:10 vortex kernel: ivtv0: loaded v4l-cx2341x-dec.fw firmware
(262144 bytes)
Jun 27 18:04:18 vortex syslogd 1.4.1: restart.
I'll keep applying my patch but I figure other people must be seeing this
too. YMMV
Regards,
Rob
--
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca GPG Key available (613) 276-7327
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel