[PATCH 5/8] SGI x86_64 UV: Limit the number of firmware messages
From: Mike Travis
Date: Fri Oct 23 2009 - 19:38:07 EST
Limit number of firmware messages of the form:
[ 170.643130] firmware: requesting intel-ucode/06-2e-0
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Cc: Ming Lei <tom.leiming@xxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: David Woodhouse <David.Woodhouse@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Mike Travis <travis@xxxxxxx>
---
drivers/base/firmware_class.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- linux.orig/drivers/base/firmware_class.c
+++ linux/drivers/base/firmware_class.c
@@ -471,6 +471,7 @@
struct firmware *firmware;
struct builtin_fw *builtin;
int retval;
+ static int msgcnt;
if (!firmware_p)
return -EINVAL;
@@ -494,8 +495,10 @@
return 0;
}
- if (uevent)
+ if (uevent && (msgcnt < 4 || !limit_console_output(false))) {
dev_info(device, "firmware: requesting %s\n", name);
+ msgcnt++;
+ }
retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
if (retval)
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/