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

Antti Palosaari crope at iki.fi
Sun Feb 11 22:44:01 CET 2007


moi!
I have also seen this problem with my "fast" machine. It disappeared 
when I added some sleep to Zarlink zl10535 module. Looks like timing 
problems... I2C messages targeted to demodulator are sent too fast.
/antti

gingis at gmx.de kirjoitti:
> 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 */


-- 
               |||
              (0-0)
---------oOO--(_)--OOo--------------------------------------------
tel. +358 40 535 7322 | MSN Messenger crope at iki.fi | www.palosaari.fi
-Kahta asiaa en ymma"rra".. C-kielen syntaksi ja naisten logiikka.."



More information about the linux-dvb mailing list