Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324377
b: refs/heads/master
c: ffe53f6
h: refs/heads/master
i:
  324375: cbcd075
v: v3
  • Loading branch information
Ming Lei authored and Greg Kroah-Hartman committed Aug 16, 2012
1 parent 4a935bf commit 463ddb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37276a51f803ef63be988e26293ac85188475556
refs/heads/master: ffe53f6f388a3aaa208e7c45065ce096d5d2f4e9
14 changes: 14 additions & 0 deletions trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,22 @@ static void device_cache_fw_images(void)
{
struct firmware_cache *fwc = &fw_cache;
struct device *dev;
int old_timeout;
DEFINE_WAIT(wait);

pr_debug("%s\n", __func__);

/*
* 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;

device_pm_lock();
list_for_each_entry(dev, &dpm_list, power.entry)
dev_cache_fw_image(dev);
Expand All @@ -1171,6 +1183,8 @@ static void device_cache_fw_images(void)
}
spin_unlock(&fwc->name_lock);
finish_wait(&fwc->wait_queue, &wait);

loading_timeout = old_timeout;
}

/**
Expand Down

0 comments on commit 463ddb4

Please sign in to comment.