Skip to contentSkip to conversation

V4L core cleanups HG tree

PATCH In review Laurent Pinchart 4 participants 10 messages Nov 18, 2009 – Nov 27, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 V4L core cleanups HG tree

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

I can't wait for an explicit ack from all maintainers (mostly because I don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

--
Regards,

Laurent Pinchart

#1 lore raw

Hopefully CC'ing the au0828, cx231xx, cx23885, s2255 and cx25821 maintainers.

Could you please ack patch http://linuxtv.org/hg/~pinchartl/v4l-dvb-
cleanup/rev/7a762df57149 ? The patch should be committed to v4l-dvb in time for 2.6.33.

Quoted 19 lines · On Wednesday 18 November 2009 13:54:06 Laurent Pinchart wrote:

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if
you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

I can't wait for an explicit ack from all maintainers (mostly because I
don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by
#2 lore raw
Quoted 5 lines · On Wednesday 25 November 2009 17:21:26 Laurent Pinchart wrote:

Hopefully CC'ing the au0828, cx231xx, cx23885, s2255 and cx25821 maintainers.

Could you please ack patch http://linuxtv.org/hg/~pinchartl/v4l-dvb-
cleanup/rev/7a762df57149 ? The patch should be committed to v4l-dvb in time for 2.6.33.

Regards,

Hans

Quoted 23 lines · On Wednesday 18 November 2009 13:54:06 Laurent Pinchart wrote:
Quoted 19 lines

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if
you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

I can't wait for an explicit ack from all maintainers (mostly because I
don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG
#3 lore raw
In reply to Laurent Pinchart
Quoted 26 lines · Laurent Pinchart

Hopefully CC'ing the au0828, cx231xx, cx23885, s2255 and cx25821 maintainers.

Could you please ack patch http://linuxtv.org/hg/~pinchartl/v4l-dvb-
cleanup/rev/7a762df57149 ? The patch should be committed to v4l-dvb in time for 2.6.33.

Quoted 19 lines · On Wednesday 18 November 2009 13:54:06 Laurent Pinchart wrote:

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

I can't wait for an explicit ack from all maintainers (mostly because I don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

I have a pile of testing in the next few days. In light of Devin's OOPS I'll test the cx88 and cx23885 changes and report back by sunday.

Thanks for the cleanups Laurent.

Regards,

- Steve

Signature · 2 lines
Steven Toth - Kernel Labs
http://www.kernellabs.com
Acked-by
#4 lore raw
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

I can't wait for an explicit ack from all maintainers (mostly because I don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

I have a pile of testing in the next few days. In light of Devin's OOPS I'll test the cx88 and cx23885 changes and report back by sunday.

Thanks for the cleanups Laurent.

I'm fine with the cx88 and cx23885 changes.

Signature · 2 lines
Steven Toth - Kernel Labs
http://www.kernellabs.com
#5 lore raw
In reply to Laurent Pinchart
Quoted 16 lines · Laurent Pinchart

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

Quoted 8 lines

I can't wait for an explicit ack from all maintainers (mostly because I don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

--
Regards,

Laurent Pinchart

Hi Laurent,

Well, I don't know what is wrong yet, but the au0828 driver now hits an OOPS with this tree whenever the device is disconnected, whereas with last night's v4l-dvb tip it was working fine.

I'll dig into it now...

[  254.972480] usb 1-3: USB disconnect, address 8
[  254.973073] BUG: unable to handle kernel NULL pointer dereference at 00000004
[  254.973083] IP: [<f8dc0142>] au0828_analog_unregister+0x32/0x90 [au0828]
[  254.973101] *pde = 00000000
[  254.973107] Oops: 0002 [#1] SMP
[  254.973113] last sysfs file: /sys/devices/system/cpu/cpu1/topology/core_id
[  254.973120] Modules linked in: xc5000 tuner au8522 au0828 dvb_core

v4l2_common videodev v4l1_compat videobuf_vmalloc videobuf_core tveeprom snd_usb_audio snd_usb_lib binfmt_misc ppdev bridge stp bnep btusb arc4 ecb snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy joydev snd_seq_oss snd_seq_midi iptable_filter ath9k mac80211 ath appletouch ip_tables applesmc x_tables snd_rawmidi isight_firmware snd_seq_midi_event snd_seq snd_timer snd_seq_device led_class input_polldev cfg80211 snd soundcore snd_page_alloc sbp2 lp parport fbcon tileblit font bitblit softcursor hid_apple usbhid ohci1394 ieee1394 i915 drm i2c_algo_bit video output sky2 intel_agp agpgart [last unloaded: tveeprom]

[  254.973243]
[  254.973250] Pid: 26, comm: khubd Not tainted (2.6.31-15-generic
#50-Ubuntu) MacBook2,1
[  254.973256] EIP: 0060:[<f8dc0142>] EFLAGS: 00010286 CPU: 0
[  254.973266] EIP is at au0828_analog_unregister+0x32/0x90 [au0828]
[  254.973271] EAX: 00000000 EBX: ecf04800 ECX: ed8e4a00 EDX: 00000000
[  254.973276] ESI: ee76a000 EDI: f8dc53c0 EBP: f7119e08 ESP: f7119e00
[  254.973281]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[  254.973286] Process khubd (pid: 26, ti=f7118000 task=f70bcb60
task.ti=f7118000)
[  254.973290] Stack:
[  254.973293]  ecf04800 ecf04800 f7119e20 f8dbd02b ecfe6800 ee76a000
ee76a000 ee76a01c
[  254.973307] <0> f7119e3c c0414d89 00000000 ecfe6800 ee76a01c
f8dc53f4 c0778120 f7119e4c
[  254.973322] <0> c03a2b9e ee76a050 ee76a01c f7119e5c c03a2cb0
c0778120 ee76a01c f7119e70
[  254.973337] Call Trace:
[  254.973348]  [<f8dbd02b>] ? au0828_usb_disconnect+0x2b/0x80 [au0828]
[  254.973362]  [<c0414d89>] ? usb_unbind_interface+0xe9/0x120
[  254.973371]  [<c03a2b9e>] ? __device_release_driver+0x3e/0x90
[  254.973379]  [<c03a2cb0>] ? device_release_driver+0x20/0x40
[  254.973386]  [<c03a1ff3>] ? bus_remove_device+0x73/0x90
[  254.973393]  [<c03a075f>] ? device_del+0xef/0x150

.....

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#6 lore raw

Hi Devin,

Quoted 29 lines · On Thursday 26 November 2009 00:06:40 Devin Heitmueller wrote:

On Wed, Nov 18, 2009 at 7:54 AM, Laurent Pinchart

Quoted 17 lines · <[email protected]> wrote:

Hi everybody,

the V4L cleanup patches are now available from

http://linuxtv.org/hg/~pinchartl/v4l-dvb-cleanup

The tree will be rebased if needed (or rather dropped and recreated as hg doesn't provide a rebase operation), so please don't pull from it yet if you don't want to have to throw the patches away manually later.

I've incorporated the comments received so far and went through all the patches to spot bugs that could have sneaked in.

Please test the code against the driver(s) you maintain. The changes are small, *should* not create any issue, but the usual bug can still sneak in.

Quoted 8 lines

I can't wait for an explicit ack from all maintainers (mostly because I don't know you all), so I'll send a pull request in a week if there's no blocking issue. I'd like this to get in 2.6.33 if possible.

--
Regards,

Laurent Pinchart

Quoted 7 lines

Hi Laurent,

Well, I don't know what is wrong yet, but the au0828 driver now hits an OOPS with this tree whenever the device is disconnected, whereas with last night's v4l-dvb tip it was working fine.

I'll dig into it now...

Thank you very much for the report. Could you please try with the following patch applied on top of the v4l-dvb-cleanup tree ?

linux/drivers/media/video/au0828/au0828-video.c +1 -5
diff -r 98e3929a1a2d linux/drivers/media/video/au0828/au0828-video.c
@@ -697,10 +697,8 @@
 	dprintk(1, "au0828_release_resources called\n");
 	mutex_lock(&au0828_sysfs_lock);
 
-	if (dev->vdev) {
-		list_del(&dev->au0828list);
+	if (dev->vdev)
 		video_unregister_device(dev->vdev);
-	}
 	if (dev->vbi_dev)
 		video_unregister_device(dev->vbi_dev);
 
@@ -1671,7 +1669,6 @@
 	if (retval != 0) {
 		dprintk(1, "unable to register video device (error = %d).\n",
 			retval);
-		list_del(&dev->au0828list);
 		video_device_release(dev->vdev);
 		return -ENODEV;
 	}
@@ -1683,7 +1680,6 @@
 	if (retval != 0) {
 		dprintk(1, "unable to register vbi device (error = %d).\n",
 			retval);
-		list_del(&dev->au0828list);
 		video_device_release(dev->vbi_dev);
 		video_device_release(dev->vdev);
 		return -ENODEV;
linux/drivers/media/video/au0828/au0828.h +0 -1
diff -r 98e3929a1a2d linux/drivers/media/video/au0828/au0828.h
@@ -192,7 +192,6 @@
 	struct au0828_dvb		dvb;
 
 	/* Analog */
-	struct list_head au0828list;
 	struct v4l2_device v4l2_dev;
 	int users;
 	unsigned int stream_on:1;	/* Locks streams */
Signature · 3 lines
Regards,

Laurent Pinchart
#7 lore raw

On Wed, Nov 25, 2009 at 7:02 PM, Laurent Pinchart

Quoted 44 lines

Thank you very much for the report. Could you please try with the following patch applied on top of the v4l-dvb-cleanup tree ?

diff -r 98e3929a1a2d linux/drivers/media/video/au0828/au0828-video.c

linux/drivers/media/video/au0828/au0828-video.c   Thu Nov 26 01:02:15 2009 +0100 renamed from linux/drivers/media/video/au0828/au0828-video.c   Wed Nov 25 12:55:47 2009 +0100 +1 -5
@@ -697,10 +697,8 @@
        dprintk(1, "au0828_release_resources called\n");
        mutex_lock(&au0828_sysfs_lock);
 
-       if (dev->vdev) {
-               list_del(&dev->au0828list);
+       if (dev->vdev)
                video_unregister_device(dev->vdev);
-       }
        if (dev->vbi_dev)
                video_unregister_device(dev->vbi_dev);
 
@@ -1671,7 +1669,6 @@
        if (retval != 0) {
                dprintk(1, "unable to register video device (error = %d).\n",
                        retval);
-               list_del(&dev->au0828list);
                video_device_release(dev->vdev);
                return -ENODEV;
        }
@@ -1683,7 +1680,6 @@
        if (retval != 0) {
                dprintk(1, "unable to register vbi device (error = %d).\n",
                        retval);
-               list_del(&dev->au0828list);
                video_device_release(dev->vbi_dev);
                video_device_release(dev->vdev);
                return -ENODEV;

diff -r 98e3929a1a2d linux/drivers/media/video/au0828/au0828.h

linux/drivers/media/video/au0828/au0828.h Thu Nov 26 01:02:15 2009 +0100 renamed from linux/drivers/media/video/au0828/au0828.h Wed Nov 25 12:55:47 2009 +0100 +0 -1
@@ -192,7 +192,6 @@
        struct au0828_dvb               dvb;
 
        /* Analog */
-       struct list_head au0828list;
        struct v4l2_device v4l2_dev;
        int users;
Quoted 1 line

       unsigned int stream_on:1;       /* Locks streams */

Trying it now....

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#8 lore raw

On Wed, Nov 25, 2009 at 7:07 PM, Devin Heitmueller

Quoted 3 lines

Trying it now....

Devin

Ok, that seems to have resolved the issue. Please make sure that patch gets added to your PULL request.

Wish I had found that myself 90 minutes earlier... :-/

Thanks,

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#9 lore raw
Quoted 8 lines · On Thursday 26 November 2009 01:17:51 Devin Heitmueller wrote:

On Wed, Nov 25, 2009 at 7:07 PM, Devin Heitmueller

Quoted 3 lines

Trying it now....

Devin

Ok, that seems to have resolved the issue. Please make sure that patch gets added to your PULL request.

I will. Thanks a lot for testing the patch set.

Quoted 1 line

Wish I had found that myself 90 minutes earlier... :-/

I wish I was in bed for at least 90 minutes :-)

Signature · 3 lines
Regards,

Laurent Pinchart