diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2009-09-22 22:58:37 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-22 22:58:42 +0200 |
commit | b0a285d31bd475fdd4312e457288be558b705e55 (patch) | |
tree | a8e99fc301bedaff3e141b68f7f16183a810192e /drivers/s390/cio/css.c | |
parent | b827d1c8b65b27a293433e7c4723c7dfd6c4b848 (diff) | |
download | linux-b0a285d31bd475fdd4312e457288be558b705e55.tar.bz2 |
[S390] cio: idset use actual number of ssids
The functions idset_sch_new and for_each_subchannel_staged
use different values for the number of subchannel sets. Make
it consistent by changing idset_sch_new to also use the actual
number of subchannel sets.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index b43f769d445e..5e217bbf8797 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -32,7 +32,7 @@ int css_init_done = 0; static int need_reprobe = 0; -static int max_ssid = 0; +int max_ssid; struct channel_subsystem *channel_subsystems[__MAX_CSSID + 1]; @@ -879,6 +879,18 @@ static int __init css_bus_init(void) if (ret) goto out; + /* Try to enable MSS. */ + ret = chsc_enable_facility(CHSC_SDA_OC_MSS); + switch (ret) { + case 0: /* Success. */ + max_ssid = __MAX_SSID; + break; + case -ENOMEM: + goto out; + default: + max_ssid = 0; + } + ret = slow_subchannel_init(); if (ret) goto out; @@ -890,17 +902,6 @@ static int __init css_bus_init(void) if ((ret = bus_register(&css_bus_type))) goto out; - /* Try to enable MSS. */ - ret = chsc_enable_facility(CHSC_SDA_OC_MSS); - switch (ret) { - case 0: /* Success. */ - max_ssid = __MAX_SSID; - break; - case -ENOMEM: - goto out_bus; - default: - max_ssid = 0; - } /* Setup css structure. */ for (i = 0; i <= __MAX_CSSID; i++) { struct channel_subsystem *css; @@ -966,7 +967,6 @@ out_unregister: &dev_attr_cm_enable); device_unregister(&css->device); } -out_bus: bus_unregister(&css_bus_type); out: crw_unregister_handler(CRW_RSC_CSS); |