]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/driver-core-fix-dynamic_debug-cmd-line-parameter.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / driver-core-fix-dynamic_debug-cmd-line-parameter.patch
CommitLineData
2cb7cef9
BS
1From 113328306dbdfd5f146f257e447364dc66d025d4 Mon Sep 17 00:00:00 2001
2From: Jason Baron <jbaron@redhat.com>
3Date: Mon, 27 Oct 2008 12:05:14 -0400
4Subject: Driver core: fix 'dynamic_debug' cmd line parameter
5Patch-mainline: 2.6.28
6
7From: Jason Baron <jbaron@redhat.com>
8
9commit 113328306dbdfd5f146f257e447364dc66d025d4 upstream.
10
11In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command
12line didn't activate the debug code. The problem is that dynamic_printk_setup()
13(which activates the debugging) is being called before dynamic_printk_init() is
14called (which initializes infrastructure). Fix this by setting setting the
15state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also
16cause all subsequent modules to have debugging automatically started, which is
17probably the behavior we want.
18
19Signed-off-by: Jason Baron <jbaron@redhat.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21
22---
23 lib/dynamic_printk.c | 4 +++-
24 1 file changed, 3 insertions(+), 1 deletion(-)
25
26--- a/lib/dynamic_printk.c
27+++ b/lib/dynamic_printk.c
28@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(vo
29 iter->logical_modname,
30 iter->flag_names, iter->hash, iter->hash2);
31 }
32+ if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
33+ set_all(true);
34 return 0;
35 }
36 module_init(dynamic_printk_init);
37@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(c
38 {
39 if (str)
40 return -ENOENT;
41- set_all(true);
42+ dynamic_enabled = DYNAMIC_ENABLED_ALL;
43 return 0;
44 }
45 /* Use early_param(), so we can get debug output as early as possible */