Re: system hang in bttv driver on modprobe.

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



Shrijeet Mukherjee wrote:

To: video4linux-list@xxxxxxxxxx
Subject:  system hang in bttv driver on
modprobe.  PCI problem?


I hope someone can point me in the direction of
some help.  The problem
is easy to reproduce, but I have no error
messages, just the system
locks up solid (no oops!) I have SGI KDB
installed and functional but it
does not come up when the hang occurs either.

Versions:
   started with redhat 7.3  standard kernel
(2.4.18++, with bttv 0.7.xxx)
   then tried 2.4.19 linus tree with v4l2 &
bttv-0.8.45... no change.

I started editing the bttv driver. and noticed
that it hangs in the file bttv-driver.c in the init_bt848 routine at the line which does "btwrite(val,BT848_E_SCLOOP);" If I comment out the line, it will hang on the next line, If I comment that one, it will hang on the one after that, etc...

These lines to write to registers on the ATI TV
Wonder Card (PCI id 00:09.0 which has a BT878A chip on it.) It seems able to do a couple of writes and then hang.

grumpy% lspci
00:00.0 Host bridge: VIA Technologies, Inc.
VT82C693A/694x [Apollo PRO133x] (rev c2)
00:01.0 PCI bridge: VIA Technologies, Inc.
VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:04.0 ISA bridge: VIA Technologies, Inc.
VT82C596 ISA [Mobile South] (rev 12)
00:04.1 IDE interface: VIA Technologies, Inc.
Bus Master IDE (rev 06)
00:04.2 USB Controller: VIA Technologies, Inc.
USB (rev 08)
00:04.3 Host bridge: VIA Technologies, Inc.
VT82C596 Power Management (rev 20)
00:09.0 Multimedia video controller: Brooktree
Corporation Bt878 Video Capture (rev 11)
00:09.1 Multimedia controller: Brooktree
Corporation Bt878 Audio Capture (rev 11)
00:0b.0 Multimedia audio controller: Creative
Labs SB Live! EMU10k1 (rev 08)
00:0b.1 Input device controller: Creative Labs
SB Live! MIDI/Game Port (rev 08)
00:0e.0 Ethernet controller: 3Com Corporation
3c905B 100BaseTX [Cyclone] (rev 30)
01:00.0 VGA compatible controller: Matrox
Graphics, Inc. MGA G400 AGP (rev 04)
grumpy%

I would appreciate any ideas on how to proceed,
or pointers to people who might be willing to help.


The O_SCLOOP register is just setting the video
filter that it will use for Automatic Gain
Control and Horizontal (line) filtering. Since
you probably do not have video turned on yet, I
would not suspect it yet.

If you are using .8.45 the only thing that
happens before in the init function and is
possible suspicious is the setting of the DMA
bits for the DMA controller.

That is what I would try to comment out, or in
the very least move it down further below to see
if it changes things ..
I am not sure what you want me to comment out.
Is it one of these routines?

       pci_set_dma_mask(dev, 0xffffffff)
       request_mem_region(...)
        if (!pci_dma_supported(dev,0xffffffff)) ...
??

Also .. in the generic startup code up there, do
you see any error messages like "Oops .. no DMA
found .." or things like that ?
Initially there were no messages.  I removed the KERN_INFO and KERN_DEBUG
parameters from printk lines, and inserted "about to" printk's to trace where it hangs
After reading a bit about PCI quirks, I also added a test in bttv-driver.c

"       if (isa_dma_bridge_buggy)
               printk( "bttv: Host bridge has buggy ISA DMA\n");

"  similar to the ones for the VSFX and triton tests there...

now I have (transcribed):

grumpy# modprobe bttv
<date> Linux video capture interface: v1.00
bttv: host bridge is VIA Technologies Inc. VT82C693A/694x [Apollo 133x]
bttv: host bridge is VIA Technologies Inc. VT82C596 Power Management
bttv: host bridge has buggy ISA DMA
bttv: host bridge needs VSFX enabled
PCI: Enabling device - 00:09.0 (0004->0006)
bttv0: detected: ATI TV Wonder [card=63, autodetected]
bttv0: enabling VSFX
bttv0: risc main @ 12112000
about to btwrite(val, BT848_E_SCLOOP)
---------- <HANG> ----------------------------------


notes:
/etc/modules.conf: options bttv bttv_debug=1 irq_debug=1 v4l2=2 vsfx=1

PPS: How do you know it is an 878A ? the pci
parameters do not actually specify it .. and I
get the same message as you do, but assumed that
it was the 878 not the 878A ..

I took the card out of the machine   There are two chips on it that say:

               Conexant Fusion 878A E197817-1 Taiwan,
               Micronas MSP 3445G 881162JS LHX

respectively.  On the other side of the card, there is a metal
box with "PHILIPS" printed on it, and I live in North America.

P.S. If someone can tell me how to get Redhat to print kernel info and debug
messages, it would be really helpful!








[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux