Skip to content

Commit

Permalink
[S390] dasd_pm: fix stop flag handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Haberland authored and Martin Schwidefsky committed Jun 22, 2009
1 parent 772f547 commit e6125fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 11 additions & 1 deletion drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,15 +2503,25 @@ int dasd_generic_restore_device(struct ccw_device *cdev)
if (IS_ERR(device))
return PTR_ERR(device);

/* allow new IO again */
device->stopped &= ~DASD_STOPPED_PM;
device->stopped &= ~DASD_UNRESUMED_PM;

dasd_schedule_device_bh(device);
if (device->block)
dasd_schedule_block_bh(device->block);

if (device->discipline->restore)
rc = device->discipline->restore(device);
if (rc)
/*
* if the resume failed for the DASD we put it in
* an UNRESUMED stop state
*/
device->stopped |= DASD_UNRESUMED_PM;

dasd_put_device(device);
return rc;
return 0;
}
EXPORT_SYMBOL_GPL(dasd_generic_restore_device);

Expand Down
10 changes: 1 addition & 9 deletions drivers/s390/block/dasd_eckd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3243,9 +3243,6 @@ int dasd_eckd_restore_device(struct dasd_device *device)
int is_known, rc;
struct dasd_uid temp_uid;

/* allow new IO again */
device->stopped &= ~DASD_STOPPED_PM;

private = (struct dasd_eckd_private *) device->private;

/* Read Configuration Data */
Expand Down Expand Up @@ -3295,12 +3292,7 @@ int dasd_eckd_restore_device(struct dasd_device *device)
return 0;

out_err:
/*
* if the resume failed for the DASD we put it in
* an UNRESUMED stop state
*/
device->stopped |= DASD_UNRESUMED_PM;
return 0;
return -1;
}

static struct ccw_driver dasd_eckd_driver = {
Expand Down

0 comments on commit e6125fb

Please sign in to comment.