[S390] cio: Get rid of css_characteristics_avail.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 14 Jul 2008 07:58:57 +0000 (09:58 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 14 Jul 2008 08:02:10 +0000 (10:02 +0200)
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>
drivers/s390/cio/chp.c
drivers/s390/cio/chsc.h
drivers/s390/cio/cmf.c
drivers/s390/cio/css.c
drivers/s390/cio/qdio.c

index 0b3c3109f2285df792493a703ae29430995e8f99..62df43b2124c59cf8b1264b28c46b201d9ff9209 100644 (file)
@@ -415,8 +415,7 @@ int chp_new(struct chp_id chpid)
                goto out_free;
        }
        /* Get channel-measurement characteristics. */
-       if (css_characteristics_avail && css_chsc_characteristics.scmc
-           && css_chsc_characteristics.secm) {
+       if (css_chsc_characteristics.scmc && css_chsc_characteristics.secm) {
                ret = chsc_get_channel_measurement_chars(chp);
                if (ret)
                        goto out_free;
index d4498d4005d37ba27d1d52d71bfa23f0317701af..2a38b5090228fbe2b0cb6c450c619567aba11457 100644 (file)
@@ -78,7 +78,6 @@ struct chsc_ssd_info {
 extern int chsc_get_ssd_info(struct subchannel_id schid,
                             struct chsc_ssd_info *ssd);
 extern int chsc_determine_css_characteristics(void);
-extern int css_characteristics_avail;
 extern int chsc_alloc_sei_area(void);
 extern void chsc_free_sei_area(void);
 
index 6c77c2326bd4461fcd75a8d75bbc0f71bfa039de..77523131a05e06091d49d11d5382090184ac5694 100644 (file)
@@ -1344,8 +1344,7 @@ static int __init init_cmf(void)
         * to basic mode.
         */
        if (format == CMF_AUTODETECT) {
-               if (!css_characteristics_avail ||
-                   !css_general_characteristics.ext_mb) {
+               if (!css_general_characteristics.ext_mb) {
                        format = CMF_BASIC;
                } else {
                        format = CMF_EXTENDED;
index 062716cf0f0c87d4d20f00dda52f078138c5a8c9..ebed2212778d5cc3334b6be383ecbd1a87359c2a 100644 (file)
@@ -30,8 +30,6 @@ static int max_ssid = 0;
 
 struct channel_subsystem *channel_subsystems[__MAX_CSSID + 1];
 
-int css_characteristics_avail = 0;
-
 int
 for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data)
 {
@@ -611,7 +609,7 @@ __init_channel_subsystem(struct subchannel_id schid, void *data)
 static void __init
 css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
 {
-       if (css_characteristics_avail && css_general_characteristics.mcss) {
+       if (css_general_characteristics.mcss) {
                css->global_pgid.pgid_high.ext_cssid.version = 0x80;
                css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid;
        } else {
@@ -748,8 +746,6 @@ init_channel_subsystem (void)
        ret = chsc_determine_css_characteristics();
        if (ret == -ENOMEM)
                goto out; /* No need to continue. */
-       if (ret == 0)
-               css_characteristics_avail = 1;
 
        ret = chsc_alloc_sei_area();
        if (ret)
@@ -793,8 +789,7 @@ init_channel_subsystem (void)
                ret = device_register(&css->device);
                if (ret)
                        goto out_free_all;
-               if (css_characteristics_avail &&
-                   css_chsc_characteristics.secm) {
+               if (css_chsc_characteristics.secm) {
                        ret = device_create_file(&css->device,
                                                 &dev_attr_cm_enable);
                        if (ret)
@@ -832,7 +827,7 @@ out_unregister:
                i--;
                css = channel_subsystems[i];
                device_unregister(&css->pseudo_subchannel->dev);
-               if (css_characteristics_avail && css_chsc_characteristics.secm)
+               if (css_chsc_characteristics.secm)
                        device_remove_file(&css->device,
                                           &dev_attr_cm_enable);
                device_unregister(&css->device);
@@ -956,4 +951,3 @@ subsys_initcall(init_channel_subsystem);
 
 MODULE_LICENSE("GPL");
 EXPORT_SYMBOL(css_bus_type);
-EXPORT_SYMBOL_GPL(css_characteristics_avail);
index 72508d8f3c4a30c841461c9a181510ae7d66e468..f9be265e7e8f5f86369561dd514c0caa3688d30d 100644 (file)
@@ -2354,9 +2354,6 @@ tiqdio_check_chsc_availability(void)
 {
        char dbf_text[15];
 
-       if (!css_characteristics_avail)
-               return -EIO;
-
        /* Check for bit 41. */
        if (!css_general_characteristics.aif) {
                QDIO_PRINT_WARN("Adapter interruption facility not " \