diff options
Diffstat (limited to 'drivers/s390/cio/blacklist.c')
-rw-r--r-- | drivers/s390/cio/blacklist.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 0bfcbbe375c4..2f547b840ef0 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "cio.h" | 24 | #include "cio.h" |
25 | #include "cio_debug.h" | 25 | #include "cio_debug.h" |
26 | #include "css.h" | 26 | #include "css.h" |
27 | #include "device.h" | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * "Blacklisting" of certain devices: | 30 | * "Blacklisting" of certain devices: |
@@ -191,9 +192,9 @@ static int blacklist_parse_parameters(char *str, range_action action, | |||
191 | rc = blacklist_range(ra, from_ssid, to_ssid, from, to, | 192 | rc = blacklist_range(ra, from_ssid, to_ssid, from, to, |
192 | msgtrigger); | 193 | msgtrigger); |
193 | if (rc) | 194 | if (rc) |
194 | totalrc = 1; | 195 | totalrc = -EINVAL; |
195 | } else | 196 | } else |
196 | totalrc = 1; | 197 | totalrc = -EINVAL; |
197 | } | 198 | } |
198 | 199 | ||
199 | return totalrc; | 200 | return totalrc; |
@@ -240,8 +241,10 @@ static int blacklist_parse_proc_parameters(char *buf) | |||
240 | rc = blacklist_parse_parameters(buf, free, 0); | 241 | rc = blacklist_parse_parameters(buf, free, 0); |
241 | else if (strcmp("add", parm) == 0) | 242 | else if (strcmp("add", parm) == 0) |
242 | rc = blacklist_parse_parameters(buf, add, 0); | 243 | rc = blacklist_parse_parameters(buf, add, 0); |
244 | else if (strcmp("purge", parm) == 0) | ||
245 | return ccw_purge_blacklisted(); | ||
243 | else | 246 | else |
244 | return 1; | 247 | return -EINVAL; |
245 | 248 | ||
246 | css_schedule_reprobe(); | 249 | css_schedule_reprobe(); |
247 | 250 | ||
@@ -353,7 +356,7 @@ cio_ignore_write(struct file *file, const char __user *user_buf, | |||
353 | } | 356 | } |
354 | ret = blacklist_parse_proc_parameters(buf); | 357 | ret = blacklist_parse_proc_parameters(buf); |
355 | if (ret) | 358 | if (ret) |
356 | rc = -EINVAL; | 359 | rc = ret; |
357 | else | 360 | else |
358 | rc = user_len; | 361 | rc = user_len; |
359 | 362 | ||