aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2012-11-27 11:04:14 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-11-30 09:40:42 -0500
commit55d3a85cd2fa3274a6dfa0901a3be342b433bfa0 (patch)
treed7a221195cf2d61b7d542873e00e6f84982e9664 /drivers/s390/block
parent683c3dcef439f969b2c7fd09b60144cb4e2155a5 (diff)
s390/dasd: fix unaccessible device after resume
If a channel path is cabled incorrectly and the device is suspended and resumed the device may be inaccessible afterwards. Make the path connection check not interrupt the resume callback there could be other valid paths available. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Reference-ID: RQM 1262 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd_eckd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 705b1829b8f8..806fe912d6e7 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1026,7 +1026,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
1026{ 1026{
1027 void *conf_data; 1027 void *conf_data;
1028 int conf_len, conf_data_saved; 1028 int conf_len, conf_data_saved;
1029 int rc; 1029 int rc, path_err;
1030 __u8 lpm, opm; 1030 __u8 lpm, opm;
1031 struct dasd_eckd_private *private, path_private; 1031 struct dasd_eckd_private *private, path_private;
1032 struct dasd_path *path_data; 1032 struct dasd_path *path_data;
@@ -1037,6 +1037,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
1037 path_data = &device->path_data; 1037 path_data = &device->path_data;
1038 opm = ccw_device_get_path_mask(device->cdev); 1038 opm = ccw_device_get_path_mask(device->cdev);
1039 conf_data_saved = 0; 1039 conf_data_saved = 0;
1040 path_err = 0;
1040 /* get configuration data per operational path */ 1041 /* get configuration data per operational path */
1041 for (lpm = 0x80; lpm; lpm>>= 1) { 1042 for (lpm = 0x80; lpm; lpm>>= 1) {
1042 if (!(lpm & opm)) 1043 if (!(lpm & opm))
@@ -1122,7 +1123,8 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
1122 "the same device, path %02X leads to " 1123 "the same device, path %02X leads to "
1123 "device %s instead of %s\n", lpm, 1124 "device %s instead of %s\n", lpm,
1124 print_path_uid, print_device_uid); 1125 print_path_uid, print_device_uid);
1125 return -EINVAL; 1126 path_err = -EINVAL;
1127 continue;
1126 } 1128 }
1127 1129
1128 path_private.conf_data = NULL; 1130 path_private.conf_data = NULL;
@@ -1142,7 +1144,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
1142 kfree(conf_data); 1144 kfree(conf_data);
1143 } 1145 }
1144 1146
1145 return 0; 1147 return path_err;
1146} 1148}
1147 1149
1148static int verify_fcx_max_data(struct dasd_device *device, __u8 lpm) 1150static int verify_fcx_max_data(struct dasd_device *device, __u8 lpm)
@@ -4159,9 +4161,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
4159 private = (struct dasd_eckd_private *) device->private; 4161 private = (struct dasd_eckd_private *) device->private;
4160 4162
4161 /* Read Configuration Data */ 4163 /* Read Configuration Data */
4162 rc = dasd_eckd_read_conf(device); 4164 dasd_eckd_read_conf(device);
4163 if (rc)
4164 goto out_err;
4165 4165
4166 dasd_eckd_get_uid(device, &temp_uid); 4166 dasd_eckd_get_uid(device, &temp_uid);
4167 /* Generate device unique id */ 4167 /* Generate device unique id */
@@ -4181,9 +4181,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
4181 dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST); 4181 dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST);
4182 4182
4183 /* RE-Read Configuration Data */ 4183 /* RE-Read Configuration Data */
4184 rc = dasd_eckd_read_conf(device); 4184 dasd_eckd_read_conf(device);
4185 if (rc)
4186 goto out_err;
4187 4185
4188 /* Read Feature Codes */ 4186 /* Read Feature Codes */
4189 dasd_eckd_read_features(device); 4187 dasd_eckd_read_features(device);