]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
authorAntti Palosaari <crope@iki.fi>
Tue, 20 Jan 2009 17:56:20 +0000 (14:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 29 Jan 2009 10:56:43 +0000 (08:56 -0200)
First control messages to the stick timeouts very often due to probable
hw bug. Repeat first message few times if it fails as workaround.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9015.c

index dbeaf79defd8c33edd0091318f008b12a893746b..6a97a40d3dfbcf63dc793df361451cb9e0f29607 100644 (file)
@@ -694,7 +694,12 @@ static int af9015_read_config(struct usb_device *udev)
 
        /* IR remote controller */
        req.addr = AF9015_EEPROM_IR_MODE;
-       ret = af9015_rw_udev(udev, &req);
+       /* first message will timeout often due to possible hw bug */
+       for (i = 0; i < 4; i++) {
+               ret = af9015_rw_udev(udev, &req);
+               if (!ret)
+                       break;
+       }
        if (ret)
                goto error;
        deb_info("%s: IR mode:%d\n", __func__, val);