[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-dvb
Subject:    Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm
From:       "Eduard Huguet" <eduardhc () gmail ! com>
Date:       2008-01-22 7:41:01
Message-ID: 617be8890801212341o5c66275aubb886ad2fd3a89d1 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


>
> ---------- Missatge reenviat ----------
> From: "Michael Krufky" < mkrufky@linuxtv.org>
> To: "Ivor Hewitt" <ivor@ivor.org>
> Date: Mon, 21 Jan 2008 15:45:31 -0500
> Subject: Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm
> state?
> On Jan 21, 2008 3:19 PM, Ivor Hewitt <ivor@ivor.org> wrote:
> > Hi,
> > I was having (still am! :) trouble with my nova-t 500 card and I wanted
> > a way to be able try a different firmware... but the current code only
> > loads in a cold state... and my "mythbackend" is pretty inaccessible, so
> > I made the attached change. This allows a module parameter of
> > "force_load_firmware" which causes the "cold state" logic to be used
> > when warm. Thought this might be a useful idea, it was handy for me
> anyway.
> >
> > Cheers,
> > Ivor
> >
> > -- snip --
> >
> >   /* DIB7070 generic */
> > diff -r 7564c110491e linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
> > --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c    Sun Jan 20
> > 09:13:44 2008 -0200
> > +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c    Mon Jan 21
> > 11:55:20 2008 +0000
> > @@ -25,6 +25,10 @@ static int dvb_usb_force_pid_filter_usag
> >   static int dvb_usb_force_pid_filter_usage;
> >   module_param_named(force_pid_filter_usage,
> > dvb_usb_force_pid_filter_usage, int, 0444);
> >   MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to
> > use a PID filter, if any (default: 0).");
> > +
> > +int dvb_usb_force_firmware;
> > +module_param_named(force_load_firmware, dvb_usb_force_firmware, int,
> 0444);
> > +MODULE_PARM_DESC(force_load_firmware, "force firmware loading even when
> > in warm state.");
> >
> >   static int dvb_usb_adapter_init(struct dvb_usb_device *d)
> >   {
> > @@ -230,7 +234,7 @@ int dvb_usb_device_init(struct usb_inter
> >                  return -ENODEV;
> >          }
> >
> > -       if (cold) {
> > +       if (cold||dvb_usb_force_firmware) {
> >                  info("found a '%s' in cold state, will try to load a
> > firmware",desc->name);
> >                  ret = dvb_usb_download_firmware(udev,props);
> >                  if (!props->no_reconnect || ret != 0)
>
>
> Doesn't this cause an endless loop?  How does the driver know when to
> stop uploading firmware?
>
> -Mike
>

I think that code executes once only at driver initialisation phase. That
means that now probably you'll be able to force a firmware reload by doing
"rmmod dvb-usb-dib0700; modprobe dvb-usb-dib0700", which is pretty good
IMHO. If so, that would solve a number of issues with this card that now
require a full power-off cycle (a reboot isn't enough to make the card
reload the firmware).

Please, correct me if I'm wrong...

Regards,
  Eduard

PS: sorry, forgot to change the topic title in the previous message.

[Attachment #5 (text/html)]

<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">---------- Missatge reenviat \
----------<br>From:&nbsp;&quot;Michael Krufky&quot; &lt;<a \
href="mailto:mkrufky@linuxtv.org" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">

mkrufky@linuxtv.org</a>&gt;<br>To:&nbsp;&quot;Ivor Hewitt&quot; &lt;<a \
href="mailto:ivor@ivor.org" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">ivor@ivor.org</a>&gt;<br>Date:&nbsp;Mon, 21 \
Jan 2008 15:45:31 -0500 <br>Subject:&nbsp;Re: [linux-dvb] [PATCH] allow dvb-usb \
firmware loading in warm state? <br>On Jan 21, 2008 3:19 PM, Ivor Hewitt &lt;<a \
href="mailto:ivor@ivor.org" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">ivor@ivor.org</a>&gt; wrote:<br>&gt; \
Hi,<br>&gt; I was having (still am! :) trouble with my nova-t 500 card and I wanted \
<br>&gt; a way to be able try a different firmware... but the current code \
only<br>&gt; loads in a cold state... and my &quot;mythbackend&quot; is pretty \
inaccessible, so<br>&gt; I made the attached change. This allows a module parameter \
of <br>&gt; &quot;force_load_firmware&quot; which causes the &quot;cold state&quot; \
logic to be used<br>&gt; when warm. Thought this might be a useful idea, it was handy \
for me anyway.<br>&gt;<br>&gt; Cheers,<br>&gt; Ivor<br>

&gt;<br>&gt; -- snip --<br>&gt;<br>&gt; &nbsp; /* DIB7070 generic */<br>&gt; diff -r \
7564c110491e linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c<br>&gt; --- \
a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c &nbsp; &nbsp;Sun Jan 20<br>&gt; \
09:13:44 2008 -0200 <br>&gt; +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c \
&nbsp; &nbsp;Mon Jan 21<br>&gt; 11:55:20 2008 +0000<br>&gt; @@ -25,6 +25,10 @@ static \
int dvb_usb_force_pid_filter_usag<br>&gt; &nbsp; static int \
dvb_usb_force_pid_filter_usage; <br>&gt; &nbsp; \
module_param_named(force_pid_filter_usage,<br>&gt; dvb_usb_force_pid_filter_usage, \
int, 0444);<br>&gt; &nbsp; MODULE_PARM_DESC(force_pid_filter_usage, &quot;force all \
dvb-usb-devices to<br>&gt; use a PID filter, if any (default: 0).&quot;); <br>&gt; \
+<br>&gt; +int dvb_usb_force_firmware;<br>&gt; \
+module_param_named(force_load_firmware, dvb_usb_force_firmware, int, 0444);<br>&gt; \
+MODULE_PARM_DESC(force_load_firmware, &quot;force firmware loading even when<br>

&gt; in warm state.&quot;);<br>&gt;<br>&gt; &nbsp; static int \
dvb_usb_adapter_init(struct dvb_usb_device *d)<br>&gt; &nbsp; {<br>&gt; @@ -230,7 \
+234,7 @@ int dvb_usb_device_init(struct usb_inter<br>&gt; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return -ENODEV; <br>&gt; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;}<br>&gt;<br>&gt; - &nbsp; &nbsp; &nbsp; if (cold) {<br>&gt; + \
&nbsp; &nbsp; &nbsp; if (cold||dvb_usb_force_firmware) {<br>&gt; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;info(&quot;found a &#39;%s&#39; in cold \
state, will try to load a<br>&gt; firmware&quot;,desc-&gt;name); <br>&gt; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ret = \
dvb_usb_download_firmware(udev,props);<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;if (!props-&gt;no_reconnect || ret != \
0)<br><br><br>Doesn&#39;t this cause an endless loop? &nbsp;How does the driver know \
when to <br>stop uploading firmware?<br><br>-Mike<br></blockquote></div><br>I think \
that code executes once only at driver initialisation phase. That means that now \
probably you&#39;ll be able to force a firmware reload by doing &quot;rmmod \
dvb-usb-dib0700; modprobe dvb-usb-dib0700&quot;, which is pretty good IMHO. If so, \
that would solve a number of issues with this card that now require a full power-off \
cycle (a reboot isn&#39;t enough to make the card reload the firmware). \
<br><br>Please, correct me if I&#39;m wrong...<br><br>Regards, <br><span \
class="sg">&nbsp; Eduard<br><br>PS: sorry, forgot to change the topic title in the \
previous message.<br><br> </span>



_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic