summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-27 22:20:33 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-27 22:20:33 +0000
commit3ec5ae46e4141845a1bce711d9fccd61ef7cb23f (patch)
tree3dbdf24c4472fe1744e7bcc667291cd3fd16fb0c /mdk-stage1
parentdb0a49905eb867bfe3462429492a6f809bc80fed (diff)
downloaddrakx-3ec5ae46e4141845a1bce711d9fccd61ef7cb23f.tar
drakx-3ec5ae46e4141845a1bce711d9fccd61ef7cb23f.tar.gz
drakx-3ec5ae46e4141845a1bce711d9fccd61ef7cb23f.tar.bz2
drakx-3ec5ae46e4141845a1bce711d9fccd61ef7cb23f.tar.xz
drakx-3ec5ae46e4141845a1bce711d9fccd61ef7cb23f.zip
wait only 1 second for firmware upload (not to hang boot with iwl3945, #37279)
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/modules.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c
index 2b55e5b75..5667256a9 100644
--- a/mdk-stage1/modules.c
+++ b/mdk-stage1/modules.c
@@ -39,6 +39,9 @@
#include "modules.h"
+#define FIRMWARE_TIMEOUT_FILE "/sys/class/firmware/timeout"
+#define FIRMWARE_TIMEOUT_VALUE "1"
+
static char modules_directory[100];
static struct module_deps_elem * modules_deps = NULL;
static struct module_descr_elem * modules_descr = NULL;
@@ -226,10 +229,21 @@ static int load_modules_descriptions(void)
return 0;
}
+static void init_firmware_timeout(void)
+{
+ int fd = open(FIRMWARE_TIMEOUT_FILE, O_WRONLY|O_TRUNC, 0666);
+ if (!fd) {
+ log_message("warning, unable to set firmware timeout");
+ return;
+ }
+ write(fd, FIRMWARE_TIMEOUT_VALUE, strlen(FIRMWARE_TIMEOUT_VALUE));
+ close(fd);
+}
void init_modules_insmoding(void)
{
find_modules_directory();
+ init_firmware_timeout();
if (load_modules_dependencies()) {
fatal_error("warning, error initing modules stuff, modules loading disabled");
}