summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");
}