[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1343149213-10160-13-git-send-email-ming.lei@canonical.com>
Date: Wed, 25 Jul 2012 01:00:12 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Borislav Petkov <borislav.petkov@....com>,
linux-kernel@...r.kernel.org, Ming Lei <ming.lei@...onical.com>
Subject: [RFC PATCH 12/13] driver core: firmware loader: use small timeout for cache device firmware
Because device_cache_firmwares only cache the firmware which has been
loaded sucessfully at leat once, using a small loading timeout should
be OK.
Signed-off-by: Ming Lei <ming.lei@...onical.com>
---
drivers/base/firmware_class.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7a96e75..0918b26 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1130,10 +1130,19 @@ static void device_cache_firmwares(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 devces firmwares
+ * because all these firmwares have been loaded successfully
+ * at lease once
+ */
+ old_timeout = loading_timeout;
+ loading_timeout = 10;
+
device_pm_lock();
list_for_each_entry(dev, &dpm_list, power.entry)
dev_cache_firmware(dev);
@@ -1157,6 +1166,8 @@ static void device_cache_firmwares(void)
}
spin_unlock(&fwc->name_lock);
finish_wait(&fwc->wait_queue, &wait);
+
+ loading_timeout = old_timeout;
}
/**
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists