[linux-dvb] Mega Sky 55801 (gl861) strange behaviour

gingis at gmx.de gingis at gmx.de
Sun Feb 11 16:06:14 CET 2007


Thx mate works great now! Couldn't have done this on my own.
big thx!

> I had the same problem. After some trial and error I found out that the
> usb message sometimes fail with a timeout error code in gl861. The
> q1010 and zl10353 then logs the error messages. The tuning then fail.
> 
>  I have no clue to why the message times out, but if I resend the the
> message it always succeed. This makes the device more reliable.
> 
> Try the patch (generated agaist http://linuxtv.org/hg/~mkrufky/megasky)
> 
> / Jonas
> 
> diff -r 0dd6baab4628 linux/drivers/media/dvb/dvb-usb/gl861.c
> --- a/linux/drivers/media/dvb/dvb-usb/gl861.c   Sat Jan 27 14:48:04 2007
> -0500
> +++ b/linux/drivers/media/dvb/dvb-usb/gl861.c   Sat Feb 10 23:55:04 2007
> +0100
> @@ -19,6 +19,8 @@ static int gl861_i2c_msg(struct dvb_usb_
>  static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr,
>                          u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
>  {
> +       int err;
> +       int tries;
>         u16 index;
>         u16 value = addr << 8;
>         int wo = (rbuf == NULL || rlen == 0); /* write-only */
> @@ -45,8 +47,12 @@ static int gl861_i2c_msg(struct dvb_usb_
>                 return -EINVAL;
>         }
> 
> -       return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0),
> req, type,
> -                              value, index, rbuf, rlen, 2000);
> +       tries = 0;
> +       do {
> +               err = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev,
> 0), req, type,
> +                                      value, index, rbuf, rlen, 2000);
> +       } while (err == -ETIMEDOUT && ++tries < 3);
> +       return err;
>  }
> 
>  /* I2C */
-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out



More information about the linux-dvb mailing list