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