aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/char/tty3270.c15
-rw-r--r--drivers/s390/cio/blacklist.c323
-rw-r--r--drivers/s390/cio/cio.c39
-rw-r--r--drivers/s390/cio/cio.h2
-rw-r--r--drivers/s390/cio/cio_debug.h6
-rw-r--r--drivers/s390/cio/css.c4
-rw-r--r--drivers/s390/cio/device.c25
-rw-r--r--drivers/s390/cio/device_fsm.c44
-rw-r--r--drivers/s390/cio/device_id.c4
-rw-r--r--drivers/s390/cio/device_pgid.c12
-rw-r--r--drivers/s390/s390mach.c3
11 files changed, 231 insertions, 246 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index c1f2adefad41..5043150019ac 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -965,8 +965,7 @@ tty3270_write_room(struct tty_struct *tty)
965 * Insert character into the screen at the current position with the 965 * Insert character into the screen at the current position with the
966 * current color and highlight. This function does NOT do cursor movement. 966 * current color and highlight. This function does NOT do cursor movement.
967 */ 967 */
968static int 968static void tty3270_put_character(struct tty3270 *tp, char ch)
969tty3270_put_character(struct tty3270 *tp, char ch)
970{ 969{
971 struct tty3270_line *line; 970 struct tty3270_line *line;
972 struct tty3270_cell *cell; 971 struct tty3270_cell *cell;
@@ -986,7 +985,6 @@ tty3270_put_character(struct tty3270 *tp, char ch)
986 cell->character = tp->view.ascebc[(unsigned int) ch]; 985 cell->character = tp->view.ascebc[(unsigned int) ch];
987 cell->highlight = tp->highlight; 986 cell->highlight = tp->highlight;
988 cell->f_color = tp->f_color; 987 cell->f_color = tp->f_color;
989 return 1;
990} 988}
991 989
992/* 990/*
@@ -1612,16 +1610,15 @@ tty3270_write(struct tty_struct * tty,
1612/* 1610/*
1613 * Put single characters to the ttys character buffer 1611 * Put single characters to the ttys character buffer
1614 */ 1612 */
1615static void 1613static int tty3270_put_char(struct tty_struct *tty, unsigned char ch)
1616tty3270_put_char(struct tty_struct *tty, unsigned char ch)
1617{ 1614{
1618 struct tty3270 *tp; 1615 struct tty3270 *tp;
1619 1616
1620 tp = tty->driver_data; 1617 tp = tty->driver_data;
1621 if (!tp) 1618 if (!tp || tp->char_count >= TTY3270_CHAR_BUF_SIZE)
1622 return; 1619 return 0;
1623 if (tp->char_count < TTY3270_CHAR_BUF_SIZE) 1620 tp->char_buf[tp->char_count++] = ch;
1624 tp->char_buf[tp->char_count++] = ch; 1621 return 1;
1625} 1622}
1626 1623
1627/* 1624/*
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 40ef948fcb3a..9c21b8f43f9b 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -19,6 +19,7 @@
19 19
20#include <asm/cio.h> 20#include <asm/cio.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22#include <asm/cio.h>
22 23
23#include "blacklist.h" 24#include "blacklist.h"
24#include "cio.h" 25#include "cio.h"
@@ -43,164 +44,169 @@ typedef enum {add, free} range_action;
43 * Function: blacklist_range 44 * Function: blacklist_range
44 * (Un-)blacklist the devices from-to 45 * (Un-)blacklist the devices from-to
45 */ 46 */
46static void 47static int blacklist_range(range_action action, unsigned int from_ssid,
47blacklist_range (range_action action, unsigned int from, unsigned int to, 48 unsigned int to_ssid, unsigned int from,
48 unsigned int ssid) 49 unsigned int to, int msgtrigger)
49{ 50{
50 if (!to) 51 if ((from_ssid > to_ssid) || ((from_ssid == to_ssid) && (from > to))) {
51 to = from; 52 if (msgtrigger)
52 53 printk(KERN_WARNING "cio: Invalid cio_ignore range "
53 if (from > to || to > __MAX_SUBCHANNEL || ssid > __MAX_SSID) { 54 "0.%x.%04x-0.%x.%04x\n", from_ssid, from,
54 printk (KERN_WARNING "cio: Invalid blacklist range " 55 to_ssid, to);
55 "0.%x.%04x to 0.%x.%04x, skipping\n", 56 return 1;
56 ssid, from, ssid, to);
57 return;
58 } 57 }
59 for (; from <= to; from++) { 58
59 while ((from_ssid < to_ssid) || ((from_ssid == to_ssid) &&
60 (from <= to))) {
60 if (action == add) 61 if (action == add)
61 set_bit (from, bl_dev[ssid]); 62 set_bit(from, bl_dev[from_ssid]);
62 else 63 else
63 clear_bit (from, bl_dev[ssid]); 64 clear_bit(from, bl_dev[from_ssid]);
65 from++;
66 if (from > __MAX_SUBCHANNEL) {
67 from_ssid++;
68 from = 0;
69 }
64 } 70 }
71
72 return 0;
65} 73}
66 74
67/* 75static int pure_hex(char **cp, unsigned int *val, int min_digit,
68 * Function: blacklist_busid 76 int max_digit, int max_val)
69 * Get devno/busid from given string.
70 * Shamelessly grabbed from dasd_devmap.c.
71 */
72static int
73blacklist_busid(char **str, int *id0, int *ssid, int *devno)
74{ 77{
75 int val, old_style; 78 int diff;
76 char *sav; 79 unsigned int value;
77 80
78 sav = *str; 81 diff = 0;
82 *val = 0;
79 83
80 /* check for leading '0x' */ 84 while (isxdigit(**cp) && (diff <= max_digit)) {
81 old_style = 0; 85
82 if ((*str)[0] == '0' && (*str)[1] == 'x') { 86 if (isdigit(**cp))
83 *str += 2; 87 value = **cp - '0';
84 old_style = 1; 88 else
85 } 89 value = tolower(**cp) - 'a' + 10;
86 if (!isxdigit((*str)[0])) /* We require at least one hex digit */ 90 *val = *val * 16 + value;
87 goto confused; 91 (*cp)++;
88 val = simple_strtoul(*str, str, 16); 92 diff++;
89 if (old_style || (*str)[0] != '.') {
90 *id0 = *ssid = 0;
91 if (val < 0 || val > 0xffff)
92 goto confused;
93 *devno = val;
94 if ((*str)[0] != ',' && (*str)[0] != '-' &&
95 (*str)[0] != '\n' && (*str)[0] != '\0')
96 goto confused;
97 return 0;
98 } 93 }
99 /* New style x.y.z busid */ 94
100 if (val < 0 || val > 0xff) 95 if ((diff < min_digit) || (diff > max_digit) || (*val > max_val))
101 goto confused; 96 return 1;
102 *id0 = val; 97
103 (*str)++;
104 if (!isxdigit((*str)[0])) /* We require at least one hex digit */
105 goto confused;
106 val = simple_strtoul(*str, str, 16);
107 if (val < 0 || val > 0xff || (*str)++[0] != '.')
108 goto confused;
109 *ssid = val;
110 if (!isxdigit((*str)[0])) /* We require at least one hex digit */
111 goto confused;
112 val = simple_strtoul(*str, str, 16);
113 if (val < 0 || val > 0xffff)
114 goto confused;
115 *devno = val;
116 if ((*str)[0] != ',' && (*str)[0] != '-' &&
117 (*str)[0] != '\n' && (*str)[0] != '\0')
118 goto confused;
119 return 0; 98 return 0;
120confused:
121 strsep(str, ",\n");
122 printk(KERN_WARNING "cio: Invalid cio_ignore parameter '%s'\n", sav);
123 return 1;
124} 99}
125 100
126static int 101static int parse_busid(char *str, int *cssid, int *ssid, int *devno,
127blacklist_parse_parameters (char *str, range_action action) 102 int msgtrigger)
128{ 103{
129 int from, to, from_id0, to_id0, from_ssid, to_ssid; 104 char *str_work;
130 105 int val, rc, ret;
131 while (*str != 0 && *str != '\n') { 106
132 range_action ra = action; 107 rc = 1;
133 while(*str == ',') 108
134 str++; 109 if (*str == '\0')
135 if (*str == '!') { 110 goto out;
136 ra = !action; 111
137 ++str; 112 /* old style */
113 str_work = str;
114 val = simple_strtoul(str, &str_work, 16);
115
116 if (*str_work == '\0') {
117 if (val <= __MAX_SUBCHANNEL) {
118 *devno = val;
119 *ssid = 0;
120 *cssid = 0;
121 rc = 0;
138 } 122 }
123 goto out;
124 }
139 125
140 /* 126 /* new style */
141 * Since we have to parse the proc commands and the 127 str_work = str;
142 * kernel arguments we have to check four cases 128 ret = pure_hex(&str_work, cssid, 1, 2, __MAX_CSSID);
143 */ 129 if (ret || (str_work[0] != '.'))
144 if (strncmp(str,"all,",4) == 0 || strcmp(str,"all") == 0 || 130 goto out;
145 strncmp(str,"all\n",4) == 0 || strncmp(str,"all ",4) == 0) { 131 str_work++;
146 int j; 132 ret = pure_hex(&str_work, ssid, 1, 1, __MAX_SSID);
147 133 if (ret || (str_work[0] != '.'))
148 str += 3; 134 goto out;
149 for (j=0; j <= __MAX_SSID; j++) 135 str_work++;
150 blacklist_range(ra, 0, __MAX_SUBCHANNEL, j); 136 ret = pure_hex(&str_work, devno, 4, 4, __MAX_SUBCHANNEL);
151 } else { 137 if (ret || (str_work[0] != '\0'))
152 int rc; 138 goto out;
139
140 rc = 0;
141out:
142 if (rc && msgtrigger)
143 printk(KERN_WARNING "cio: Invalid cio_ignore device '%s'\n",
144 str);
145
146 return rc;
147}
153 148
154 rc = blacklist_busid(&str, &from_id0, 149static int blacklist_parse_parameters(char *str, range_action action,
155 &from_ssid, &from); 150 int msgtrigger)
156 if (rc) 151{
157 continue; 152 int from_cssid, to_cssid, from_ssid, to_ssid, from, to;
158 to = from; 153 int rc, totalrc;
159 to_id0 = from_id0; 154 char *parm;
160 to_ssid = from_ssid; 155 range_action ra;
161 if (*str == '-') { 156
162 str++; 157 totalrc = 0;
163 rc = blacklist_busid(&str, &to_id0, 158
164 &to_ssid, &to); 159 while ((parm = strsep(&str, ","))) {
165 if (rc) 160 rc = 0;
166 continue; 161 ra = action;
167 } 162 if (*parm == '!') {
168 if (*str == '-') { 163 if (ra == add)
169 printk(KERN_WARNING "cio: invalid cio_ignore " 164 ra = free;
170 "parameter '%s'\n", 165 else
171 strsep(&str, ",\n")); 166 ra = add;
172 continue; 167 parm++;
173 } 168 }
174 if ((from_id0 != to_id0) || 169 if (strcmp(parm, "all") == 0) {
175 (from_ssid != to_ssid)) { 170 from_cssid = 0;
176 printk(KERN_WARNING "cio: invalid cio_ignore " 171 from_ssid = 0;
177 "range %x.%x.%04x-%x.%x.%04x\n", 172 from = 0;
178 from_id0, from_ssid, from, 173 to_cssid = __MAX_CSSID;
179 to_id0, to_ssid, to); 174 to_ssid = __MAX_SSID;
180 continue; 175 to = __MAX_SUBCHANNEL;
176 } else {
177 rc = parse_busid(strsep(&parm, "-"), &from_cssid,
178 &from_ssid, &from, msgtrigger);
179 if (!rc) {
180 if (parm != NULL)
181 rc = parse_busid(parm, &to_cssid,
182 &to_ssid, &to,
183 msgtrigger);
184 else {
185 to_cssid = from_cssid;
186 to_ssid = from_ssid;
187 to = from;
188 }
181 } 189 }
182 blacklist_range (ra, from, to, to_ssid);
183 } 190 }
191 if (!rc) {
192 rc = blacklist_range(ra, from_ssid, to_ssid, from, to,
193 msgtrigger);
194 if (rc)
195 totalrc = 1;
196 } else
197 totalrc = 1;
184 } 198 }
185 return 1; 199
200 return totalrc;
186} 201}
187 202
188/* Parsing the commandline for blacklist parameters, e.g. to blacklist
189 * bus ids 0.0.1234, 0.0.1235 and 0.0.1236, you could use any of:
190 * - cio_ignore=1234-1236
191 * - cio_ignore=0x1234-0x1235,1236
192 * - cio_ignore=0x1234,1235-1236
193 * - cio_ignore=1236 cio_ignore=1234-0x1236
194 * - cio_ignore=1234 cio_ignore=1236 cio_ignore=0x1235
195 * - cio_ignore=0.0.1234-0.0.1236
196 * - cio_ignore=0.0.1234,0x1235,1236
197 * - ...
198 */
199static int __init 203static int __init
200blacklist_setup (char *str) 204blacklist_setup (char *str)
201{ 205{
202 CIO_MSG_EVENT(6, "Reading blacklist parameters\n"); 206 CIO_MSG_EVENT(6, "Reading blacklist parameters\n");
203 return blacklist_parse_parameters (str, add); 207 if (blacklist_parse_parameters(str, add, 1))
208 return 0;
209 return 1;
204} 210}
205 211
206__setup ("cio_ignore=", blacklist_setup); 212__setup ("cio_ignore=", blacklist_setup);
@@ -224,27 +230,23 @@ is_blacklisted (int ssid, int devno)
224 * Function: blacklist_parse_proc_parameters 230 * Function: blacklist_parse_proc_parameters
225 * parse the stuff which is piped to /proc/cio_ignore 231 * parse the stuff which is piped to /proc/cio_ignore
226 */ 232 */
227static void 233static int blacklist_parse_proc_parameters(char *buf)
228blacklist_parse_proc_parameters (char *buf)
229{ 234{
230 if (strncmp (buf, "free ", 5) == 0) { 235 int rc;
231 blacklist_parse_parameters (buf + 5, free); 236 char *parm;
232 } else if (strncmp (buf, "add ", 4) == 0) { 237
233 /* 238 parm = strsep(&buf, " ");
234 * We don't need to check for known devices since 239
235 * css_probe_device will handle this correctly. 240 if (strcmp("free", parm) == 0)
236 */ 241 rc = blacklist_parse_parameters(buf, free, 0);
237 blacklist_parse_parameters (buf + 4, add); 242 else if (strcmp("add", parm) == 0)
238 } else { 243 rc = blacklist_parse_parameters(buf, add, 0);
239 printk (KERN_WARNING "cio: cio_ignore: Parse error; \n" 244 else
240 KERN_WARNING "try using 'free all|<devno-range>," 245 return 1;
241 "<devno-range>,...'\n"
242 KERN_WARNING "or 'add <devno-range>,"
243 "<devno-range>,...'\n");
244 return;
245 }
246 246
247 css_schedule_reprobe(); 247 css_schedule_reprobe();
248
249 return rc;
248} 250}
249 251
250/* Iterator struct for all devices. */ 252/* Iterator struct for all devices. */
@@ -328,6 +330,8 @@ cio_ignore_write(struct file *file, const char __user *user_buf,
328 size_t user_len, loff_t *offset) 330 size_t user_len, loff_t *offset)
329{ 331{
330 char *buf; 332 char *buf;
333 size_t i;
334 ssize_t rc, ret;
331 335
332 if (*offset) 336 if (*offset)
333 return -EINVAL; 337 return -EINVAL;
@@ -336,16 +340,27 @@ cio_ignore_write(struct file *file, const char __user *user_buf,
336 buf = vmalloc (user_len + 1); /* maybe better use the stack? */ 340 buf = vmalloc (user_len + 1); /* maybe better use the stack? */
337 if (buf == NULL) 341 if (buf == NULL)
338 return -ENOMEM; 342 return -ENOMEM;
343 memset(buf, 0, user_len + 1);
344
339 if (strncpy_from_user (buf, user_buf, user_len) < 0) { 345 if (strncpy_from_user (buf, user_buf, user_len) < 0) {
340 vfree (buf); 346 rc = -EFAULT;
341 return -EFAULT; 347 goto out_free;
342 } 348 }
343 buf[user_len] = '\0';
344 349
345 blacklist_parse_proc_parameters (buf); 350 i = user_len - 1;
351 while ((i >= 0) && (isspace(buf[i]) || (buf[i] == 0))) {
352 buf[i] = '\0';
353 i--;
354 }
355 ret = blacklist_parse_proc_parameters(buf);
356 if (ret)
357 rc = -EINVAL;
358 else
359 rc = user_len;
346 360
361out_free:
347 vfree (buf); 362 vfree (buf);
348 return user_len; 363 return rc;
349} 364}
350 365
351static const struct seq_operations cio_ignore_proc_seq_ops = { 366static const struct seq_operations cio_ignore_proc_seq_ops = {
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 08a578161306..82c6a2d45128 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -39,23 +39,6 @@ debug_info_t *cio_debug_msg_id;
39debug_info_t *cio_debug_trace_id; 39debug_info_t *cio_debug_trace_id;
40debug_info_t *cio_debug_crw_id; 40debug_info_t *cio_debug_crw_id;
41 41
42int cio_show_msg;
43
44static int __init
45cio_setup (char *parm)
46{
47 if (!strcmp (parm, "yes"))
48 cio_show_msg = 1;
49 else if (!strcmp (parm, "no"))
50 cio_show_msg = 0;
51 else
52 printk(KERN_ERR "cio: cio_setup: "
53 "invalid cio_msg parameter '%s'", parm);
54 return 1;
55}
56
57__setup ("cio_msg=", cio_setup);
58
59/* 42/*
60 * Function: cio_debug_init 43 * Function: cio_debug_init
61 * Initializes three debug logs for common I/O: 44 * Initializes three debug logs for common I/O:
@@ -166,7 +149,7 @@ cio_start_handle_notoper(struct subchannel *sch, __u8 lpm)
166 149
167 stsch (sch->schid, &sch->schib); 150 stsch (sch->schid, &sch->schib);
168 151
169 CIO_MSG_EVENT(0, "cio_start: 'not oper' status for " 152 CIO_MSG_EVENT(2, "cio_start: 'not oper' status for "
170 "subchannel 0.%x.%04x!\n", sch->schid.ssid, 153 "subchannel 0.%x.%04x!\n", sch->schid.ssid,
171 sch->schid.sch_no); 154 sch->schid.sch_no);
172 sprintf(dbf_text, "no%s", sch->dev.bus_id); 155 sprintf(dbf_text, "no%s", sch->dev.bus_id);
@@ -567,10 +550,9 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
567 * ... just being curious we check for non I/O subchannels 550 * ... just being curious we check for non I/O subchannels
568 */ 551 */
569 if (sch->st != 0) { 552 if (sch->st != 0) {
570 CIO_DEBUG(KERN_INFO, 0, 553 CIO_MSG_EVENT(4, "Subchannel 0.%x.%04x reports "
571 "Subchannel 0.%x.%04x reports " 554 "non-I/O subchannel type %04X\n",
572 "non-I/O subchannel type %04X\n", 555 sch->schid.ssid, sch->schid.sch_no, sch->st);
573 sch->schid.ssid, sch->schid.sch_no, sch->st);
574 /* We stop here for non-io subchannels. */ 556 /* We stop here for non-io subchannels. */
575 err = sch->st; 557 err = sch->st;
576 goto out; 558 goto out;
@@ -588,7 +570,7 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
588 * This device must not be known to Linux. So we simply 570 * This device must not be known to Linux. So we simply
589 * say that there is no device and return ENODEV. 571 * say that there is no device and return ENODEV.
590 */ 572 */
591 CIO_MSG_EVENT(4, "Blacklisted device detected " 573 CIO_MSG_EVENT(6, "Blacklisted device detected "
592 "at devno %04X, subchannel set %x\n", 574 "at devno %04X, subchannel set %x\n",
593 sch->schib.pmcw.dev, sch->schid.ssid); 575 sch->schib.pmcw.dev, sch->schid.ssid);
594 err = -ENODEV; 576 err = -ENODEV;
@@ -601,12 +583,11 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
601 sch->lpm = sch->schib.pmcw.pam & sch->opm; 583 sch->lpm = sch->schib.pmcw.pam & sch->opm;
602 sch->isc = 3; 584 sch->isc = 3;
603 585
604 CIO_DEBUG(KERN_INFO, 0, 586 CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X "
605 "Detected device %04x on subchannel 0.%x.%04X" 587 "- PIM = %02X, PAM = %02X, POM = %02X\n",
606 " - PIM = %02X, PAM = %02X, POM = %02X\n", 588 sch->schib.pmcw.dev, sch->schid.ssid,
607 sch->schib.pmcw.dev, sch->schid.ssid, 589 sch->schid.sch_no, sch->schib.pmcw.pim,
608 sch->schid.sch_no, sch->schib.pmcw.pim, 590 sch->schib.pmcw.pam, sch->schib.pmcw.pom);
609 sch->schib.pmcw.pam, sch->schib.pmcw.pom);
610 591
611 /* 592 /*
612 * We now have to initially ... 593 * We now have to initially ...
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index 3c75412904dc..6e933aebe013 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -118,6 +118,4 @@ extern void *cio_get_console_priv(void);
118#define cio_get_console_priv() NULL 118#define cio_get_console_priv() NULL
119#endif 119#endif
120 120
121extern int cio_show_msg;
122
123#endif 121#endif
diff --git a/drivers/s390/cio/cio_debug.h b/drivers/s390/cio/cio_debug.h
index d7429ef6c666..e64e8278c42e 100644
--- a/drivers/s390/cio/cio_debug.h
+++ b/drivers/s390/cio/cio_debug.h
@@ -31,10 +31,4 @@ static inline void CIO_HEX_EVENT(int level, void *data, int length)
31 } 31 }
32} 32}
33 33
34#define CIO_DEBUG(printk_level, event_level, msg...) do { \
35 if (cio_show_msg) \
36 printk(printk_level "cio: " msg); \
37 CIO_MSG_EVENT(event_level, msg); \
38 } while (0)
39
40#endif 34#endif
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 595e327d2f76..a76956512b2d 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -570,7 +570,7 @@ static void reprobe_all(struct work_struct *unused)
570{ 570{
571 int ret; 571 int ret;
572 572
573 CIO_MSG_EVENT(2, "reprobe start\n"); 573 CIO_MSG_EVENT(4, "reprobe start\n");
574 574
575 need_reprobe = 0; 575 need_reprobe = 0;
576 /* Make sure initial subchannel scan is done. */ 576 /* Make sure initial subchannel scan is done. */
@@ -578,7 +578,7 @@ static void reprobe_all(struct work_struct *unused)
578 atomic_read(&ccw_device_init_count) == 0); 578 atomic_read(&ccw_device_init_count) == 0);
579 ret = for_each_subchannel_staged(NULL, reprobe_subchannel, NULL); 579 ret = for_each_subchannel_staged(NULL, reprobe_subchannel, NULL);
580 580
581 CIO_MSG_EVENT(2, "reprobe done (rc=%d, need_reprobe=%d)\n", ret, 581 CIO_MSG_EVENT(4, "reprobe done (rc=%d, need_reprobe=%d)\n", ret,
582 need_reprobe); 582 need_reprobe);
583} 583}
584 584
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index abfd601d237a..e22813db74a2 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -341,7 +341,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev)
341 rc = device_schedule_callback(&cdev->dev, 341 rc = device_schedule_callback(&cdev->dev,
342 ccw_device_remove_orphan_cb); 342 ccw_device_remove_orphan_cb);
343 if (rc) 343 if (rc)
344 CIO_MSG_EVENT(2, "Couldn't unregister orphan " 344 CIO_MSG_EVENT(0, "Couldn't unregister orphan "
345 "0.%x.%04x\n", 345 "0.%x.%04x\n",
346 cdev->private->dev_id.ssid, 346 cdev->private->dev_id.ssid,
347 cdev->private->dev_id.devno); 347 cdev->private->dev_id.devno);
@@ -351,7 +351,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev)
351 rc = device_schedule_callback(cdev->dev.parent, 351 rc = device_schedule_callback(cdev->dev.parent,
352 ccw_device_remove_sch_cb); 352 ccw_device_remove_sch_cb);
353 if (rc) 353 if (rc)
354 CIO_MSG_EVENT(2, "Couldn't unregister disconnected device " 354 CIO_MSG_EVENT(0, "Couldn't unregister disconnected device "
355 "0.%x.%04x\n", 355 "0.%x.%04x\n",
356 cdev->private->dev_id.ssid, 356 cdev->private->dev_id.ssid,
357 cdev->private->dev_id.devno); 357 cdev->private->dev_id.devno);
@@ -397,7 +397,7 @@ int ccw_device_set_offline(struct ccw_device *cdev)
397 if (ret == 0) 397 if (ret == 0)
398 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); 398 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
399 else { 399 else {
400 CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " 400 CIO_MSG_EVENT(0, "ccw_device_offline returned %d, "
401 "device 0.%x.%04x\n", 401 "device 0.%x.%04x\n",
402 ret, cdev->private->dev_id.ssid, 402 ret, cdev->private->dev_id.ssid,
403 cdev->private->dev_id.devno); 403 cdev->private->dev_id.devno);
@@ -433,7 +433,7 @@ int ccw_device_set_online(struct ccw_device *cdev)
433 if (ret == 0) 433 if (ret == 0)
434 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); 434 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
435 else { 435 else {
436 CIO_MSG_EVENT(2, "ccw_device_online returned %d, " 436 CIO_MSG_EVENT(0, "ccw_device_online returned %d, "
437 "device 0.%x.%04x\n", 437 "device 0.%x.%04x\n",
438 ret, cdev->private->dev_id.ssid, 438 ret, cdev->private->dev_id.ssid,
439 cdev->private->dev_id.devno); 439 cdev->private->dev_id.devno);
@@ -451,7 +451,7 @@ int ccw_device_set_online(struct ccw_device *cdev)
451 if (ret == 0) 451 if (ret == 0)
452 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); 452 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
453 else 453 else
454 CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " 454 CIO_MSG_EVENT(0, "ccw_device_offline returned %d, "
455 "device 0.%x.%04x\n", 455 "device 0.%x.%04x\n",
456 ret, cdev->private->dev_id.ssid, 456 ret, cdev->private->dev_id.ssid,
457 cdev->private->dev_id.devno); 457 cdev->private->dev_id.devno);
@@ -803,7 +803,7 @@ static void sch_attach_disconnected_device(struct subchannel *sch,
803 other_sch = to_subchannel(get_device(cdev->dev.parent)); 803 other_sch = to_subchannel(get_device(cdev->dev.parent));
804 ret = device_move(&cdev->dev, &sch->dev); 804 ret = device_move(&cdev->dev, &sch->dev);
805 if (ret) { 805 if (ret) {
806 CIO_MSG_EVENT(2, "Moving disconnected device 0.%x.%04x failed " 806 CIO_MSG_EVENT(0, "Moving disconnected device 0.%x.%04x failed "
807 "(ret=%d)!\n", cdev->private->dev_id.ssid, 807 "(ret=%d)!\n", cdev->private->dev_id.ssid,
808 cdev->private->dev_id.devno, ret); 808 cdev->private->dev_id.devno, ret);
809 put_device(&other_sch->dev); 809 put_device(&other_sch->dev);
@@ -933,7 +933,7 @@ io_subchannel_register(struct work_struct *work)
933 ret = device_reprobe(&cdev->dev); 933 ret = device_reprobe(&cdev->dev);
934 if (ret) 934 if (ret)
935 /* We can't do much here. */ 935 /* We can't do much here. */
936 CIO_MSG_EVENT(2, "device_reprobe() returned" 936 CIO_MSG_EVENT(0, "device_reprobe() returned"
937 " %d for 0.%x.%04x\n", ret, 937 " %d for 0.%x.%04x\n", ret,
938 cdev->private->dev_id.ssid, 938 cdev->private->dev_id.ssid,
939 cdev->private->dev_id.devno); 939 cdev->private->dev_id.devno);
@@ -1086,7 +1086,7 @@ static void ccw_device_move_to_sch(struct work_struct *work)
1086 rc = device_move(&cdev->dev, &sch->dev); 1086 rc = device_move(&cdev->dev, &sch->dev);
1087 mutex_unlock(&sch->reg_mutex); 1087 mutex_unlock(&sch->reg_mutex);
1088 if (rc) { 1088 if (rc) {
1089 CIO_MSG_EVENT(2, "Moving device 0.%x.%04x to subchannel " 1089 CIO_MSG_EVENT(0, "Moving device 0.%x.%04x to subchannel "
1090 "0.%x.%04x failed (ret=%d)!\n", 1090 "0.%x.%04x failed (ret=%d)!\n",
1091 cdev->private->dev_id.ssid, 1091 cdev->private->dev_id.ssid,
1092 cdev->private->dev_id.devno, sch->schid.ssid, 1092 cdev->private->dev_id.devno, sch->schid.ssid,
@@ -1446,8 +1446,7 @@ ccw_device_remove (struct device *dev)
1446 wait_event(cdev->private->wait_q, 1446 wait_event(cdev->private->wait_q,
1447 dev_fsm_final_state(cdev)); 1447 dev_fsm_final_state(cdev));
1448 else 1448 else
1449 //FIXME: we can't fail! 1449 CIO_MSG_EVENT(0, "ccw_device_offline returned %d, "
1450 CIO_MSG_EVENT(2, "ccw_device_offline returned %d, "
1451 "device 0.%x.%04x\n", 1450 "device 0.%x.%04x\n",
1452 ret, cdev->private->dev_id.ssid, 1451 ret, cdev->private->dev_id.ssid,
1453 cdev->private->dev_id.devno); 1452 cdev->private->dev_id.devno);
@@ -1524,7 +1523,7 @@ static int recovery_check(struct device *dev, void *data)
1524 spin_lock_irq(cdev->ccwlock); 1523 spin_lock_irq(cdev->ccwlock);
1525 switch (cdev->private->state) { 1524 switch (cdev->private->state) {
1526 case DEV_STATE_DISCONNECTED: 1525 case DEV_STATE_DISCONNECTED:
1527 CIO_MSG_EVENT(3, "recovery: trigger 0.%x.%04x\n", 1526 CIO_MSG_EVENT(4, "recovery: trigger 0.%x.%04x\n",
1528 cdev->private->dev_id.ssid, 1527 cdev->private->dev_id.ssid,
1529 cdev->private->dev_id.devno); 1528 cdev->private->dev_id.devno);
1530 dev_fsm_event(cdev, DEV_EVENT_VERIFY); 1529 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
@@ -1554,7 +1553,7 @@ static void recovery_work_func(struct work_struct *unused)
1554 } 1553 }
1555 spin_unlock_irq(&recovery_lock); 1554 spin_unlock_irq(&recovery_lock);
1556 } else 1555 } else
1557 CIO_MSG_EVENT(2, "recovery: end\n"); 1556 CIO_MSG_EVENT(4, "recovery: end\n");
1558} 1557}
1559 1558
1560static DECLARE_WORK(recovery_work, recovery_work_func); 1559static DECLARE_WORK(recovery_work, recovery_work_func);
@@ -1572,7 +1571,7 @@ void ccw_device_schedule_recovery(void)
1572{ 1571{
1573 unsigned long flags; 1572 unsigned long flags;
1574 1573
1575 CIO_MSG_EVENT(2, "recovery: schedule\n"); 1574 CIO_MSG_EVENT(4, "recovery: schedule\n");
1576 spin_lock_irqsave(&recovery_lock, flags); 1575 spin_lock_irqsave(&recovery_lock, flags);
1577 if (!timer_pending(&recovery_timer) || (recovery_phase != 0)) { 1576 if (!timer_pending(&recovery_timer) || (recovery_phase != 0)) {
1578 recovery_phase = 0; 1577 recovery_phase = 0;
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 99403b0a97a7..e268d5a77c12 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -322,10 +322,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
322 same_dev = 0; /* Keep the compiler quiet... */ 322 same_dev = 0; /* Keep the compiler quiet... */
323 switch (state) { 323 switch (state) {
324 case DEV_STATE_NOT_OPER: 324 case DEV_STATE_NOT_OPER:
325 CIO_DEBUG(KERN_WARNING, 2, 325 CIO_MSG_EVENT(2, "SenseID : unknown device %04x on "
326 "SenseID : unknown device %04x on subchannel " 326 "subchannel 0.%x.%04x\n",
327 "0.%x.%04x\n", cdev->private->dev_id.devno, 327 cdev->private->dev_id.devno,
328 sch->schid.ssid, sch->schid.sch_no); 328 sch->schid.ssid, sch->schid.sch_no);
329 break; 329 break;
330 case DEV_STATE_OFFLINE: 330 case DEV_STATE_OFFLINE:
331 if (cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID) { 331 if (cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID) {
@@ -348,20 +348,19 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
348 return; 348 return;
349 } 349 }
350 /* Issue device info message. */ 350 /* Issue device info message. */
351 CIO_DEBUG(KERN_INFO, 2, 351 CIO_MSG_EVENT(4, "SenseID : device 0.%x.%04x reports: "
352 "SenseID : device 0.%x.%04x reports: " 352 "CU Type/Mod = %04X/%02X, Dev Type/Mod = "
353 "CU Type/Mod = %04X/%02X, Dev Type/Mod = " 353 "%04X/%02X\n",
354 "%04X/%02X\n", 354 cdev->private->dev_id.ssid,
355 cdev->private->dev_id.ssid, 355 cdev->private->dev_id.devno,
356 cdev->private->dev_id.devno, 356 cdev->id.cu_type, cdev->id.cu_model,
357 cdev->id.cu_type, cdev->id.cu_model, 357 cdev->id.dev_type, cdev->id.dev_model);
358 cdev->id.dev_type, cdev->id.dev_model);
359 break; 358 break;
360 case DEV_STATE_BOXED: 359 case DEV_STATE_BOXED:
361 CIO_DEBUG(KERN_WARNING, 2, 360 CIO_MSG_EVENT(0, "SenseID : boxed device %04x on "
362 "SenseID : boxed device %04x on subchannel " 361 " subchannel 0.%x.%04x\n",
363 "0.%x.%04x\n", cdev->private->dev_id.devno, 362 cdev->private->dev_id.devno,
364 sch->schid.ssid, sch->schid.sch_no); 363 sch->schid.ssid, sch->schid.sch_no);
365 break; 364 break;
366 } 365 }
367 cdev->private->state = state; 366 cdev->private->state = state;
@@ -443,9 +442,8 @@ ccw_device_done(struct ccw_device *cdev, int state)
443 442
444 443
445 if (state == DEV_STATE_BOXED) 444 if (state == DEV_STATE_BOXED)
446 CIO_DEBUG(KERN_WARNING, 2, 445 CIO_MSG_EVENT(0, "Boxed device %04x on subchannel %04x\n",
447 "Boxed device %04x on subchannel %04x\n", 446 cdev->private->dev_id.devno, sch->schid.sch_no);
448 cdev->private->dev_id.devno, sch->schid.sch_no);
449 447
450 if (cdev->private->flags.donotify) { 448 if (cdev->private->flags.donotify) {
451 cdev->private->flags.donotify = 0; 449 cdev->private->flags.donotify = 0;
@@ -900,7 +898,7 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event)
900 /* Basic sense hasn't started. Try again. */ 898 /* Basic sense hasn't started. Try again. */
901 ccw_device_do_sense(cdev, irb); 899 ccw_device_do_sense(cdev, irb);
902 else { 900 else {
903 CIO_MSG_EVENT(2, "Huh? 0.%x.%04x: unsolicited " 901 CIO_MSG_EVENT(0, "0.%x.%04x: unsolicited "
904 "interrupt during w4sense...\n", 902 "interrupt during w4sense...\n",
905 cdev->private->dev_id.ssid, 903 cdev->private->dev_id.ssid,
906 cdev->private->dev_id.devno); 904 cdev->private->dev_id.devno);
@@ -1169,8 +1167,10 @@ ccw_device_nop(struct ccw_device *cdev, enum dev_event dev_event)
1169static void 1167static void
1170ccw_device_bug(struct ccw_device *cdev, enum dev_event dev_event) 1168ccw_device_bug(struct ccw_device *cdev, enum dev_event dev_event)
1171{ 1169{
1172 CIO_MSG_EVENT(0, "dev_jumptable[%i][%i] == NULL\n", 1170 CIO_MSG_EVENT(0, "Internal state [%i][%i] not handled for device "
1173 cdev->private->state, dev_event); 1171 "0.%x.%04x\n", cdev->private->state, dev_event,
1172 cdev->private->dev_id.ssid,
1173 cdev->private->dev_id.devno);
1174 BUG(); 1174 BUG();
1175} 1175}
1176 1176
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c
index dc4d87f77f6c..cba7020517ed 100644
--- a/drivers/s390/cio/device_id.c
+++ b/drivers/s390/cio/device_id.c
@@ -214,7 +214,7 @@ ccw_device_check_sense_id(struct ccw_device *cdev)
214 * sense id information. So, for intervention required, 214 * sense id information. So, for intervention required,
215 * we use the "whack it until it talks" strategy... 215 * we use the "whack it until it talks" strategy...
216 */ 216 */
217 CIO_MSG_EVENT(2, "SenseID : device %04x on Subchannel " 217 CIO_MSG_EVENT(0, "SenseID : device %04x on Subchannel "
218 "0.%x.%04x reports cmd reject\n", 218 "0.%x.%04x reports cmd reject\n",
219 cdev->private->dev_id.devno, sch->schid.ssid, 219 cdev->private->dev_id.devno, sch->schid.ssid,
220 sch->schid.sch_no); 220 sch->schid.sch_no);
@@ -239,7 +239,7 @@ ccw_device_check_sense_id(struct ccw_device *cdev)
239 239
240 lpm = to_io_private(sch)->orb.lpm; 240 lpm = to_io_private(sch)->orb.lpm;
241 if ((lpm & sch->schib.pmcw.pim & sch->schib.pmcw.pam) != 0) 241 if ((lpm & sch->schib.pmcw.pim & sch->schib.pmcw.pam) != 0)
242 CIO_MSG_EVENT(2, "SenseID : path %02X for device %04x " 242 CIO_MSG_EVENT(4, "SenseID : path %02X for device %04x "
243 "on subchannel 0.%x.%04x is " 243 "on subchannel 0.%x.%04x is "
244 "'not operational'\n", lpm, 244 "'not operational'\n", lpm,
245 cdev->private->dev_id.devno, 245 cdev->private->dev_id.devno,
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c
index c52449a1f9fc..ba559053402e 100644
--- a/drivers/s390/cio/device_pgid.c
+++ b/drivers/s390/cio/device_pgid.c
@@ -79,7 +79,7 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev)
79 /* ret is 0, -EBUSY, -EACCES or -ENODEV */ 79 /* ret is 0, -EBUSY, -EACCES or -ENODEV */
80 if (ret != -EACCES) 80 if (ret != -EACCES)
81 return ret; 81 return ret;
82 CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel " 82 CIO_MSG_EVENT(3, "SNID - Device %04x on Subchannel "
83 "0.%x.%04x, lpm %02X, became 'not " 83 "0.%x.%04x, lpm %02X, became 'not "
84 "operational'\n", 84 "operational'\n",
85 cdev->private->dev_id.devno, 85 cdev->private->dev_id.devno,
@@ -159,7 +159,7 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev)
159 u8 lpm; 159 u8 lpm;
160 160
161 lpm = to_io_private(sch)->orb.lpm; 161 lpm = to_io_private(sch)->orb.lpm;
162 CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x," 162 CIO_MSG_EVENT(3, "SNID - Device %04x on Subchannel 0.%x.%04x,"
163 " lpm %02X, became 'not operational'\n", 163 " lpm %02X, became 'not operational'\n",
164 cdev->private->dev_id.devno, sch->schid.ssid, 164 cdev->private->dev_id.devno, sch->schid.ssid,
165 sch->schid.sch_no, lpm); 165 sch->schid.sch_no, lpm);
@@ -275,7 +275,7 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func)
275 return ret; 275 return ret;
276 } 276 }
277 /* PGID command failed on this path. */ 277 /* PGID command failed on this path. */
278 CIO_MSG_EVENT(2, "SPID - Device %04x on Subchannel " 278 CIO_MSG_EVENT(3, "SPID - Device %04x on Subchannel "
279 "0.%x.%04x, lpm %02X, became 'not operational'\n", 279 "0.%x.%04x, lpm %02X, became 'not operational'\n",
280 cdev->private->dev_id.devno, sch->schid.ssid, 280 cdev->private->dev_id.devno, sch->schid.ssid,
281 sch->schid.sch_no, cdev->private->imask); 281 sch->schid.sch_no, cdev->private->imask);
@@ -317,7 +317,7 @@ static int __ccw_device_do_nop(struct ccw_device *cdev)
317 return ret; 317 return ret;
318 } 318 }
319 /* nop command failed on this path. */ 319 /* nop command failed on this path. */
320 CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel " 320 CIO_MSG_EVENT(3, "NOP - Device %04x on Subchannel "
321 "0.%x.%04x, lpm %02X, became 'not operational'\n", 321 "0.%x.%04x, lpm %02X, became 'not operational'\n",
322 cdev->private->dev_id.devno, sch->schid.ssid, 322 cdev->private->dev_id.devno, sch->schid.ssid,
323 sch->schid.sch_no, cdev->private->imask); 323 sch->schid.sch_no, cdev->private->imask);
@@ -362,7 +362,7 @@ __ccw_device_check_pgid(struct ccw_device *cdev)
362 return -EAGAIN; 362 return -EAGAIN;
363 } 363 }
364 if (irb->scsw.cc == 3) { 364 if (irb->scsw.cc == 3) {
365 CIO_MSG_EVENT(2, "SPID - Device %04x on Subchannel 0.%x.%04x," 365 CIO_MSG_EVENT(3, "SPID - Device %04x on Subchannel 0.%x.%04x,"
366 " lpm %02X, became 'not operational'\n", 366 " lpm %02X, became 'not operational'\n",
367 cdev->private->dev_id.devno, sch->schid.ssid, 367 cdev->private->dev_id.devno, sch->schid.ssid,
368 sch->schid.sch_no, cdev->private->imask); 368 sch->schid.sch_no, cdev->private->imask);
@@ -391,7 +391,7 @@ static int __ccw_device_check_nop(struct ccw_device *cdev)
391 return -ETIME; 391 return -ETIME;
392 } 392 }
393 if (irb->scsw.cc == 3) { 393 if (irb->scsw.cc == 3) {
394 CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel 0.%x.%04x," 394 CIO_MSG_EVENT(3, "NOP - Device %04x on Subchannel 0.%x.%04x,"
395 " lpm %02X, became 'not operational'\n", 395 " lpm %02X, became 'not operational'\n",
396 cdev->private->dev_id.devno, sch->schid.ssid, 396 cdev->private->dev_id.devno, sch->schid.ssid,
397 sch->schid.sch_no, cdev->private->imask); 397 sch->schid.sch_no, cdev->private->imask);
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index 4d4b54277c43..5080f343ad74 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -48,10 +48,11 @@ s390_collect_crw_info(void *param)
48 int ccode; 48 int ccode;
49 struct semaphore *sem; 49 struct semaphore *sem;
50 unsigned int chain; 50 unsigned int chain;
51 int ignore;
51 52
52 sem = (struct semaphore *)param; 53 sem = (struct semaphore *)param;
53repeat: 54repeat:
54 down_interruptible(sem); 55 ignore = down_interruptible(sem);
55 chain = 0; 56 chain = 0;
56 while (1) { 57 while (1) {
57 if (unlikely(chain > 1)) { 58 if (unlikely(chain > 1)) {