firmware: add firmware_request_cache() to help with cache on reboot
authorLuis R. Rodriguez <mcgrof@kernel.org>
Wed, 21 Mar 2018 22:34:29 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 17:33:26 +0000 (18:33 +0100)
commit5d42c96e1cf98bdfea18e7d32e5f6cf75aac93b9
tree2fc500c8568cb975a02ff63271590b472109b773
parentc6263a48459934c9d07153e6d7f0fa43462d8dd2
firmware: add firmware_request_cache() to help with cache on reboot

Some devices have an optimization in place to enable the firmware to
be retaineed during a system reboot, so after reboot the device can skip
requesting and loading the firmware. This can save up to 1s in load
time. The mt7601u 802.11 device happens to be such a device.

When these devices retain the firmware on a reboot and then suspend
they can miss looking for the firmware on resume. To help with this we
need a way to cache the firmware when such an optimization has taken
place.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/firmware/request_firmware.rst
drivers/base/firmware_loader/main.c
include/linux/firmware.h