From: "Thomas Bächler" <thomas@archlinux.org>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] Fix error reporting on missing firmware files
Date: Sun, 31 Jan 2010 12:49:02 +0000 [thread overview]
Message-ID: <1264942142-4743-1-git-send-email-thomas@archlinux.org> (raw)
The new firmware loader does not report an error to the kernel if a firmware file
is missing. This results in modprobe stalling for 60 seconds for each firmware
a module tries to load.
---
| 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--git a/extras/firmware/firmware.c b/extras/firmware/firmware.c
index 8f70be4..16455de 100644
--- a/extras/firmware/firmware.c
+++ b/extras/firmware/firmware.c
@@ -149,6 +149,7 @@ int main(int argc, char **argv)
util_path_encode(firmware, fwencpath, sizeof(fwencpath));
util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL);
+ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL);
if (fwfile = NULL) {
int err;
@@ -166,6 +167,7 @@ int main(int argc, char **argv)
udev_selinux_resetfscreatecon(udev);
} while (err = -ENOENT);
rc = 2;
+ set_loading(udev, loadpath, "-1");
goto exit;
}
@@ -176,7 +178,6 @@ int main(int argc, char **argv)
if (unlink(misspath) = 0)
util_delete_path(udev, misspath);
- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL);
set_loading(udev, loadpath, "1");
util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL);
--
1.6.6.1
next reply other threads:[~2010-01-31 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-31 12:49 Thomas Bächler [this message]
2010-01-31 22:59 ` [PATCH] Fix error reporting on missing firmware files Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264942142-4743-1-git-send-email-thomas@archlinux.org \
--to=thomas@archlinux.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.