Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Haberland and committed by
Martin Schwidefsky
55d3a85c 683c3dce

+7 -9
+7 -9
drivers/s390/block/dasd_eckd.c
··· 1026 1026 { 1027 1027 void *conf_data; 1028 1028 int conf_len, conf_data_saved; 1029 - int rc; 1029 + int rc, path_err; 1030 1030 __u8 lpm, opm; 1031 1031 struct dasd_eckd_private *private, path_private; 1032 1032 struct dasd_path *path_data; ··· 1037 1037 path_data = &device->path_data; 1038 1038 opm = ccw_device_get_path_mask(device->cdev); 1039 1039 conf_data_saved = 0; 1040 + path_err = 0; 1040 1041 /* get configuration data per operational path */ 1041 1042 for (lpm = 0x80; lpm; lpm>>= 1) { 1042 1043 if (!(lpm & opm)) ··· 1123 1122 "the same device, path %02X leads to " 1124 1123 "device %s instead of %s\n", lpm, 1125 1124 print_path_uid, print_device_uid); 1126 - return -EINVAL; 1125 + path_err = -EINVAL; 1126 + continue; 1127 1127 } 1128 1128 1129 1129 path_private.conf_data = NULL; ··· 1144 1142 kfree(conf_data); 1145 1143 } 1146 1144 1147 - return 0; 1145 + return path_err; 1148 1146 } 1149 1147 1150 1148 static int verify_fcx_max_data(struct dasd_device *device, __u8 lpm) ··· 4161 4159 private = (struct dasd_eckd_private *) device->private; 4162 4160 4163 4161 /* Read Configuration Data */ 4164 - rc = dasd_eckd_read_conf(device); 4165 - if (rc) 4166 - goto out_err; 4162 + dasd_eckd_read_conf(device); 4167 4163 4168 4164 dasd_eckd_get_uid(device, &temp_uid); 4169 4165 /* Generate device unique id */ ··· 4181 4181 dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST); 4182 4182 4183 4183 /* RE-Read Configuration Data */ 4184 - rc = dasd_eckd_read_conf(device); 4185 - if (rc) 4186 - goto out_err; 4184 + dasd_eckd_read_conf(device); 4187 4185 4188 4186 /* Read Feature Codes */ 4189 4187 dasd_eckd_read_features(device);