12 Oct 14:18
[PATCH RFC] provide information whether requested firmware is bult-in
From: Andrey Borzenkov <arvidjaar <at> mail.ru>
Subject: [PATCH RFC] provide information whether requested firmware is bult-in
Newsgroups: gmane.linux.power-management.general
Date: 2008-10-12 12:18:46 GMT
Subject: [PATCH RFC] provide information whether requested firmware is bult-in
Newsgroups: gmane.linux.power-management.general
Date: 2008-10-12 12:18:46 GMT
As indicated by several threads on lkml, currently the only safe way to reload external firmware in resume method is to cache it in memory. In this case if firmware was already built in, we just create useless copy. The patch suggests framework which can be used to return information whether firmware was loaded dynamically or already available in memory. Requestor can check it to decide whether local copy is required. Alternative would be request_cached_firwmare() function to manage cache in one place. Comments? Is there any other reliable way to ensure firmware can be loaded on resume? -andrey diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c9c92b0..525561a 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -415,6 +415,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name, name); firmware->size = builtin->size; firmware->data = builtin->data; + firmware->flags |= FW_FL_BUILTIN; return 0; } @@ -491,13 +492,8 @@ release_firmware(const struct firmware *fw) struct builtin_fw *builtin;(Continue reading)
RSS Feed