Web lists-archives.org

Re: [patch]radio-si470x various fixes




Hi Oliver,

> This patch fixes the following issues in the radio-si470x driver
>     - probe()/open() race by correct ordering in probe()
>     - DMA coherency rules by separate allocation of all buffers
>     - use of endianness macros
>     - abuse of spinlock, replaced by mutex
>     - racy handling of timer in disconnect, replaced by delayed_work
>     - racy interruptible_sleep_on(), replaced with wait_event_interruptible()
>     - handle signals in read()

I tried to apply the patch, but most things failed.
I guess you used version 1.0.4?

Please can you provide your fixes again, but against the current version from the V4L repository?
And there are some additional patches already on the mailing list, but not yet in the V4L mercurial. A combined patch is below.
URL: http://linuxtv.org/hg/v4l-dvb/raw-file/4b1ee6214b23/linux/drivers/media/radio/radio-si470x.c

> Tobias, could you test this?

I will try to adopt your patch against my version 1.0.5 of the driver in the mean time.
If I succeed I send you back the adopted patch, so you can have a look at it.

Bye,
  Toby

Signed-off-by: Tobias Lorenz <tobias.lorenz@xxxxxxx>
--- linux-2.6.23/drivers/media/radio/radio-si470x.c     2008-01-23 00:01:07.000000000 +0100
+++ linux-2.6.23.new/drivers/media/radio/radio-si470x.c 2008-01-27 15:31:42.000000000 +0100
@@ -559,7 +559,7 @@
                (void *) &buf, sizeof(buf), &size, usb_timeout);
        if (size != sizeof(buf))
                printk(KERN_WARNING DRIVER_NAME ": si470x_get_rds_register: "
-                      "return size differs: %d != %ld\n", size, sizeof(buf));
+                       "return size differs: %d != %ld\n", size, sizeof(buf));
        if (retval < 0)
                printk(KERN_WARNING DRIVER_NAME ": si470x_get_rds_registers: "
                        "usb_interrupt_msg returned %d\n", retval);
@@ -1441,13 +1441,11 @@
        struct si470x_device *radio = usb_get_intfdata(intf);

        usb_set_intfdata(intf, NULL);
-       if (radio) {
-              del_timer_sync(&radio->timer);
-              flush_scheduled_work();
-               video_unregister_device(radio->videodev);
-               kfree(radio->buffer);
-               kfree(radio);
-       }
+       del_timer_sync(&radio->timer);
+       flush_scheduled_work();
+       video_unregister_device(radio->videodev);
+       kfree(radio->buffer);
+       kfree(radio);
 }


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list