]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/driver-core-fix-dynamic_debug-cmd-line-parameter.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / driver-core-fix-dynamic_debug-cmd-line-parameter.patch
1 From 113328306dbdfd5f146f257e447364dc66d025d4 Mon Sep 17 00:00:00 2001
2 From: Jason Baron <jbaron@redhat.com>
3 Date: Mon, 27 Oct 2008 12:05:14 -0400
4 Subject: Driver core: fix 'dynamic_debug' cmd line parameter
5 Patch-mainline: 2.6.28
6
7 From: Jason Baron <jbaron@redhat.com>
8
9 commit 113328306dbdfd5f146f257e447364dc66d025d4 upstream.
10
11 In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command
12 line 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
14 called (which initializes infrastructure). Fix this by setting setting the
15 state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also
16 cause all subsequent modules to have debugging automatically started, which is
17 probably the behavior we want.
18
19 Signed-off-by: Jason Baron <jbaron@redhat.com>
20 Signed-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 */