diff options
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 12 |
1 files changed, 11 insertions, 1 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 | } |
2516 | EXPORT_SYMBOL_GPL(dasd_generic_restore_device); | 2526 | EXPORT_SYMBOL_GPL(dasd_generic_restore_device); |
2517 | 2527 | ||