Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
On Tue, Jan 22, 2008 at 09:17:45AM +0100, Patrick Boettcher wrote: > Hi Ivor, > > how sure are you that really the new firmware was downloaded? > > It is not possible to download another firmware, once a firwmare was > downloaded. Meaning you cannot stop the firmware running already, it will > simply continue to run. When the new firmware downloaded is only slightly > different it may not crash, otherwise it will simply stop to work. > > So your patch enables something which was meant to be not there because of > hardware limitations. > Ahhh right, many thanks for the info. Cheers, Ivor. ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
Hi Ivor, how sure are you that really the new firmware was downloaded? It is not possible to download another firmware, once a firwmare was downloaded. Meaning you cannot stop the firmware running already, it will simply continue to run. When the new firmware downloaded is only slightly different it may not crash, otherwise it will simply stop to work. So your patch enables something which was meant to be not there because of hardware limitations. Patrick. On Mon, 21 Jan 2008, Ivor Hewitt 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.cSun Jan 20 > 09:13:44 2008 -0200 > +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.cMon Jan 21 > 11:55:20 2008 + > @@ -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) > > > > > ___ > linux-dvb mailing list > linux-dvb@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb > ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
> > -- Missatge reenviat -- > From: "Michael Krufky" < [EMAIL PROTECTED]> > To: "Ivor Hewitt" <[EMAIL PROTECTED]> > 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 <[EMAIL PROTECTED]> 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.cSun Jan 20 > > 09:13:44 2008 -0200 > > +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.cMon Jan 21 > > 11:55:20 2008 + > > @@ -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. ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
Michael Krufky wrote: > Doesn't this cause an endless loop? How does the driver know when to > stop uploading firmware? > > -Mike > (oops hit reply, not reply all, resending) I don't think so unless I've really missed something obvious (happens). Isn't that device_init just called once at device startup? Cheers Ivor. ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
On Jan 21, 2008 3:19 PM, Ivor Hewitt <[EMAIL PROTECTED]> 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.cSun Jan 20 > 09:13:44 2008 -0200 > +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.cMon Jan 21 > 11:55:20 2008 + > @@ -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 ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
[linux-dvb] [PATCH] allow dvb-usb firmware loading in warm state?
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.cSun Jan 20 09:13:44 2008 -0200 +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.cMon Jan 21 11:55:20 2008 + @@ -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) ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb