aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2009-06-22 06:08:17 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-22 06:08:22 -0400
commite6125fba81e362d9b314d10893af1d9dc5658f33 (patch)
tree74039b088fc81e72e7976c5fca6ea0174eed9160 /drivers/s390/block
parent772f54720ab82a6e88f0a8a84d76e7af15ca1f0c (diff)
[S390] dasd_pm: fix stop flag handling
The stop flags are handled in the generic restore function so the stop flag is removed also for FBA and DIAG devices. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c12
-rw-r--r--drivers/s390/block/dasd_eckd.c10
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index e5b84db0aa03..99e71536213a 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2503,15 +2503,25 @@ int dasd_generic_restore_device(struct ccw_device *cdev)
2503 if (IS_ERR(device)) 2503 if (IS_ERR(device))
2504 return PTR_ERR(device); 2504 return PTR_ERR(device);
2505 2505
2506 /* allow new IO again */
2507 device->stopped &= ~DASD_STOPPED_PM;
2508 device->stopped &= ~DASD_UNRESUMED_PM;
2509
2506 dasd_schedule_device_bh(device); 2510 dasd_schedule_device_bh(device);
2507 if (device->block) 2511 if (device->block)
2508 dasd_schedule_block_bh(device->block); 2512 dasd_schedule_block_bh(device->block);
2509 2513
2510 if (device->discipline->restore) 2514 if (device->discipline->restore)
2511 rc = device->discipline->restore(device); 2515 rc = device->discipline->restore(device);
2516 if (rc)
2517 /*
2518 * if the resume failed for the DASD we put it in
2519 * an UNRESUMED stop state
2520 */
2521 device->stopped |= DASD_UNRESUMED_PM;
2512 2522
2513 dasd_put_device(device); 2523 dasd_put_device(device);
2514 return rc; 2524 return 0;
2515} 2525}
2516EXPORT_SYMBOL_GPL(dasd_generic_restore_device); 2526EXPORT_SYMBOL_GPL(dasd_generic_restore_device);
2517 2527
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 1c28ec3e4ccb..f8b1f04f26b8 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -3243,9 +3243,6 @@ int dasd_eckd_restore_device(struct dasd_device *device)
3243 int is_known, rc; 3243 int is_known, rc;
3244 struct dasd_uid temp_uid; 3244 struct dasd_uid temp_uid;
3245 3245
3246 /* allow new IO again */
3247 device->stopped &= ~DASD_STOPPED_PM;
3248
3249 private = (struct dasd_eckd_private *) device->private; 3246 private = (struct dasd_eckd_private *) device->private;
3250 3247
3251 /* Read Configuration Data */ 3248 /* Read Configuration Data */
@@ -3295,12 +3292,7 @@ int dasd_eckd_restore_device(struct dasd_device *device)
3295 return 0; 3292 return 0;
3296 3293
3297out_err: 3294out_err:
3298 /* 3295 return -1;
3299 * if the resume failed for the DASD we put it in
3300 * an UNRESUMED stop state
3301 */
3302 device->stopped |= DASD_UNRESUMED_PM;
3303 return 0;
3304} 3296}
3305 3297
3306static struct ccw_driver dasd_eckd_driver = { 3298static struct ccw_driver dasd_eckd_driver = {