提交 251afd69 编写于 作者: S Stefan Haberland 提交者: Martin Schwidefsky

s390/dasd: fix invalid PAV assignment after suspend/resume

For a valid PAV assignment the DASD driver needs to notice possibly
changed configuration data. Thus the failing of read configuration
data should also fail the device restore to prevent invalid PAV
assignment. The failed device may get restored after additional paths
get available later on.
If the restore fails after the device was added to the lcu alias
handling it needs to be removed from the alias handling before exiting
the restore function.
Reviewed-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 c7c0c9de
......@@ -4435,7 +4435,12 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
private = (struct dasd_eckd_private *) device->private;
/* Read Configuration Data */
dasd_eckd_read_conf(device);
rc = dasd_eckd_read_conf(device);
if (rc) {
DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read configuration data failed, rc=%d", rc);
goto out_err;
}
dasd_eckd_get_uid(device, &temp_uid);
/* Generate device unique id */
......@@ -4451,13 +4456,18 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
/* register lcu with alias handling, enable PAV if this is a new lcu */
rc = dasd_alias_make_device_known_to_lcu(device);
if (rc)
return rc;
goto out_err;
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr_flags);
dasd_eckd_validate_server(device, cqr_flags);
/* RE-Read Configuration Data */
dasd_eckd_read_conf(device);
rc = dasd_eckd_read_conf(device);
if (rc) {
DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read configuration data failed, rc=%d", rc);
goto out_err2;
}
/* Read Feature Codes */
dasd_eckd_read_features(device);
......@@ -4468,7 +4478,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
if (rc) {
DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read device characteristic failed, rc=%d", rc);
goto out_err;
goto out_err2;
}
spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
memcpy(&private->rdc_data, &temp_rdc_data, sizeof(temp_rdc_data));
......@@ -4479,6 +4489,8 @@ static int dasd_eckd_restore_device(struct dasd_device *device)
return 0;
out_err2:
dasd_alias_disconnect_device_from_lcu(device);
out_err:
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册