diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-14 03:58:57 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:10 -0400 |
commit | 75784c00876c88ca6e955c39cbb5d47cf408fd3c (patch) | |
tree | 7f1122b85945d17da87f0dc353d476cd9eec1cf2 /drivers/s390/cio | |
parent | d2fec595511b5718bdb65645b3d5d99800d97943 (diff) |
[S390] cio: Get rid of css_characteristics_avail.
Checking for the validity of the css_*_characteristics is
superfluous since they stay 0 for non-successful scsc.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/chp.c | 3 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.h | 1 | ||||
-rw-r--r-- | drivers/s390/cio/cmf.c | 3 | ||||
-rw-r--r-- | drivers/s390/cio/css.c | 12 | ||||
-rw-r--r-- | drivers/s390/cio/qdio.c | 3 |
5 files changed, 5 insertions, 17 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 0b3c3109f228..62df43b2124c 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -415,8 +415,7 @@ int chp_new(struct chp_id chpid) | |||
415 | goto out_free; | 415 | goto out_free; |
416 | } | 416 | } |
417 | /* Get channel-measurement characteristics. */ | 417 | /* Get channel-measurement characteristics. */ |
418 | if (css_characteristics_avail && css_chsc_characteristics.scmc | 418 | if (css_chsc_characteristics.scmc && css_chsc_characteristics.secm) { |
419 | && css_chsc_characteristics.secm) { | ||
420 | ret = chsc_get_channel_measurement_chars(chp); | 419 | ret = chsc_get_channel_measurement_chars(chp); |
421 | if (ret) | 420 | if (ret) |
422 | goto out_free; | 421 | goto out_free; |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index d4498d4005d3..2a38b5090228 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -78,7 +78,6 @@ struct chsc_ssd_info { | |||
78 | extern int chsc_get_ssd_info(struct subchannel_id schid, | 78 | extern int chsc_get_ssd_info(struct subchannel_id schid, |
79 | struct chsc_ssd_info *ssd); | 79 | struct chsc_ssd_info *ssd); |
80 | extern int chsc_determine_css_characteristics(void); | 80 | extern int chsc_determine_css_characteristics(void); |
81 | extern int css_characteristics_avail; | ||
82 | extern int chsc_alloc_sei_area(void); | 81 | extern int chsc_alloc_sei_area(void); |
83 | extern void chsc_free_sei_area(void); | 82 | extern void chsc_free_sei_area(void); |
84 | 83 | ||
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 6c77c2326bd4..77523131a05e 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c | |||
@@ -1344,8 +1344,7 @@ static int __init init_cmf(void) | |||
1344 | * to basic mode. | 1344 | * to basic mode. |
1345 | */ | 1345 | */ |
1346 | if (format == CMF_AUTODETECT) { | 1346 | if (format == CMF_AUTODETECT) { |
1347 | if (!css_characteristics_avail || | 1347 | if (!css_general_characteristics.ext_mb) { |
1348 | !css_general_characteristics.ext_mb) { | ||
1349 | format = CMF_BASIC; | 1348 | format = CMF_BASIC; |
1350 | } else { | 1349 | } else { |
1351 | format = CMF_EXTENDED; | 1350 | format = CMF_EXTENDED; |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 062716cf0f0c..ebed2212778d 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -30,8 +30,6 @@ static int max_ssid = 0; | |||
30 | 30 | ||
31 | struct channel_subsystem *channel_subsystems[__MAX_CSSID + 1]; | 31 | struct channel_subsystem *channel_subsystems[__MAX_CSSID + 1]; |
32 | 32 | ||
33 | int css_characteristics_avail = 0; | ||
34 | |||
35 | int | 33 | int |
36 | for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data) | 34 | for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data) |
37 | { | 35 | { |
@@ -611,7 +609,7 @@ __init_channel_subsystem(struct subchannel_id schid, void *data) | |||
611 | static void __init | 609 | static void __init |
612 | css_generate_pgid(struct channel_subsystem *css, u32 tod_high) | 610 | css_generate_pgid(struct channel_subsystem *css, u32 tod_high) |
613 | { | 611 | { |
614 | if (css_characteristics_avail && css_general_characteristics.mcss) { | 612 | if (css_general_characteristics.mcss) { |
615 | css->global_pgid.pgid_high.ext_cssid.version = 0x80; | 613 | css->global_pgid.pgid_high.ext_cssid.version = 0x80; |
616 | css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid; | 614 | css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid; |
617 | } else { | 615 | } else { |
@@ -748,8 +746,6 @@ init_channel_subsystem (void) | |||
748 | ret = chsc_determine_css_characteristics(); | 746 | ret = chsc_determine_css_characteristics(); |
749 | if (ret == -ENOMEM) | 747 | if (ret == -ENOMEM) |
750 | goto out; /* No need to continue. */ | 748 | goto out; /* No need to continue. */ |
751 | if (ret == 0) | ||
752 | css_characteristics_avail = 1; | ||
753 | 749 | ||
754 | ret = chsc_alloc_sei_area(); | 750 | ret = chsc_alloc_sei_area(); |
755 | if (ret) | 751 | if (ret) |
@@ -793,8 +789,7 @@ init_channel_subsystem (void) | |||
793 | ret = device_register(&css->device); | 789 | ret = device_register(&css->device); |
794 | if (ret) | 790 | if (ret) |
795 | goto out_free_all; | 791 | goto out_free_all; |
796 | if (css_characteristics_avail && | 792 | if (css_chsc_characteristics.secm) { |
797 | css_chsc_characteristics.secm) { | ||
798 | ret = device_create_file(&css->device, | 793 | ret = device_create_file(&css->device, |
799 | &dev_attr_cm_enable); | 794 | &dev_attr_cm_enable); |
800 | if (ret) | 795 | if (ret) |
@@ -832,7 +827,7 @@ out_unregister: | |||
832 | i--; | 827 | i--; |
833 | css = channel_subsystems[i]; | 828 | css = channel_subsystems[i]; |
834 | device_unregister(&css->pseudo_subchannel->dev); | 829 | device_unregister(&css->pseudo_subchannel->dev); |
835 | if (css_characteristics_avail && css_chsc_characteristics.secm) | 830 | if (css_chsc_characteristics.secm) |
836 | device_remove_file(&css->device, | 831 | device_remove_file(&css->device, |
837 | &dev_attr_cm_enable); | 832 | &dev_attr_cm_enable); |
838 | device_unregister(&css->device); | 833 | device_unregister(&css->device); |
@@ -956,4 +951,3 @@ subsys_initcall(init_channel_subsystem); | |||
956 | 951 | ||
957 | MODULE_LICENSE("GPL"); | 952 | MODULE_LICENSE("GPL"); |
958 | EXPORT_SYMBOL(css_bus_type); | 953 | EXPORT_SYMBOL(css_bus_type); |
959 | EXPORT_SYMBOL_GPL(css_characteristics_avail); | ||
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 72508d8f3c4a..f9be265e7e8f 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -2354,9 +2354,6 @@ tiqdio_check_chsc_availability(void) | |||
2354 | { | 2354 | { |
2355 | char dbf_text[15]; | 2355 | char dbf_text[15]; |
2356 | 2356 | ||
2357 | if (!css_characteristics_avail) | ||
2358 | return -EIO; | ||
2359 | |||
2360 | /* Check for bit 41. */ | 2357 | /* Check for bit 41. */ |
2361 | if (!css_general_characteristics.aif) { | 2358 | if (!css_general_characteristics.aif) { |
2362 | QDIO_PRINT_WARN("Adapter interruption facility not " \ | 2359 | QDIO_PRINT_WARN("Adapter interruption facility not " \ |