lkml.org 
[lkml]   [2009]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/8] SGI x86_64 UV: Limit the number of firmware messages
Limit number of firmware messages of the form:

[ 170.643130] firmware: requesting intel-ucode/06-2e-0

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mike Travis <travis@sgi.com>
---
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)
--


\
 
 \ /
  Last update: 2009-10-24 01:41    [W:0.038 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site