[lkml]   [2003]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: request_firmware() hotplug interface, third round.

> How it works:
> - Driver calls request_firmware()
> - 'hotplug firmware' gets called with ACCTION=add
> - /sysfs/class/firmware/dev_name/{data,loading} show up.
> - echo 1 > /sysfs/class/firmware/dev_name/loading
> - cat whatever_fw > /sysfs/class/firmware/dev_name/data
> - echo 0 > /sysfs/class/firmware/dev_name/loading
> - The call to request_firmware() returns with the firmware in a
> memory buffer and the driver can finish loading.
> - Driver loads the firmware.
> - Driver calls release_firmware().

So, if I understand you correctly, RAM is only saved if a device
is hotpluggable and needs firmware only upon intial connection.
Which, if you do suspend to disk correctly, is no device.

And do I understand you correctly, you propose that request_firmware()
wait for the hotplug script to write the firmware to sysfs?
That means that request_firmware() is unusuable from the usual
probe() methods. You cannot kill a part of the kernel if a script
fails to perform correctly for some reason. Even worse, you
cannot detect the script terminating abnormally in that design.
You'd have to introduce some arbitrary timeout.

It seems to me that you introduce three new problems to get rid of
one old problem.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.143 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site