Commit 55d3a85c authored by Stefan Haberland's avatar Stefan Haberland Committed by Martin Schwidefsky

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: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
Reference-ID: RQM 1262
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 683c3dce
...@@ -1026,7 +1026,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device) ...@@ -1026,7 +1026,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
{ {
void *conf_data; void *conf_data;
int conf_len, conf_data_saved; int conf_len, conf_data_saved;
int rc; int rc, path_err;
__u8 lpm, opm; __u8 lpm, opm;
struct dasd_eckd_private *private, path_private; struct dasd_eckd_private *private, path_private;
struct dasd_path *path_data; struct dasd_path *path_data;
...@@ -1037,6 +1037,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device) ...@@ -1037,6 +1037,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
path_data = &device->path_data; path_data = &device->path_data;
opm = ccw_device_get_path_mask(device->cdev); opm = ccw_device_get_path_mask(device->cdev);
conf_data_saved = 0; conf_data_saved = 0;
path_err = 0;
/* get configuration data per operational path */ /* get configuration data per operational path */
for (lpm = 0x80; lpm; lpm>>= 1) { for (lpm = 0x80; lpm; lpm>>= 1) {
if (!(lpm & opm)) if (!(lpm & opm))
...@@ -1122,7 +1123,8 @@ static int dasd_eckd_read_conf(struct dasd_device *device) ...@@ -1122,7 +1123,8 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
"the same device, path %02X leads to " "the same device, path %02X leads to "
"device %s instead of %s\n", lpm, "device %s instead of %s\n", lpm,
print_path_uid, print_device_uid); print_path_uid, print_device_uid);
return -EINVAL; path_err = -EINVAL;
continue;
} }
path_private.conf_data = NULL; path_private.conf_data = NULL;
...@@ -1142,7 +1144,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device) ...@@ -1142,7 +1144,7 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
kfree(conf_data); kfree(conf_data);
} }
return 0; return path_err;
} }
static int verify_fcx_max_data(struct dasd_device *device, __u8 lpm) static 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,9 +4161,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
private = (struct dasd_eckd_private *) device->private; private = (struct dasd_eckd_private *) device->private;
/* Read Configuration Data */ /* Read Configuration Data */
rc = dasd_eckd_read_conf(device); dasd_eckd_read_conf(device);
if (rc)
goto out_err;
dasd_eckd_get_uid(device, &temp_uid); dasd_eckd_get_uid(device, &temp_uid);
/* Generate device unique id */ /* Generate device unique id */
...@@ -4181,9 +4181,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device) ...@@ -4181,9 +4181,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST); dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST);
/* RE-Read Configuration Data */ /* RE-Read Configuration Data */
rc = dasd_eckd_read_conf(device); dasd_eckd_read_conf(device);
if (rc)
goto out_err;
/* Read Feature Codes */ /* Read Feature Codes */
dasd_eckd_read_features(device); dasd_eckd_read_features(device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment