Commit 0e6c83d18759e282fb4cfc19478a4217923421b3

Authored by Sebastian Ott
Committed by Martin Schwidefsky
1 parent 12d8471315

s390/cio: add ipldev keyword to cio_ignore

Provide an 'ipldev' keyword to cio_ignore to (un)ignore the
CCW or FCP based boot device.

Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Showing 2 changed files with 26 additions and 8 deletions Side-by-side Diff

Documentation/s390/CommonIO
... ... @@ -8,10 +8,10 @@
8 8  
9 9 Enable logging of debug information in case of ccw device timeouts.
10 10  
11   -* cio_ignore = {all} |
12   - {<device> | <range of devices>} |
13   - {!<device> | !<range of devices>}
  11 +* cio_ignore = device[,device[,..]]
14 12  
  13 + device := {all | [!]ipldev | [!]<devno> | [!]<devno>-<devno>}
  14 +
15 15 The given devices will be ignored by the common I/O-layer; no detection
16 16 and device sensing will be done on any of those devices. The subchannel to
17 17 which the device in question is attached will be treated as if no device was
... ... @@ -24,9 +24,10 @@
24 24 device numbers (0xabcd or abcd, for 2.4 backward compatibility). If you
25 25 give a device number 0xabcd, it will be interpreted as 0.0.abcd.
26 26  
27   - You can use the 'all' keyword to ignore all devices.
28   - The '!' operator will cause the I/O-layer to _not_ ignore a device.
29   - The command line is parsed from left to right.
  27 + You can use the 'all' keyword to ignore all devices. The 'ipldev' keyword can
  28 + be used to refer to the CCW based boot device (this is probably useful only
  29 + when combined with the '!' operator). The '!' operator will cause the I/O-layer
  30 + to _not_ ignore a device. The command line is parsed from left to right.
30 31  
31 32 For example,
32 33 cio_ignore=0.0.0023-0.0.0042,0.0.4711
drivers/s390/cio/blacklist.c
1 1 /*
2 2 * S/390 common I/O routines -- blacklisting of specific devices
3 3 *
4   - * Copyright IBM Corp. 1999, 2002
  4 + * Copyright IBM Corp. 1999, 2013
5 5 * Author(s): Ingo Adlung (adlung@de.ibm.com)
6 6 * Cornelia Huck (cornelia.huck@de.ibm.com)
7 7 * Arnd Bergmann (arndb@de.ibm.com)
8 8  
... ... @@ -17,8 +17,9 @@
17 17 #include <linux/ctype.h>
18 18 #include <linux/device.h>
19 19  
20   -#include <asm/cio.h>
21 20 #include <asm/uaccess.h>
  21 +#include <asm/cio.h>
  22 +#include <asm/ipl.h>
22 23  
23 24 #include "blacklist.h"
24 25 #include "cio.h"
... ... @@ -172,6 +173,22 @@
172 173 to_cssid = __MAX_CSSID;
173 174 to_ssid = __MAX_SSID;
174 175 to = __MAX_SUBCHANNEL;
  176 + } else if (strcmp(parm, "ipldev") == 0) {
  177 + if (ipl_info.type == IPL_TYPE_CCW) {
  178 + from_cssid = 0;
  179 + from_ssid = ipl_info.data.ccw.dev_id.ssid;
  180 + from = ipl_info.data.ccw.dev_id.devno;
  181 + } else if (ipl_info.type == IPL_TYPE_FCP ||
  182 + ipl_info.type == IPL_TYPE_FCP_DUMP) {
  183 + from_cssid = 0;
  184 + from_ssid = ipl_info.data.fcp.dev_id.ssid;
  185 + from = ipl_info.data.fcp.dev_id.devno;
  186 + } else {
  187 + continue;
  188 + }
  189 + to_cssid = from_cssid;
  190 + to_ssid = from_ssid;
  191 + to = from;
175 192 } else {
176 193 rc = parse_busid(strsep(&parm, "-"), &from_cssid,
177 194 &from_ssid, &from, msgtrigger);