On 19/02/18 07:55, Jakub Kicinski wrote:
On Sat, 17 Feb 2018 13:23:29 +0200, cantabile wrote:
Thanks for the info.  Would it be cleaner to EXPORT fw_add_devm_name()
and just call that in case driver sees FW is already loaded?  That
should inform the fw subsystem that we want the image around in case of
hibernation, but there is no need to load it immediately?

No, I don't believe it's cleaner to expose a private function that you
don't even really need. Remember that calling request_firmware every
time your driver's probe and resume functions are called is normal. It's
the expected behaviour.

I'm asking you the extend functionality of a subsystem to be able to
cleanly communicate the intent.  Not export internal functions.

Requesting firmware you don't need and risking failing probe even if FW
is already pre-loaded is not correct.  Reordering you suggest is
brittle and makes little logical sense unless someone guesses your use
case.

Please at least try to do as advised.  Otherwise:

Nacked-by: Jakub Kicinski <kubak...@wp.pl>


You're right about the reordering not making sense to someone unfamiliar with the problem. I can fix that with a comment.

I can change the patch so that request_firmware will only make the probe function fail if the firmware is not already running.

If that's not satisfactory, I will try to do what you suggested. (The lack of comment from mcg...@kernel.org doesn't look promising, but maybe I'm just impatient.)

Reply via email to