On Wed, 2008-10-15 at 11:34 -0400, daryl wrote:
> Andy.
> I just realized that my responses to some of your requests were not 
> included in my last letter.
> 
> I did include my log messages, etc but I did not mention that..
> 
> 1. I did blacklist the cx18 driver byI editing /etc/modprobe.d/blacklist 
> and adding "blacklist cx18" to the bottom of the file.
> 
> 2. I ran
> $ sudo modprobe -r cx18
> $ sudo modprobe cx18 debug=67 retry_mmio=1 enc_mpg_buffers=1 
> enc_ts_buffers=0 enc_vbi_buffers=0 enc_yuv_buffers=0 enc_pcm_buffers=0
> 
> 3. The driver did not load ok so I ran...
> $ sudo modprobe -r cx18
> 
> 4. I then sent you the output messages.
> 
> Sorry for the delay.

Well, I've been busy just trying to keep up with the trouble cx18
reports (plus  my real life work, family, home,.etc.) so delays don't
bug me.  In fact I didn't even notice. :)

Anyway, here's what I was looking for:

Oct 13 21:31:01 daryl-desktop kernel: [  138.852294] cx18:  Start 
initialization, version 1.0.1
[snip]
Oct 13 21:31:01 daryl-desktop kernel: [  138.899506] cx18-0 info: GPIO initial 
dir: 0000ffff/0000ffff out: 00000000/00000000

Likely PCI bus read errors  (PCI bus read errors return 0xffffffff)

Oct 13 21:31:01 daryl-desktop kernel: [  138.899525] cx18-0 info: activating 
i2c...
Oct 13 21:31:01 daryl-desktop kernel: [  138.899528] cx18-0 i2c: i2c init
Oct 13 21:31:01 daryl-desktop kernel: [  138.936302] cx18-0 info: Active card 
count: 1.
Oct 13 21:31:01 daryl-desktop kernel: [  138.936866] tveeprom 2-0050: Huh, no 
eeprom present (err=-121)?
Oct 13 21:31:01 daryl-desktop kernel: [  138.936870] tveeprom 2-0050: 
Encountered bad packet header [c0]. Corrupt or not a Hauppauge eeprom.

Likely more PCI bus errors

[snip]
Oct 13 21:31:01 daryl-desktop kernel: [  138.989744] cx18-0 info: Allocate 
encoder MPEG stream: 32 x 32768 buffers (1024kB total)
Oct 13 21:31:01 daryl-desktop kernel: [  138.989924] cx18-0: Disabled TS device
Oct 13 21:31:01 daryl-desktop kernel: [  138.989927] cx18-0: Disabled encoder 
YUV device
Oct 13 21:31:01 daryl-desktop kernel: [  138.989928] cx18-0: Disabled encoder 
PCM audio device
Oct 13 21:31:01 daryl-desktop kernel: [  138.989930] cx18-0: Disabled encoder 
IDX device
Oct 13 21:31:01 daryl-desktop kernel: [  138.990263] cx18-0: Registered device 
video0 for encoder MPEG (1 MB)

Using as little memory as possible.  OK.

Oct 13 21:31:01 daryl-desktop kernel: [  138.990382] DVB: registering new 
adapter (cx18)
Oct 13 21:31:01 daryl-desktop kernel: [  139.000221] cx18-0: Unexpected mailbox 
command ffffffff
Oct 13 21:31:01 daryl-desktop kernel: [  139.000227] cx18-0: Unexpected 
interrupt ffffffff
Oct 13 21:31:01 daryl-desktop kernel: [  139.017268] s5h1409_readreg: readreg 
error (ret == -121)

Likely yet more PCI bus errors.



Oct 13 21:31:01 daryl-desktop kernel: [  139.017472] cx18-0: Registered device 
radio0 for encoder radio
Oct 13 21:31:01 daryl-desktop kernel: [  139.017542] cx18-0 i2c: i2c exit
Oct 13 21:31:01 daryl-desktop kernel: [  139.017606] cx18-0 info: releasing 
enc_mem
Oct 13 21:31:02 daryl-desktop kernel: [  139.018934] cx18-0 info: 
retried_write[0] = 281
Oct 13 21:31:02 daryl-desktop kernel: [  139.018935] cx18-0 info: 
retried_write[1] = 16933
Oct 13 21:31:02 daryl-desktop kernel: [  139.018938] cx18-0 info: 
retried_write[2] = 96
Oct 13 21:31:02 daryl-desktop kernel: [  139.018939] cx18-0 info: 
retried_write[3] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018940] cx18-0 info: 
retried_write[4] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018942] cx18-0 info: 
retried_write[5] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018943] cx18-0 info: 
retried_write[6] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018944] cx18-0 info: 
retried_write[7] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018945] cx18-0 info: 
retried_write[8] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018947] cx18-0 info: 
retried_write[9] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018948] cx18-0 info: 
retried_write[10] = 264
Oct 13 21:31:02 daryl-desktop kernel: [  139.018950] cx18-0 info: 
retried_read[0] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018951] cx18-0 info: 
retried_read[1] = 1226
Oct 13 21:31:02 daryl-desktop kernel: [  139.018953] cx18-0 info: 
retried_read[2] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018955] cx18-0 info: 
retried_read[3] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018956] cx18-0 info: 
retried_read[4] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018958] cx18-0 info: 
retried_read[5] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018959] cx18-0 info: 
retried_read[6] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018961] cx18-0 info: 
retried_read[7] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018962] cx18-0 info: 
retried_read[8] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018964] cx18-0 info: 
retried_read[9] = 0
Oct 13 21:31:02 daryl-desktop kernel: [  139.018965] cx18-0 info: 
retried_read[10] = 1233

