aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/netiucv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/netiucv.c')
-rw-r--r--drivers/s390/net/netiucv.c29
1 files changed, 20 insertions, 9 deletions
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
98DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); 98DECLARE_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 { \ 101static 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
139static struct device_driver netiucv_driver = { 149static 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 */
577static void fsm_action_nop(fsm_instance *fi, int event, void *arg) 588static 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
1116static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node); 1127static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node);