Hi,
I see this (or a similar fix) has not yet been included in 5.12-rc5.
Any further problems or comments regarding this patch? It still applies
cleanly to current git master and the problem is still relevant.
Best regards
Lukas
On 13/08/2020 23:45, Lukas Middendorf wrote:
even though request_firmware() is supposed to be safe to call during
resume, it might fail (or even hang the system) when the firmware
has not been loaded previously. Use firmware_request_cache() to
have it cached so it is available reliably on resume.
Signed-off-by: Lukas Middendorf <kernel@xxxxxxxxxxx>
---
drivers/media/dvb-frontends/si2168.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 14b93a7d3358..ea4b2d91697e 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -757,6 +757,17 @@ static int si2168_probe(struct i2c_client *client,
dev->version >> 24 & 0xff, dev->version >> 16 & 0xff,
dev->version >> 8 & 0xff, dev->version >> 0 & 0xff);
+ /* request caching of the firmware so it is available on resume after suspend.
+ * The actual caching of the firmware file only occurs during suspend
+ * The return value does not show whether the firmware file exists
+ */
+ ret = firmware_request_cache(&client->dev, dev->firmware_name);
+ if (ret) {
+ dev_err(&client->dev,
+ "firmware caching for '%s' failed\n",
+ dev->firmware_name);
+ }
+
return 0;
err_kfree:
kfree(dev);