OK.  These are really odd histograms for PCI MMIO access retires to the
CX23418.  Every read PCI mmio read of the CX23418 fails on the first try
(retried_read[0] = 0), and over half of the read accesses completely
fail (retried_read[10] = 1233).  Since the retried writes are done based
on being able to read things back properly over the PCI bus, they're
like being skewed by the high rate of PCI bus read errors when accessing
the CX23418.

That's really atypical compared to the three machines and cards I have.
The problem can't be all the CX23418.  I would expect the number of
completely failed reads to only be around 400 after initialization.   

There's something about your PCI bus that's causing problems, but at the
moment I can't see what.



Oct 13 21:31:02 daryl-desktop kernel: [  139.018984] cx18: probe of 
0000:01:06.0 failed with error -12
Oct 13 21:31:02 daryl-desktop kernel: [  139.019001] cx18:  End initialization

-12 is -ENOMEM.  That's even after the cx18 asks for a low amount of
memory for buffers.  I checked the driver and found that when DVB
registration doesn't succeed, the driver can gripe -ENOMEM even if
memory wasn't the problem.  So you may not have a memory problem.



So there's not much specific advice I can give at this point.  Only some
general advice:

1. You can try loading the module also specifying the mmio_ndelay
parameter.  It may not help (actually it shouldn't), but it's easy
enough to try: 

  $ sudo modprobe -r cx18
  $ sudo modprobe cx18 debug=67 retry_mmio=1 mmio_ndelay=243 enc_mpg_buffers=1 
enc_ts_buffers=0 enc_vbi_buffers=0 enc_yuv_buffers=0 enc_pcm_buffers=0


2. If that doesn't help with the PCI MMIO read errors, then you need to
start experimenting to find out what on the PCI bus is causing all the
read errors: a particular card, device driver, or latency timer on a
bridge are the things I would check.  I might also try to disable
message signaled interrupts, if that's feasible.

Alternatively, can you try the card in another system and see if you get
the same sort of behavior?


3. If you can resolve the PCI bus read errors, and the DVB frontend
appears to register, and you still get -ENOMEM being returned, only then
concentrate on trying to free up memory.


Regards,
Andy


> daryl wrote:
> > I have enclosed attachments of dmesg and var/log/messages files.
> >
> >
> > Andy Walls wrote:
> >> On Sun, 2008-10-12 at 22:05 -0400, daryl wrote:
> >>  
> >>> Andy Walls wrote:
> >>>  > Daryl,
> >>>
> >>> First, I want to apologize for dumping all of this on you. Its such 
> >>> a lot that I feel guilty.
> >>>     
> >>
> >> No, big deal.  This particular problem (PCI mmio access errors to the
> >> CX23418) has dogged me for a few months.  I thought I had it fixed for
> >> good with driver version 1.0.1.  I guess it'll just be my White
> >> Whale... :)
> >>
> >>
> >>  
> >>>  > OK, you have obvious PCI bus communications problems.  The 
> >>> CX23418 could
> >>>  > be the cause or something else in your system could be the cause.
> >>>  > Recent experience leads me to believe it's likely the CX23418.
> >>>     
> >>
> >>
> >> OK.  Let's forget the big list of things to do.  Your vmalloc
> >> allocations looked fine, so let's do this:
> >>
> >>
> >> 1.  Blacklist the cx18 driver if you can, so that it doesn't
> >> automatically load on boot.  (On Fedora it means adding an entry
> >> in /etc/modporbe.d/blacklist.)
> >>
> >> 2. Reboot and execute the following commands:
> >>
> >> $ sudo modprobe -r cx18
> >> $ sudo modprobe cx18 debug=67 retry_mmio=1 enc_mpg_buffers=1 
> >> enc_ts_buffers=0 enc_vbi_buffers=0 enc_yuv_buffers=0 enc_pcm_buffers=0
> >>
> >> 3a. If the driver appears to load OK do this
> >>
> >> $ v4l2-ctl -d /dev/video0 --log-status
> >>
> >> 3b. If it does not load OK, do this
> >>
> >> $ sudo modprobe -r cx18
> >>
> >>
> >> 4. Send all output cx18 related out logged to dmesg
> >> (or /var/log/messages)
> >>
> >>
> >>
> >> Regards,
> >> Andy
> >>
> >>
> >> _______________________________________________
> >> ivtv-users mailing list
> >> [email protected]
> >> http://ivtvdriver.org/mailman/listinfo/ivtv-users
> >>
> >>   
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > ivtv-users mailing list
> > [email protected]
> > http://ivtvdriver.org/mailman/listinfo/ivtv-users
> 
> 
> _______________________________________________
> ivtv-users mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-users
> 


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

Reply via email to