Have you tried the following fix?  This should really be updated in the CVS version
(in addition to the new data structure for v4l support).


To: [EMAIL PROTECTED]
     Subject: [mpeg2] Re: crash on rmmod
     From: Rob Morris <[EMAIL PROTECTED]>
     Date: Tue, 29 May 2001 18:26:41 -0600
     Cc: [EMAIL PROTECTED]

Hi Alexander,
We ran into the exact same problem when removing the kfir module.
The symptoms were:
1. you could capture 1 good mpeg2 after a reboot, thereinafter no mpeg2 could be
displayed with an mpeg2 player (but we could still get a datastream).
2. Long delay after you hit Ctrl-C with the 'cat /dev/video0 > test.mpg' (3-4
seconds)
2. kernel crashes when you remove kfir module

The problem appears to be a bug in the kfir module in kfir.c at line 2631.

The function is:

static void kfir_remove_device(struct kfir_dev *kfir)

the troublesome lines of code are

               val=rplxl(DMA0_DONE_ENABLE);
                val&=~DMA0_DONE_ENABLE;
                wplxl(DMA0_DONE_ENABLE, val);

change these to

               val=rplxl(PLX9054_DMA0_MODE );
               val&=~DMA0_DONE_ENABLE;
               wplxl(PLX9054_DMA0_MODE , val);

Quite frankly, I can't see how the current code could have ever worked!
Hope this fixes your problem.


Andreas Trottmann wrote:

> On Sat, Oct 27, 2001 at 06:36:44PM +0900, Naohiro Shichijo wrote:
>
> >   I tried the same way as you did. I added one parameter (0) at video_register_
> > device function call. My situation is, insmod is OK, encoding seems not working
> > but when I tried to rmmod. it said segmantation fault. I didn't investigate
> > further. Linux kernel is 2.4.12, Kfir is obtained with cvsup.
> >
> > BTW, what is the latest kernel version, which supporsed to be working with
> > Kfir?
>
> I have it working fine with 2.4.9, using the stock driver with nothing
> but the video_register_device change.
>
> On some hardware (single board computer with a VIA Apollo chipset), insmod ->
> encode -> rmmod works well. On other hardware ("Relience Computer
> CNB20HE"), insmod -> encode works, but rmmod oopses. But as the encoding
> always works, I'm not unhappy.
>
> --
> Andreas Trottmann <[EMAIL PROTECTED]>



Reply via email to