linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DVBSky T980C: Si2168 fw load failed
@ 2014-12-06 16:48 Jurgen Kramer
  2014-12-06 18:29 ` Antti Palosaari
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2014-12-06 16:48 UTC (permalink / raw)
  To: linux-media

On my new DVBSky T980C the tuner firmware failes to load:
[   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
[   51.356233] si2168 2-0064: downloading firmware from file
'dvb-demod-si2168-a30-01.fw'
[   51.408166] si2168 2-0064: firmware download failed=-110
[   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
in cold state
[   51.521714] si2157 4-0060: downloading firmware from file
'dvb-tuner-si2158-a20-01.fw'
[   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
[   52.330784] si2168 2-0064: downloading firmware from file
'dvb-demod-si2168-a30-01.fw'
[   52.382145] si2168 2-0064: firmware download failed=-110

110 seems to mean connection timeout. Any pointers how to debug this further?

This is with the latest media_build from linuxtv.org on 3.17.4.

Jurgen


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-06 16:48 DVBSky T980C: Si2168 fw load failed Jurgen Kramer
@ 2014-12-06 18:29 ` Antti Palosaari
  2014-12-07  8:15   ` Jurgen Kramer
  0 siblings, 1 reply; 8+ messages in thread
From: Antti Palosaari @ 2014-12-06 18:29 UTC (permalink / raw)
  To: Jurgen Kramer, linux-media

On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
> On my new DVBSky T980C the tuner firmware failes to load:
> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> [   51.356233] si2168 2-0064: downloading firmware from file
> 'dvb-demod-si2168-a30-01.fw'
> [   51.408166] si2168 2-0064: firmware download failed=-110
> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
> in cold state
> [   51.521714] si2157 4-0060: downloading firmware from file
> 'dvb-tuner-si2158-a20-01.fw'
> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> [   52.330784] si2168 2-0064: downloading firmware from file
> 'dvb-demod-si2168-a30-01.fw'
> [   52.382145] si2168 2-0064: firmware download failed=-110
>
> 110 seems to mean connection timeout. Any pointers how to debug this further?
>
> This is with the latest media_build from linuxtv.org on 3.17.4.

Looks like si2168 firmware failed to download, but si2157 succeeded. 
Could you add some more time for driver timeout? Current timeout is 
selected by trial and error, lets say it takes always max 43ms for my 
device I coded it 50ms.


drivers/media/dvb-frontends/si2168.c
/* wait cmd execution terminate */
#define TIMEOUT 50

change it to
#define TIMEOUT 500

Also, if it does not work, could you enable debugs to see what happens?
rmmod si2168
modprobe si2168
echo -n 'module si2168 =pft' > /sys/kernel/debug/dynamic_debug/control

regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-06 18:29 ` Antti Palosaari
@ 2014-12-07  8:15   ` Jurgen Kramer
  2014-12-07 14:50     ` Antti Palosaari
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2014-12-07  8:15 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
> > On my new DVBSky T980C the tuner firmware failes to load:
> > [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> > [   51.356233] si2168 2-0064: downloading firmware from file
> > 'dvb-demod-si2168-a30-01.fw'
> > [   51.408166] si2168 2-0064: firmware download failed=-110
> > [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
> > in cold state
> > [   51.521714] si2157 4-0060: downloading firmware from file
> > 'dvb-tuner-si2158-a20-01.fw'
> > [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> > [   52.330784] si2168 2-0064: downloading firmware from file
> > 'dvb-demod-si2168-a30-01.fw'
> > [   52.382145] si2168 2-0064: firmware download failed=-110
> >
> > 110 seems to mean connection timeout. Any pointers how to debug this further?
> >
> > This is with the latest media_build from linuxtv.org on 3.17.4.
> 
> Looks like si2168 firmware failed to download, but si2157 succeeded. 
> Could you add some more time for driver timeout? Current timeout is 
> selected by trial and error, lets say it takes always max 43ms for my 
> device I coded it 50ms.
> 
> 
> drivers/media/dvb-frontends/si2168.c
> /* wait cmd execution terminate */
> #define TIMEOUT 50
> 
> change it to
> #define TIMEOUT 500

Thanks, with the larger timeout the fw load works:

[   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
state
[   56.972650] si2168 4-0064: downloading firmware from file
'dvb-demod-si2168-a30-01.fw'
[   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
state
[   60.110739] si2157 6-0060: found a 'Silicon Labs
Si2146/2147/2148/2157/2158' in cold state
[   60.123720] si2157 6-0060: downloading firmware from file
'dvb-tuner-si2158-a20-01.fw'

BTW Is there a way to switch between T/T2 and DVB-C mode? 

Regards,
Jurgen


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-07  8:15   ` Jurgen Kramer
@ 2014-12-07 14:50     ` Antti Palosaari
  2014-12-08  7:39       ` Jurgen Kramer
  0 siblings, 1 reply; 8+ messages in thread
From: Antti Palosaari @ 2014-12-07 14:50 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-media



On 12/07/2014 10:15 AM, Jurgen Kramer wrote:
> On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
>> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
>>> On my new DVBSky T980C the tuner firmware failes to load:
>>> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>> [   51.356233] si2168 2-0064: downloading firmware from file
>>> 'dvb-demod-si2168-a30-01.fw'
>>> [   51.408166] si2168 2-0064: firmware download failed=-110
>>> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
>>> in cold state
>>> [   51.521714] si2157 4-0060: downloading firmware from file
>>> 'dvb-tuner-si2158-a20-01.fw'
>>> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>> [   52.330784] si2168 2-0064: downloading firmware from file
>>> 'dvb-demod-si2168-a30-01.fw'
>>> [   52.382145] si2168 2-0064: firmware download failed=-110
>>>
>>> 110 seems to mean connection timeout. Any pointers how to debug this further?
>>>
>>> This is with the latest media_build from linuxtv.org on 3.17.4.
>>
>> Looks like si2168 firmware failed to download, but si2157 succeeded.
>> Could you add some more time for driver timeout? Current timeout is
>> selected by trial and error, lets say it takes always max 43ms for my
>> device I coded it 50ms.
>>
>>
>> drivers/media/dvb-frontends/si2168.c
>> /* wait cmd execution terminate */
>> #define TIMEOUT 50
>>
>> change it to
>> #define TIMEOUT 500
>
> Thanks, with the larger timeout the fw load works:
>
> [   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
> state
> [   56.972650] si2168 4-0064: downloading firmware from file
> 'dvb-demod-si2168-a30-01.fw'
> [   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
> state
> [   60.110739] si2157 6-0060: found a 'Silicon Labs
> Si2146/2147/2148/2157/2158' in cold state
> [   60.123720] si2157 6-0060: downloading firmware from file
> 'dvb-tuner-si2158-a20-01.fw'

Have to find out some suitable value. For that I need know how long it 
took maximum in your case. There is already dubug printing to print 
execution time of each command, but it is behind dynamic debug. Maybe 
the most easiest way is change that debug line to info:
drivers/media/dvb-frontends/si2168.c
-               dev_dbg(&s->client->dev, "cmd execution took %d ms\n",
+               dev_info(&s->client->dev, "cmd execution took %d ms\n",

and then compile and install and issue command:
$ dvb-fe-tool --set-delsys=DVBT2

After that is should print a lot of times to log, like:

si2168 6-0064: cmd execution took 1 ms
si2168 6-0064: cmd execution took 1 ms
si2168 6-0064: found a 'Silicon Labs Si2168' in cold state
si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
si2168 6-0064: cmd execution took 26 ms
si2168 6-0064: cmd execution took 1 ms

>
> BTW Is there a way to switch between T/T2 and DVB-C mode?

$ dvb-fe-tool --set-delsys=xxx

but maybe that does not change it permanently. It is application job to 
tell proper standard used.

regards
Antti


-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-07 14:50     ` Antti Palosaari
@ 2014-12-08  7:39       ` Jurgen Kramer
  2014-12-08  7:50         ` Antti Palosaari
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2014-12-08  7:39 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

On Sun, 2014-12-07 at 16:50 +0200, Antti Palosaari wrote:
> 
> On 12/07/2014 10:15 AM, Jurgen Kramer wrote:
> > On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
> >> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
> >>> On my new DVBSky T980C the tuner firmware failes to load:
> >>> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> >>> [   51.356233] si2168 2-0064: downloading firmware from file
> >>> 'dvb-demod-si2168-a30-01.fw'
> >>> [   51.408166] si2168 2-0064: firmware download failed=-110
> >>> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
> >>> in cold state
> >>> [   51.521714] si2157 4-0060: downloading firmware from file
> >>> 'dvb-tuner-si2158-a20-01.fw'
> >>> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> >>> [   52.330784] si2168 2-0064: downloading firmware from file
> >>> 'dvb-demod-si2168-a30-01.fw'
> >>> [   52.382145] si2168 2-0064: firmware download failed=-110
> >>>
> >>> 110 seems to mean connection timeout. Any pointers how to debug this further?
> >>>
> >>> This is with the latest media_build from linuxtv.org on 3.17.4.
> >>
> >> Looks like si2168 firmware failed to download, but si2157 succeeded.
> >> Could you add some more time for driver timeout? Current timeout is
> >> selected by trial and error, lets say it takes always max 43ms for my
> >> device I coded it 50ms.
> >>
> >>
> >> drivers/media/dvb-frontends/si2168.c
> >> /* wait cmd execution terminate */
> >> #define TIMEOUT 50
> >>
> >> change it to
> >> #define TIMEOUT 500
> >
> > Thanks, with the larger timeout the fw load works:
> >
> > [   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
> > state
> > [   56.972650] si2168 4-0064: downloading firmware from file
> > 'dvb-demod-si2168-a30-01.fw'
> > [   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
> > state
> > [   60.110739] si2157 6-0060: found a 'Silicon Labs
> > Si2146/2147/2148/2157/2158' in cold state
> > [   60.123720] si2157 6-0060: downloading firmware from file
> > 'dvb-tuner-si2158-a20-01.fw'
> 
> Have to find out some suitable value. For that I need know how long it 
> took maximum in your case. There is already dubug printing to print 
> execution time of each command, but it is behind dynamic debug. Maybe 
> the most easiest way is change that debug line to info:
> drivers/media/dvb-frontends/si2168.c
> -               dev_dbg(&s->client->dev, "cmd execution took %d ms\n",
> +               dev_info(&s->client->dev, "cmd execution took %d ms\n",
> 
> and then compile and install and issue command:

This gives the following results:
[   50.152281] si2168 4-0064: cmd execution took 0 ms
[   50.154007] si2168 4-0064: cmd execution took 1 ms
[   50.154010] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
state
[   50.181157] si2168 4-0064: downloading firmware from file
'dvb-demod-si2168-a30-01.fw'
[   50.233374] si2168 4-0064: cmd execution took 52 ms

[   53.300879] si2168 4-0064: cmd execution took 0 ms
[   53.300880] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
state
[   53.308282] si2157 6-0060: found a 'Silicon Labs
Si2146/2147/2148/2157/2158' in cold state
[   53.321085] si2157 6-0060: downloading firmware from file
'dvb-tuner-si2158-a20-01.fw'
[   54.152370] si2168 4-0064: cmd execution took 1 ms

So the initial timeout of 50ms is just missed. New value 60ms? or 75 to
be really safe.

> $ dvb-fe-tool --set-delsys=DVBT2
Thanks, dvb-fe-tool -a 2 -d dvbc/annex_a worked.

Regards,
Jurgen


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-08  7:39       ` Jurgen Kramer
@ 2014-12-08  7:50         ` Antti Palosaari
  2014-12-08  8:12           ` Jurgen Kramer
  0 siblings, 1 reply; 8+ messages in thread
From: Antti Palosaari @ 2014-12-08  7:50 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-media



On 12/08/2014 09:39 AM, Jurgen Kramer wrote:
> On Sun, 2014-12-07 at 16:50 +0200, Antti Palosaari wrote:
>>
>> On 12/07/2014 10:15 AM, Jurgen Kramer wrote:
>>> On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
>>>> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
>>>>> On my new DVBSky T980C the tuner firmware failes to load:
>>>>> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>>>> [   51.356233] si2168 2-0064: downloading firmware from file
>>>>> 'dvb-demod-si2168-a30-01.fw'
>>>>> [   51.408166] si2168 2-0064: firmware download failed=-110
>>>>> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
>>>>> in cold state
>>>>> [   51.521714] si2157 4-0060: downloading firmware from file
>>>>> 'dvb-tuner-si2158-a20-01.fw'
>>>>> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>>>> [   52.330784] si2168 2-0064: downloading firmware from file
>>>>> 'dvb-demod-si2168-a30-01.fw'
>>>>> [   52.382145] si2168 2-0064: firmware download failed=-110
>>>>>
>>>>> 110 seems to mean connection timeout. Any pointers how to debug this further?
>>>>>
>>>>> This is with the latest media_build from linuxtv.org on 3.17.4.
>>>>
>>>> Looks like si2168 firmware failed to download, but si2157 succeeded.
>>>> Could you add some more time for driver timeout? Current timeout is
>>>> selected by trial and error, lets say it takes always max 43ms for my
>>>> device I coded it 50ms.
>>>>
>>>>
>>>> drivers/media/dvb-frontends/si2168.c
>>>> /* wait cmd execution terminate */
>>>> #define TIMEOUT 50
>>>>
>>>> change it to
>>>> #define TIMEOUT 500
>>>
>>> Thanks, with the larger timeout the fw load works:
>>>
>>> [   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
>>> state
>>> [   56.972650] si2168 4-0064: downloading firmware from file
>>> 'dvb-demod-si2168-a30-01.fw'
>>> [   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
>>> state
>>> [   60.110739] si2157 6-0060: found a 'Silicon Labs
>>> Si2146/2147/2148/2157/2158' in cold state
>>> [   60.123720] si2157 6-0060: downloading firmware from file
>>> 'dvb-tuner-si2158-a20-01.fw'
>>
>> Have to find out some suitable value. For that I need know how long it
>> took maximum in your case. There is already dubug printing to print
>> execution time of each command, but it is behind dynamic debug. Maybe
>> the most easiest way is change that debug line to info:
>> drivers/media/dvb-frontends/si2168.c
>> -               dev_dbg(&s->client->dev, "cmd execution took %d ms\n",
>> +               dev_info(&s->client->dev, "cmd execution took %d ms\n",
>>
>> and then compile and install and issue command:
>
> This gives the following results:
> [   50.152281] si2168 4-0064: cmd execution took 0 ms
> [   50.154007] si2168 4-0064: cmd execution took 1 ms
> [   50.154010] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
> state
> [   50.181157] si2168 4-0064: downloading firmware from file
> 'dvb-demod-si2168-a30-01.fw'
> [   50.233374] si2168 4-0064: cmd execution took 52 ms
>
> [   53.300879] si2168 4-0064: cmd execution took 0 ms
> [   53.300880] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
> state
> [   53.308282] si2157 6-0060: found a 'Silicon Labs
> Si2146/2147/2148/2157/2158' in cold state
> [   53.321085] si2157 6-0060: downloading firmware from file
> 'dvb-tuner-si2158-a20-01.fw'
> [   54.152370] si2168 4-0064: cmd execution took 1 ms
>
> So the initial timeout of 50ms is just missed. New value 60ms? or 75 to
> be really safe.

70ms sounds nice for my me. Wanna make a patch? Or if it sounds too hard 
I could make it.

>> $ dvb-fe-tool --set-delsys=DVBT2
> Thanks, dvb-fe-tool -a 2 -d dvbc/annex_a worked.

regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-08  7:50         ` Antti Palosaari
@ 2014-12-08  8:12           ` Jurgen Kramer
  2014-12-08  8:20             ` Antti Palosaari
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2014-12-08  8:12 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

On Mon, 2014-12-08 at 09:50 +0200, Antti Palosaari wrote:
> 
> On 12/08/2014 09:39 AM, Jurgen Kramer wrote:
> > On Sun, 2014-12-07 at 16:50 +0200, Antti Palosaari wrote:
> >>
> >> On 12/07/2014 10:15 AM, Jurgen Kramer wrote:
> >>> On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
> >>>> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
> >>>>> On my new DVBSky T980C the tuner firmware failes to load:
> >>>>> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> >>>>> [   51.356233] si2168 2-0064: downloading firmware from file
> >>>>> 'dvb-demod-si2168-a30-01.fw'
> >>>>> [   51.408166] si2168 2-0064: firmware download failed=-110
> >>>>> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
> >>>>> in cold state
> >>>>> [   51.521714] si2157 4-0060: downloading firmware from file
> >>>>> 'dvb-tuner-si2158-a20-01.fw'
> >>>>> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
> >>>>> [   52.330784] si2168 2-0064: downloading firmware from file
> >>>>> 'dvb-demod-si2168-a30-01.fw'
> >>>>> [   52.382145] si2168 2-0064: firmware download failed=-110
> >>>>>
> >>>>> 110 seems to mean connection timeout. Any pointers how to debug this further?
> >>>>>
> >>>>> This is with the latest media_build from linuxtv.org on 3.17.4.
> >>>>
> >>>> Looks like si2168 firmware failed to download, but si2157 succeeded.
> >>>> Could you add some more time for driver timeout? Current timeout is
> >>>> selected by trial and error, lets say it takes always max 43ms for my
> >>>> device I coded it 50ms.
> >>>>
> >>>>
> >>>> drivers/media/dvb-frontends/si2168.c
> >>>> /* wait cmd execution terminate */
> >>>> #define TIMEOUT 50
> >>>>
> >>>> change it to
> >>>> #define TIMEOUT 500
> >>>
> >>> Thanks, with the larger timeout the fw load works:
> >>>
> >>> [   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
> >>> state
> >>> [   56.972650] si2168 4-0064: downloading firmware from file
> >>> 'dvb-demod-si2168-a30-01.fw'
> >>> [   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
> >>> state
> >>> [   60.110739] si2157 6-0060: found a 'Silicon Labs
> >>> Si2146/2147/2148/2157/2158' in cold state
> >>> [   60.123720] si2157 6-0060: downloading firmware from file
> >>> 'dvb-tuner-si2158-a20-01.fw'
> >>
> >> Have to find out some suitable value. For that I need know how long it
> >> took maximum in your case. There is already dubug printing to print
> >> execution time of each command, but it is behind dynamic debug. Maybe
> >> the most easiest way is change that debug line to info:
> >> drivers/media/dvb-frontends/si2168.c
> >> -               dev_dbg(&s->client->dev, "cmd execution took %d ms\n",
> >> +               dev_info(&s->client->dev, "cmd execution took %d ms\n",
> >>
> >> and then compile and install and issue command:
> >
> > This gives the following results:
> > [   50.152281] si2168 4-0064: cmd execution took 0 ms
> > [   50.154007] si2168 4-0064: cmd execution took 1 ms
> > [   50.154010] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
> > state
> > [   50.181157] si2168 4-0064: downloading firmware from file
> > 'dvb-demod-si2168-a30-01.fw'
> > [   50.233374] si2168 4-0064: cmd execution took 52 ms
> >
> > [   53.300879] si2168 4-0064: cmd execution took 0 ms
> > [   53.300880] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
> > state
> > [   53.308282] si2157 6-0060: found a 'Silicon Labs
> > Si2146/2147/2148/2157/2158' in cold state
> > [   53.321085] si2157 6-0060: downloading firmware from file
> > 'dvb-tuner-si2158-a20-01.fw'
> > [   54.152370] si2168 4-0064: cmd execution took 1 ms
> >
> > So the initial timeout of 50ms is just missed. New value 60ms? or 75 to
> > be really safe.
> 
> 70ms sounds nice for my me. Wanna make a patch? Or if it sounds too hard 
> I could make it.
No problem creating a patch (against
git://linuxtv.org/media_tree.git ?).
> 
Regards,
Jurgen



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: DVBSky T980C: Si2168 fw load failed
  2014-12-08  8:12           ` Jurgen Kramer
@ 2014-12-08  8:20             ` Antti Palosaari
  0 siblings, 0 replies; 8+ messages in thread
From: Antti Palosaari @ 2014-12-08  8:20 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-media



On 12/08/2014 10:12 AM, Jurgen Kramer wrote:
> On Mon, 2014-12-08 at 09:50 +0200, Antti Palosaari wrote:
>>
>> On 12/08/2014 09:39 AM, Jurgen Kramer wrote:
>>> On Sun, 2014-12-07 at 16:50 +0200, Antti Palosaari wrote:
>>>>
>>>> On 12/07/2014 10:15 AM, Jurgen Kramer wrote:
>>>>> On Sat, 2014-12-06 at 20:29 +0200, Antti Palosaari wrote:
>>>>>> On 12/06/2014 06:48 PM, Jurgen Kramer wrote:
>>>>>>> On my new DVBSky T980C the tuner firmware failes to load:
>>>>>>> [   51.326525] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>>>>>> [   51.356233] si2168 2-0064: downloading firmware from file
>>>>>>> 'dvb-demod-si2168-a30-01.fw'
>>>>>>> [   51.408166] si2168 2-0064: firmware download failed=-110
>>>>>>> [   51.415457] si2157 4-0060: found a 'Silicon Labs Si2146/2147/2148/2157/2158'
>>>>>>> in cold state
>>>>>>> [   51.521714] si2157 4-0060: downloading firmware from file
>>>>>>> 'dvb-tuner-si2158-a20-01.fw'
>>>>>>> [   52.330605] si2168 2-0064: found a 'Silicon Labs Si2168' in cold state
>>>>>>> [   52.330784] si2168 2-0064: downloading firmware from file
>>>>>>> 'dvb-demod-si2168-a30-01.fw'
>>>>>>> [   52.382145] si2168 2-0064: firmware download failed=-110
>>>>>>>
>>>>>>> 110 seems to mean connection timeout. Any pointers how to debug this further?
>>>>>>>
>>>>>>> This is with the latest media_build from linuxtv.org on 3.17.4.
>>>>>>
>>>>>> Looks like si2168 firmware failed to download, but si2157 succeeded.
>>>>>> Could you add some more time for driver timeout? Current timeout is
>>>>>> selected by trial and error, lets say it takes always max 43ms for my
>>>>>> device I coded it 50ms.
>>>>>>
>>>>>>
>>>>>> drivers/media/dvb-frontends/si2168.c
>>>>>> /* wait cmd execution terminate */
>>>>>> #define TIMEOUT 50
>>>>>>
>>>>>> change it to
>>>>>> #define TIMEOUT 500
>>>>>
>>>>> Thanks, with the larger timeout the fw load works:
>>>>>
>>>>> [   56.960982] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
>>>>> state
>>>>> [   56.972650] si2168 4-0064: downloading firmware from file
>>>>> 'dvb-demod-si2168-a30-01.fw'
>>>>> [   60.103509] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
>>>>> state
>>>>> [   60.110739] si2157 6-0060: found a 'Silicon Labs
>>>>> Si2146/2147/2148/2157/2158' in cold state
>>>>> [   60.123720] si2157 6-0060: downloading firmware from file
>>>>> 'dvb-tuner-si2158-a20-01.fw'
>>>>
>>>> Have to find out some suitable value. For that I need know how long it
>>>> took maximum in your case. There is already dubug printing to print
>>>> execution time of each command, but it is behind dynamic debug. Maybe
>>>> the most easiest way is change that debug line to info:
>>>> drivers/media/dvb-frontends/si2168.c
>>>> -               dev_dbg(&s->client->dev, "cmd execution took %d ms\n",
>>>> +               dev_info(&s->client->dev, "cmd execution took %d ms\n",
>>>>
>>>> and then compile and install and issue command:
>>>
>>> This gives the following results:
>>> [   50.152281] si2168 4-0064: cmd execution took 0 ms
>>> [   50.154007] si2168 4-0064: cmd execution took 1 ms
>>> [   50.154010] si2168 4-0064: found a 'Silicon Labs Si2168' in cold
>>> state
>>> [   50.181157] si2168 4-0064: downloading firmware from file
>>> 'dvb-demod-si2168-a30-01.fw'
>>> [   50.233374] si2168 4-0064: cmd execution took 52 ms
>>>
>>> [   53.300879] si2168 4-0064: cmd execution took 0 ms
>>> [   53.300880] si2168 4-0064: found a 'Silicon Labs Si2168' in warm
>>> state
>>> [   53.308282] si2157 6-0060: found a 'Silicon Labs
>>> Si2146/2147/2148/2157/2158' in cold state
>>> [   53.321085] si2157 6-0060: downloading firmware from file
>>> 'dvb-tuner-si2158-a20-01.fw'
>>> [   54.152370] si2168 4-0064: cmd execution took 1 ms
>>>
>>> So the initial timeout of 50ms is just missed. New value 60ms? or 75 to
>>> be really safe.
>>
>> 70ms sounds nice for my me. Wanna make a patch? Or if it sounds too hard
>> I could make it.
> No problem creating a patch (against
> git://linuxtv.org/media_tree.git ?).

Thats OK

Antti

>>
> Regards,
> Jurgen
>
>

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-08  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-06 16:48 DVBSky T980C: Si2168 fw load failed Jurgen Kramer
2014-12-06 18:29 ` Antti Palosaari
2014-12-07  8:15   ` Jurgen Kramer
2014-12-07 14:50     ` Antti Palosaari
2014-12-08  7:39       ` Jurgen Kramer
2014-12-08  7:50         ` Antti Palosaari
2014-12-08  8:12           ` Jurgen Kramer
2014-12-08  8:20             ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).