Messages in this thread | | | Date | Tue, 3 Jan 2012 00:42:20 +0000 | From | Alan Cox <> | Subject | Re: loading firmware while usermodehelper disabled. |
| |
> Can we tell by the USB ids that this is a device that might need > firmware and load it into memory anyway - it would use more memory but > would always work as we would have the firmware.
Only by wasting a lot of memory in some cases. For the majority of cases however yes you can take a good guess that id X might need firmware Y and the firmware will only be a few K.
In that case however you don't want some generic firmware module knowing all this crap, your driver can just request_firmware() the stuff as modprobe and free it up on the module unload. For a typical 8bit firmware of a few K you'll free a ton more memory unloading the module than the firmware ! That I think actually covers the majority of devices under discussion.
For the giant-firmware cases, it's unworkable on small devices - but they are special cases anyway and almost entirely video - so not currently ones that cause a problem unless you are doing RFC4824 in which case your nearest asylum should be consulted.
Alan
| |