diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-09-02 18:36:05 -0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 02:55:50 -0400 |
commit | 4c2b1a11646bf74e2926ce8b13a21884adc1e05c (patch) | |
tree | 59cd5b59b21969264c6833b567b828484a6d76ed /drivers/net | |
parent | 4dc1bf074e4db5aa281a7b82ceebb24df98922d2 (diff) |
wimax: allow specifying debug levels as command line option
Add "debug" module options to all the wimax modules (including
drivers) so that the debug levels can be set upon kernel boot or
module load time.
This is needed as currently there was a limitation where the debug
levels could only be set when a device was succesfully
enumerated. This made it difficult to debug issues that made a device
not probe properly.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wimax/i2400m/driver.c | 10 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/sdio.c | 10 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/usb.c | 9 |
3 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 7ba00de5dd9b..e3b2c246cad7 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
@@ -90,6 +90,14 @@ MODULE_PARM_DESC(power_save_disabled, | |||
90 | "False by default (so the device is told to do power " | 90 | "False by default (so the device is told to do power " |
91 | "saving)."); | 91 | "saving)."); |
92 | 92 | ||
93 | static char i2400m_debug_params[128]; | ||
94 | module_param_string(debug, i2400m_debug_params, sizeof(i2400m_debug_params), | ||
95 | 0644); | ||
96 | MODULE_PARM_DESC(debug, | ||
97 | "String of space-separated NAME:VALUE pairs, where NAMEs " | ||
98 | "are the different debug submodules and VALUE are the " | ||
99 | "initial debug value to set."); | ||
100 | |||
93 | /** | 101 | /** |
94 | * i2400m_queue_work - schedule work on a i2400m's queue | 102 | * i2400m_queue_work - schedule work on a i2400m's queue |
95 | * | 103 | * |
@@ -794,6 +802,8 @@ size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | |||
794 | static | 802 | static |
795 | int __init i2400m_driver_init(void) | 803 | int __init i2400m_driver_init(void) |
796 | { | 804 | { |
805 | d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400m_debug_params, | ||
806 | "i2400m.debug"); | ||
797 | return 0; | 807 | return 0; |
798 | } | 808 | } |
799 | module_init(i2400m_driver_init); | 809 | module_init(i2400m_driver_init); |
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c index 7c1b843b63e9..2d2cc5ac6d86 100644 --- a/drivers/net/wimax/i2400m/sdio.c +++ b/drivers/net/wimax/i2400m/sdio.c | |||
@@ -71,6 +71,14 @@ | |||
71 | static int ioe_timeout = 2; | 71 | static int ioe_timeout = 2; |
72 | module_param(ioe_timeout, int, 0); | 72 | module_param(ioe_timeout, int, 0); |
73 | 73 | ||
74 | static char i2400ms_debug_params[128]; | ||
75 | module_param_string(debug, i2400ms_debug_params, sizeof(i2400ms_debug_params), | ||
76 | 0644); | ||
77 | MODULE_PARM_DESC(debug, | ||
78 | "String of space-separated NAME:VALUE pairs, where NAMEs " | ||
79 | "are the different debug submodules and VALUE are the " | ||
80 | "initial debug value to set."); | ||
81 | |||
74 | /* Our firmware file name list */ | 82 | /* Our firmware file name list */ |
75 | static const char *i2400ms_bus_fw_names[] = { | 83 | static const char *i2400ms_bus_fw_names[] = { |
76 | #define I2400MS_FW_FILE_NAME "i2400m-fw-sdio-1.3.sbcf" | 84 | #define I2400MS_FW_FILE_NAME "i2400m-fw-sdio-1.3.sbcf" |
@@ -559,6 +567,8 @@ struct sdio_driver i2400m_sdio_driver = { | |||
559 | static | 567 | static |
560 | int __init i2400ms_driver_init(void) | 568 | int __init i2400ms_driver_init(void) |
561 | { | 569 | { |
570 | d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400ms_debug_params, | ||
571 | "i2400m_sdio.debug"); | ||
562 | return sdio_register_driver(&i2400m_sdio_driver); | 572 | return sdio_register_driver(&i2400m_sdio_driver); |
563 | } | 573 | } |
564 | module_init(i2400ms_driver_init); | 574 | module_init(i2400ms_driver_init); |
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index a5879e21bbf3..063422290a43 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -71,6 +71,13 @@ | |||
71 | #define D_SUBMODULE usb | 71 | #define D_SUBMODULE usb |
72 | #include "usb-debug-levels.h" | 72 | #include "usb-debug-levels.h" |
73 | 73 | ||
74 | static char i2400mu_debug_params[128]; | ||
75 | module_param_string(debug, i2400mu_debug_params, sizeof(i2400mu_debug_params), | ||
76 | 0644); | ||
77 | MODULE_PARM_DESC(debug, | ||
78 | "String of space-separated NAME:VALUE pairs, where NAMEs " | ||
79 | "are the different debug submodules and VALUE are the " | ||
80 | "initial debug value to set."); | ||
74 | 81 | ||
75 | /* Our firmware file name */ | 82 | /* Our firmware file name */ |
76 | static const char *i2400mu_bus_fw_names[] = { | 83 | static const char *i2400mu_bus_fw_names[] = { |
@@ -633,6 +640,8 @@ struct usb_driver i2400mu_driver = { | |||
633 | static | 640 | static |
634 | int __init i2400mu_driver_init(void) | 641 | int __init i2400mu_driver_init(void) |
635 | { | 642 | { |
643 | d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400mu_debug_params, | ||
644 | "i2400m_usb.debug"); | ||
636 | return usb_register(&i2400mu_driver); | 645 | return usb_register(&i2400mu_driver); |
637 | } | 646 | } |
638 | module_init(i2400mu_driver_init); | 647 | module_init(i2400mu_driver_init); |