diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch b/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch new file mode 100644 index 000000000..266688652 --- /dev/null +++ b/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch @@ -0,0 +1,70 @@ +From: Ben Hutchings <ben@decadent.org.uk> +Subject: firmware_class: Log every success and failure against given device +Date: Sun, 09 Dec 2012 16:02:00 +0000 +Forwarded: no + +The hundreds of users of request_firmware() have nearly as many +different log formats for reporting failures. They also have only the +vaguest hint as to what went wrong; only firmware_class really knows +that. Therefore, add specific log messages for the failure modes that +aren't currently logged. + +In case of a driver that tries multiple names, this may result in the +impression that it failed to initialise. Therefore, also log successes. + +This makes many error messages in drivers redundant, which will be +removed in later patches. + +This does not cover the case where we fall back to a user-mode helper +(which is no longer enabled in Debian). + +NOTE: hw-detect will depend on the "firmware: failed to load %s (%d)\n" +format to detect missing firmware. +--- +Index: linux/drivers/base/firmware_loader/main.c +=================================================================== +--- linux.orig/drivers/base/firmware_loader/main.c ++++ linux/drivers/base/firmware_loader/main.c +@@ -328,21 +328,22 @@ fw_get_filesystem_firmware(struct device + rc = kernel_read_file_from_path(path, &fw_priv->data, &size, + msize, id); + if (rc) { +- if (rc == -ENOENT) +- dev_dbg(device, "loading %s failed with error %d\n", +- path, rc); +- else +- dev_warn(device, "loading %s failed with error %d\n", +- path, rc); ++ dev_dbg(device, "loading %s failed with error %d\n", ++ path, rc); + continue; + } +- dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name); ++ dev_info(device, "firmware: direct-loading firmware %s\n", ++ fw_priv->fw_name); + fw_priv->size = size; + fw_state_done(fw_priv); + break; + } + __putname(path); + ++ if (rc) ++ dev_err(device, "firmware: failed to load %s (%d)\n", ++ fw_priv->fw_name, rc); ++ + return rc; + } + +Index: linux/drivers/base/firmware_loader/fallback.c +=================================================================== +--- linux.orig/drivers/base/firmware_loader/fallback.c ++++ linux/drivers/base/firmware_loader/fallback.c +@@ -604,7 +604,7 @@ static int fw_load_from_user_helper(stru + if (opt_flags & FW_OPT_NOWAIT) { + timeout = usermodehelper_read_lock_wait(timeout); + if (!timeout) { +- dev_dbg(device, "firmware: %s loading timed out\n", ++ dev_err(device, "firmware: %s loading timed out\n", + name); + return -EBUSY; + } |