The cause of this issue is that request_firmware() blocks until the
firmware image is available. It makes a request via userspace, but at
the time of resume all userspace tasks are frozen and therefore it waits
and times out.

The solution is for drivers to use the request_firmware_nowait()
function instead and provide a call-back function that is notified when
the firmware request has completed that performs the firmware upload to
the device.

I'm working on a patch for r5u870 to confirm the solution.

This could prove to be an issue for many other drivers. A quick check
shows over a hundred instances of the use of request_firmware() and only
nine uses of request_firmware_nowait():

grep --exclude-dir=debian -rn 'request_firmware(&' * | wc -l
126

grep --exclude-dir=debian -rn 'request_firmware_nowait(' * | wc -l
9

-- 
request_firmware() fails on resume from suspend
https://bugs.launchpad.net/bugs/331415
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to