Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1473073 > unrolled thread
| Started by | Daniel Wagner <wagi@monom.org> |
|---|---|
| First post | 2016-08-31 09:10 +0200 |
| Last post | 2016-09-02 20:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 5/5] firmware: fix fw cache to avoid usermode helper on suspend Daniel Wagner <wagi@monom.org> - 2016-08-31 09:10 +0200
Re: [PATCH v3 5/5] firmware: fix fw cache to avoid usermode helper on suspend "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-02 20:20 +0200
| From | Daniel Wagner <wagi@monom.org> |
|---|---|
| Date | 2016-08-31 09:10 +0200 |
| Subject | Re: [PATCH v3 5/5] firmware: fix fw cache to avoid usermode helper on suspend |
| Message-ID | <sc7OO-7Io-15@gated-at.bofh.it> |
Hi Luis,
On 08/24/2016 02:45 AM, mcgrof@kernel.org wrote:
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index 22d1760a4278..dca4f9cbf4db 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -1412,7 +1412,7 @@ static int cache_firmware(const char *fw_name)
>
> pr_debug("%s: %s\n", __func__, fw_name);
>
> - ret = request_firmware(&fw, fw_name, NULL);
> + ret = request_firmware_direct(&fw, fw_name, NULL);
> if (!ret)
> kfree(fw);
>
>
While you are at it you should kill this here as well:
@@ -1622,7 +1637,6 @@ static void __device_uncache_fw_images(void)
static void device_cache_fw_images(void)
{
struct firmware_cache *fwc = &fw_cache;
- int old_timeout;
DEFINE_WAIT(wait);
pr_debug("%s\n", __func__);
@@ -1630,17 +1644,6 @@ static void device_cache_fw_images(void)
/* cancel uncache work */
cancel_delayed_work_sync(&fwc->work);
- /*
- * use small loading timeout for caching devices' firmware
- * because all these firmware images have been loaded
- * successfully at lease once, also system is ready for
- * completing firmware loading now. The maximum size of
- * firmware in current distributions is about 2M bytes,
- * so 10 secs should be enough.
- */
- old_timeout = loading_timeout;
- loading_timeout = 10;
-
mutex_lock(&fw_lock);
fwc->state = FW_LOADER_START_CACHE;
dpm_for_each_dev(NULL, dev_cache_fw_image);
@@ -1648,8 +1651,6 @@ static void device_cache_fw_images(void)
/* wait for completion of caching firmware for all devices */
async_synchronize_full_domain(&fw_cache_domain);
-
- loading_timeout = old_timeout;
}
cheers,
daniel
[toc] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-09-02 20:20 +0200 |
| Subject | Re: [PATCH v3 5/5] firmware: fix fw cache to avoid usermode helper on suspend |
| Message-ID | <sd1ei-2Tg-27@gated-at.bofh.it> |
| In reply to | #1473073 |
On Wed, Aug 31, 2016 at 09:03:53AM +0200, Daniel Wagner wrote:
> Hi Luis,
>
> On 08/24/2016 02:45 AM, mcgrof@kernel.org wrote:
> >diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> >index 22d1760a4278..dca4f9cbf4db 100644
> >--- a/drivers/base/firmware_class.c
> >+++ b/drivers/base/firmware_class.c
> >@@ -1412,7 +1412,7 @@ static int cache_firmware(const char *fw_name)
> >
> > pr_debug("%s: %s\n", __func__, fw_name);
> >
> >- ret = request_firmware(&fw, fw_name, NULL);
> >+ ret = request_firmware_direct(&fw, fw_name, NULL);
> > if (!ret)
> > kfree(fw);
> >
> >
>
> While you are at it you should kill this here as well:
>
> @@ -1622,7 +1637,6 @@ static void __device_uncache_fw_images(void)
> static void device_cache_fw_images(void)
> {
> struct firmware_cache *fwc = &fw_cache;
> - int old_timeout;
> DEFINE_WAIT(wait);
>
> pr_debug("%s\n", __func__);
> @@ -1630,17 +1644,6 @@ static void device_cache_fw_images(void)
> /* cancel uncache work */
> cancel_delayed_work_sync(&fwc->work);
>
> - /*
> - * use small loading timeout for caching devices' firmware
> - * because all these firmware images have been loaded
> - * successfully at lease once, also system is ready for
> - * completing firmware loading now. The maximum size of
> - * firmware in current distributions is about 2M bytes,
> - * so 10 secs should be enough.
> - */
> - old_timeout = loading_timeout;
> - loading_timeout = 10;
> -
> mutex_lock(&fw_lock);
> fwc->state = FW_LOADER_START_CACHE;
> dpm_for_each_dev(NULL, dev_cache_fw_image);
> @@ -1648,8 +1651,6 @@ static void device_cache_fw_images(void)
>
> /* wait for completion of caching firmware for all devices */
> async_synchronize_full_domain(&fw_cache_domain);
> -
> - loading_timeout = old_timeout;
You're right, thanks!
Luis
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web