BUG: Freeze upon loading bttv module
Subsystems (2)
Hi,
i'm having problems loading the bttv-module for my bt878 based DVB-T card: my system just freezes. Magic-Syskeys also won't work then. With kernel 3.9.0 this worked just fine. Versions 3.10, 3.11 and 3.12 won't work.
Last messages on screen with 3.12 upon booting/loading the module is: http://abload.de/img/bttv_freezeqxdn2.png
With kernel 3.9 i get an additional line on module loading and the device works fine:
[ 1.895037] bttv: 0: add subdevice "dvb0"
I traced the problem, it dies somewhere in v4l2_ctrl_handler_setup on line 4169 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/media/pci/bt8xx/bttv-driver.c#n4169
lspci output from kernel 3.9:
[...]
04:01.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
Subsystem: Twinhan Technology Co. Ltd VisionPlus DVB card
Flags: bus master, medium devsel, latency 32, IRQ 16
Memory at f0401000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2
Kernel driver in use: bttv
Kernel modules: bttv
04:01.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Subsystem: Twinhan Technology Co. Ltd VisionPlus DVB Card
Flags: bus master, medium devsel, latency 32, IRQ 16
Memory at f0400000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2
Kernel driver in use: bt878
Kernel modules: bt878
Please CC me as i'm not subscribed to the list.
Thanks!
- Lorenz
Hi Lorenz,
Quoted 10 lines · Lorenz Röhrl
Hi,
i'm having problems loading the bttv-module for my bt878 based DVB-T
card: my system just freezes. Magic-Syskeys also won't work then. With kernel 3.9.0 this worked just fine. Versions 3.10, 3.11 and 3.12 won't work.Last messages on screen with 3.12 upon booting/loading the module is:
http://abload.de/img/bttv_freezeqxdn2.png
Quoted 7 lines
With kernel 3.9 i get an additional line on module loading and the device works fine:
[ 1.895037] bttv: 0: add subdevice "dvb0"I traced the problem, it dies somewhere in
v4l2_ctrl_handler_setupon line 4169
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/media/pci/bt8xx/bttv-driver.c#n4169
Can you try this patch? I'm not 100% but I think this might be the cause of the problem.
drivers/media/pci/bt8xx/bttv-driver.c +2 -1
@@ -4182,7 +4182,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) } btv->std =V4L2_STD_PAL ;init_irqreg (btv); -v4l2_ctrl_handler_setup (hdl); +if (!bttv_tvcards[btv->c.type].no_video) +v4l2_ctrl_handler_setup (hdl);if (hdl->error) { result = hdl->error; goto fail2;
Regards,
Hans
Quoted 35 lines
lspci output from kernel 3.9:
[...]
04:01.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
Subsystem: Twinhan Technology Co. Ltd VisionPlus DVB card
Flags: bus master, medium devsel, latency 32, IRQ 16 Memory atf0401000(32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2 Kernel driver in use: bttv
Kernel modules: bttv04:01.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Subsystem: Twinhan Technology Co. Ltd VisionPlus DVB Card
Flags: bus master, medium devsel, latency 32, IRQ 16 Memory atf0400000(32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2 Kernel driver in use: bt878
Kernel modules: bt878Please CC me as i'm not subscribed to the list.
Thanks!
- Lorenz
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Hans,
Quoted 11 lines · Hans Verkuil
Can you try this patch? I'm not 100% but I think this might be the cause of the problem.
drivers/media/pci/bt8xx/bttv-driver.c +0
-0
drivers/media/pci/bt8xx/bttv-driver.c static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) · line 4189
Quoted 9 lines
drivers/media/pci/bt8xx/bttv-driver.c +2
-1@@ -4182,7 +4182,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) } btv->std =V4L2_STD_PAL ;init_irqreg (btv); -v4l2_ctrl_handler_setup (hdl); +if (!bttv_tvcards[btv->c.type].no_video) +v4l2_ctrl_handler_setup (hdl);if (hdl->error) { result = hdl->error; goto fail2;
I tried the patch and indeed it's working :)
No freeze on loading the module and the dvb-device is also working.
lolo@hurra ~ % ls /dev/dvb/adapter0
demux0 dvr0 frontend0
lolo@hurra ~ % dmesg |grep bttv
[ 0.871060] bttv: driver version 0.9.19 loaded [ 0.872005] bttv: using 8 buffers with 2080k (520 pages) each for capture [ 0.873137] bttv: Bt8xx card found (0) [ 0.874186] bttv: 0: Bt878 (rev 17) at 0000:04:01.0, irq: 16, latency: 32, mmio: 0xf0401000 [ 0.875156] bttv: 0: detected: Twinhan VisionPlus DVB [card=113], PCI subsystem ID is 1822:0001 [ 0.876138] bttv: 0: using: Twinhan DST + clones [card=113,autodetected] [ 0.884082] bttv: 0: tuner absent [ 0.894011] bttv: 0: add subdevice "dvb0" [ 0.901398] DVB: registering new adapter (bttv0)
Will this patch be included upstream? When will it appear in official kernel sources?
Thanks a lot!
- Lorenz
Hi Lorenz,
Quoted 19 lines · Lorenz Röhrl
Hi Hans,
Quoted 15 lines · Hans Verkuil
Can you try this patch? I'm not 100% but I think this might be the cause of the problem.
drivers/media/pci/bt8xx/bttv-driver.c +2
-1@@ -4182,7 +4182,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) } btv->std =V4L2_STD_PAL ;init_irqreg (btv); -v4l2_ctrl_handler_setup (hdl); +if (!bttv_tvcards[btv->c.type].no_video) +v4l2_ctrl_handler_setup (hdl);
Quoted 8 lines
drivers/media/pci/bt8xx/bttv-driver.c static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) · line 4189
Quoted 5 lines
drivers/media/pci/bt8xx/bttv-driver.c +0
-0if (hdl->error) { result = hdl->error; goto fail2;I tried the patch and indeed it's working :)
No freeze on loading the module and the dvb-device is also working.
Thanks for testing this! Good news that it fixed the problem.
Quoted 18 lines
lolo@hurra ~ % ls
/dev/dvb/adapter0
demux0 dvr0 frontend0lolo@hurra ~ % dmesg |grep bttv
[ 0.871060] bttv: driver version 0.9.19 loaded [ 0.872005] bttv: using 8 buffers with 2080k (520 pages) each for capture [ 0.873137] bttv: Bt8xx card found (0) [ 0.874186] bttv: 0: Bt878 (rev 17) at 0000:04:01.0, irq: 16, latency: 32, mmio: 0xf0401000 [ 0.875156] bttv: 0: detected: Twinhan VisionPlus DVB [card=113], PCI subsystem ID is 1822:0001 [ 0.876138] bttv: 0: using: Twinhan DST + clones [card=113,autodetected] [ 0.884082] bttv: 0: tuner absent [ 0.894011] bttv: 0: add subdevice "dvb0" [ 0.901398] DVB: registering new adapter (bttv0)
Quoted 2 lines
Will this patch be included upstream? When will it appear in official kernel sources?
I'll make a pull request for this tomorrow for 3.13 with a CC to the stable kernel mailinglist. It will probably take a few weeks before it appears in the mainline kernel and in the older, stable, kernels. I would expect this to be fixed by the end of the year.
Regards,
Hans