diff options
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/claw.h | 19 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/lcs.h | 16 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 29 |
4 files changed, 46 insertions, 20 deletions
diff --git a/drivers/s390/net/claw.h b/drivers/s390/net/claw.h index 1ee9a6f06541..1a89d989f348 100644 --- a/drivers/s390/net/claw.h +++ b/drivers/s390/net/claw.h | |||
@@ -114,11 +114,20 @@ do { \ | |||
114 | debug_event(claw_dbf_##name,level,(void*)(addr),len); \ | 114 | debug_event(claw_dbf_##name,level,(void*)(addr),len); \ |
115 | } while (0) | 115 | } while (0) |
116 | 116 | ||
117 | /* Allow to sort out low debug levels early to avoid wasted sprints */ | ||
118 | static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level) | ||
119 | { | ||
120 | return (level <= dbf_grp->level); | ||
121 | } | ||
122 | |||
117 | #define CLAW_DBF_TEXT_(level,name,text...) \ | 123 | #define CLAW_DBF_TEXT_(level,name,text...) \ |
118 | do { \ | 124 | do { \ |
119 | sprintf(debug_buffer, text); \ | 125 | if (claw_dbf_passes(claw_dbf_##name, level)) { \ |
120 | debug_text_event(claw_dbf_##name,level, debug_buffer);\ | 126 | sprintf(debug_buffer, text); \ |
121 | } while (0) | 127 | debug_text_event(claw_dbf_##name, level, \ |
128 | debug_buffer); \ | ||
129 | } \ | ||
130 | } while (0) | ||
122 | 131 | ||
123 | /******************************************************* | 132 | /******************************************************* |
124 | * Define Control Blocks * | 133 | * Define Control Blocks * |
@@ -278,8 +287,6 @@ struct claw_env { | |||
278 | __u16 write_size; /* write buffer size */ | 287 | __u16 write_size; /* write buffer size */ |
279 | __u16 dev_id; /* device ident */ | 288 | __u16 dev_id; /* device ident */ |
280 | __u8 packing; /* are we packing? */ | 289 | __u8 packing; /* are we packing? */ |
281 | volatile __u8 queme_switch; /* gate for imed packing */ | ||
282 | volatile unsigned long pk_delay; /* Delay for adaptive packing */ | ||
283 | __u8 in_use; /* device active flag */ | 290 | __u8 in_use; /* device active flag */ |
284 | struct net_device *ndev; /* backward ptr to the net dev*/ | 291 | struct net_device *ndev; /* backward ptr to the net dev*/ |
285 | }; | 292 | }; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 7bfe8d707a34..f51ed9972587 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -94,7 +94,7 @@ static int | |||
94 | lcs_register_debug_facility(void) | 94 | lcs_register_debug_facility(void) |
95 | { | 95 | { |
96 | lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8); | 96 | lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8); |
97 | lcs_dbf_trace = debug_register("lcs_trace", 2, 2, 8); | 97 | lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8); |
98 | if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) { | 98 | if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) { |
99 | PRINT_ERR("Not enough memory for debug facility.\n"); | 99 | PRINT_ERR("Not enough memory for debug facility.\n"); |
100 | lcs_unregister_debug_facility(); | 100 | lcs_unregister_debug_facility(); |
diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index 8976fb0b070a..d58fea52557d 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h | |||
@@ -16,11 +16,19 @@ do { \ | |||
16 | debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ | 16 | debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ |
17 | } while (0) | 17 | } while (0) |
18 | 18 | ||
19 | /* Allow to sort out low debug levels early to avoid wasted sprints */ | ||
20 | static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level) | ||
21 | { | ||
22 | return (level <= dbf_grp->level); | ||
23 | } | ||
24 | |||
19 | #define LCS_DBF_TEXT_(level,name,text...) \ | 25 | #define LCS_DBF_TEXT_(level,name,text...) \ |
20 | do { \ | 26 | do { \ |
21 | sprintf(debug_buffer, text); \ | 27 | if (lcs_dbf_passes(lcs_dbf_##name, level)) { \ |
22 | debug_text_event(lcs_dbf_##name,level, debug_buffer);\ | 28 | sprintf(debug_buffer, text); \ |
23 | } while (0) | 29 | debug_text_event(lcs_dbf_##name, level, debug_buffer); \ |
30 | } \ | ||
31 | } while (0) | ||
24 | 32 | ||
25 | /** | 33 | /** |
26 | * sysfs related stuff | 34 | * sysfs related stuff |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index f3d893cfe61d..874a19994489 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -97,12 +97,22 @@ MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); | |||
97 | 97 | ||
98 | DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); | 98 | DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); |
99 | 99 | ||
100 | #define IUCV_DBF_TEXT_(name,level,text...) \ | 100 | /* Allow to sort out low debug levels early to avoid wasted sprints */ |
101 | do { \ | 101 | static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level) |
102 | char* iucv_dbf_txt_buf = get_cpu_var(iucv_dbf_txt_buf); \ | 102 | { |
103 | sprintf(iucv_dbf_txt_buf, text); \ | 103 | return (level <= dbf_grp->level); |
104 | debug_text_event(iucv_dbf_##name,level,iucv_dbf_txt_buf); \ | 104 | } |
105 | put_cpu_var(iucv_dbf_txt_buf); \ | 105 | |
106 | #define IUCV_DBF_TEXT_(name, level, text...) \ | ||
107 | do { \ | ||
108 | if (iucv_dbf_passes(iucv_dbf_##name, level)) { \ | ||
109 | char* iucv_dbf_txt_buf = \ | ||
110 | get_cpu_var(iucv_dbf_txt_buf); \ | ||
111 | sprintf(iucv_dbf_txt_buf, text); \ | ||
112 | debug_text_event(iucv_dbf_##name, level, \ | ||
113 | iucv_dbf_txt_buf); \ | ||
114 | put_cpu_var(iucv_dbf_txt_buf); \ | ||
115 | } \ | ||
106 | } while (0) | 116 | } while (0) |
107 | 117 | ||
108 | #define IUCV_DBF_SPRINTF(name,level,text...) \ | 118 | #define IUCV_DBF_SPRINTF(name,level,text...) \ |
@@ -137,6 +147,7 @@ PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \ | |||
137 | #define PRINTK_HEADER " iucv: " /* for debugging */ | 147 | #define PRINTK_HEADER " iucv: " /* for debugging */ |
138 | 148 | ||
139 | static struct device_driver netiucv_driver = { | 149 | static struct device_driver netiucv_driver = { |
150 | .owner = THIS_MODULE, | ||
140 | .name = "netiucv", | 151 | .name = "netiucv", |
141 | .bus = &iucv_bus, | 152 | .bus = &iucv_bus, |
142 | }; | 153 | }; |
@@ -572,9 +583,9 @@ static void netiucv_callback_connres(struct iucv_path *path, u8 ipuser[16]) | |||
572 | } | 583 | } |
573 | 584 | ||
574 | /** | 585 | /** |
575 | * Dummy NOP action for all statemachines | 586 | * NOP action for statemachines |
576 | */ | 587 | */ |
577 | static void fsm_action_nop(fsm_instance *fi, int event, void *arg) | 588 | static void netiucv_action_nop(fsm_instance *fi, int event, void *arg) |
578 | { | 589 | { |
579 | } | 590 | } |
580 | 591 | ||
@@ -1110,7 +1121,7 @@ static const fsm_node dev_fsm[] = { | |||
1110 | 1121 | ||
1111 | { DEV_STATE_RUNNING, DEV_EVENT_STOP, dev_action_stop }, | 1122 | { DEV_STATE_RUNNING, DEV_EVENT_STOP, dev_action_stop }, |
1112 | { DEV_STATE_RUNNING, DEV_EVENT_CONDOWN, dev_action_conndown }, | 1123 | { DEV_STATE_RUNNING, DEV_EVENT_CONDOWN, dev_action_conndown }, |
1113 | { DEV_STATE_RUNNING, DEV_EVENT_CONUP, fsm_action_nop }, | 1124 | { DEV_STATE_RUNNING, DEV_EVENT_CONUP, netiucv_action_nop }, |
1114 | }; | 1125 | }; |
1115 | 1126 | ||
1116 | static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node); | 1127 | static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node); |