diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-11-03 15:14:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-11-03 15:14:39 -0500 |
commit | 2058297d2d045cb57138c33b87cfabcc80e65186 (patch) | |
tree | 7ccffd0e162cbd7471f643561e79f23abb989a62 /drivers/s390/block | |
parent | 150e6c67f4bf6ab51e62defc41bd19a2eefe5709 (diff) | |
parent | 4b27e1bb442e964903f8a3fa6bdf33a602dc0941 (diff) |
Merge branch 'for-linus' into for-2.6.33
Conflicts:
block/cfq-iosched.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 18 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 13 |
2 files changed, 24 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index dad0449475b6..aaccc8ecfa8f 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -2508,8 +2508,6 @@ int dasd_generic_restore_device(struct ccw_device *cdev) | |||
2508 | device->stopped &= ~DASD_UNRESUMED_PM; | 2508 | device->stopped &= ~DASD_UNRESUMED_PM; |
2509 | 2509 | ||
2510 | dasd_schedule_device_bh(device); | 2510 | dasd_schedule_device_bh(device); |
2511 | if (device->block) | ||
2512 | dasd_schedule_block_bh(device->block); | ||
2513 | 2511 | ||
2514 | if (device->discipline->restore) | 2512 | if (device->discipline->restore) |
2515 | rc = device->discipline->restore(device); | 2513 | rc = device->discipline->restore(device); |
@@ -2520,6 +2518,9 @@ int dasd_generic_restore_device(struct ccw_device *cdev) | |||
2520 | */ | 2518 | */ |
2521 | device->stopped |= DASD_UNRESUMED_PM; | 2519 | device->stopped |= DASD_UNRESUMED_PM; |
2522 | 2520 | ||
2521 | if (device->block) | ||
2522 | dasd_schedule_block_bh(device->block); | ||
2523 | |||
2523 | dasd_put_device(device); | 2524 | dasd_put_device(device); |
2524 | return 0; | 2525 | return 0; |
2525 | } | 2526 | } |
@@ -2532,6 +2533,7 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device, | |||
2532 | { | 2533 | { |
2533 | struct dasd_ccw_req *cqr; | 2534 | struct dasd_ccw_req *cqr; |
2534 | struct ccw1 *ccw; | 2535 | struct ccw1 *ccw; |
2536 | unsigned long *idaw; | ||
2535 | 2537 | ||
2536 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); | 2538 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); |
2537 | 2539 | ||
@@ -2545,9 +2547,17 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device, | |||
2545 | 2547 | ||
2546 | ccw = cqr->cpaddr; | 2548 | ccw = cqr->cpaddr; |
2547 | ccw->cmd_code = CCW_CMD_RDC; | 2549 | ccw->cmd_code = CCW_CMD_RDC; |
2548 | ccw->cda = (__u32)(addr_t)rdc_buffer; | 2550 | if (idal_is_needed(rdc_buffer, rdc_buffer_size)) { |
2549 | ccw->count = rdc_buffer_size; | 2551 | idaw = (unsigned long *) (cqr->data); |
2552 | ccw->cda = (__u32)(addr_t) idaw; | ||
2553 | ccw->flags = CCW_FLAG_IDA; | ||
2554 | idaw = idal_create_words(idaw, rdc_buffer, rdc_buffer_size); | ||
2555 | } else { | ||
2556 | ccw->cda = (__u32)(addr_t) rdc_buffer; | ||
2557 | ccw->flags = 0; | ||
2558 | } | ||
2550 | 2559 | ||
2560 | ccw->count = rdc_buffer_size; | ||
2551 | cqr->startdev = device; | 2561 | cqr->startdev = device; |
2552 | cqr->memdev = device; | 2562 | cqr->memdev = device; |
2553 | cqr->expires = 10*HZ; | 2563 | cqr->expires = 10*HZ; |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index ab3521755588..417b97cd3f94 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -2338,6 +2338,8 @@ static struct dasd_ccw_req *dasd_eckd_build_cp(struct dasd_device *startdev, | |||
2338 | /* Calculate number of blocks/records per track. */ | 2338 | /* Calculate number of blocks/records per track. */ |
2339 | blksize = block->bp_block; | 2339 | blksize = block->bp_block; |
2340 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); | 2340 | blk_per_trk = recs_per_track(&private->rdc_data, 0, blksize); |
2341 | if (blk_per_trk == 0) | ||
2342 | return ERR_PTR(-EINVAL); | ||
2341 | /* Calculate record id of first and last block. */ | 2343 | /* Calculate record id of first and last block. */ |
2342 | first_rec = first_trk = blk_rq_pos(req) >> block->s2b_shift; | 2344 | first_rec = first_trk = blk_rq_pos(req) >> block->s2b_shift; |
2343 | first_offs = sector_div(first_trk, blk_per_trk); | 2345 | first_offs = sector_div(first_trk, blk_per_trk); |
@@ -3211,8 +3213,10 @@ int dasd_eckd_pm_freeze(struct dasd_device *device) | |||
3211 | int dasd_eckd_restore_device(struct dasd_device *device) | 3213 | int dasd_eckd_restore_device(struct dasd_device *device) |
3212 | { | 3214 | { |
3213 | struct dasd_eckd_private *private; | 3215 | struct dasd_eckd_private *private; |
3216 | struct dasd_eckd_characteristics temp_rdc_data; | ||
3214 | int is_known, rc; | 3217 | int is_known, rc; |
3215 | struct dasd_uid temp_uid; | 3218 | struct dasd_uid temp_uid; |
3219 | unsigned long flags; | ||
3216 | 3220 | ||
3217 | private = (struct dasd_eckd_private *) device->private; | 3221 | private = (struct dasd_eckd_private *) device->private; |
3218 | 3222 | ||
@@ -3225,7 +3229,8 @@ int dasd_eckd_restore_device(struct dasd_device *device) | |||
3225 | rc = dasd_eckd_generate_uid(device, &private->uid); | 3229 | rc = dasd_eckd_generate_uid(device, &private->uid); |
3226 | dasd_get_uid(device->cdev, &temp_uid); | 3230 | dasd_get_uid(device->cdev, &temp_uid); |
3227 | if (memcmp(&private->uid, &temp_uid, sizeof(struct dasd_uid)) != 0) | 3231 | if (memcmp(&private->uid, &temp_uid, sizeof(struct dasd_uid)) != 0) |
3228 | dev_err(&device->cdev->dev, "The UID of the DASD has changed\n"); | 3232 | dev_err(&device->cdev->dev, "The UID of the DASD has " |
3233 | "changed\n"); | ||
3229 | if (rc) | 3234 | if (rc) |
3230 | goto out_err; | 3235 | goto out_err; |
3231 | dasd_set_uid(device->cdev, &private->uid); | 3236 | dasd_set_uid(device->cdev, &private->uid); |
@@ -3245,15 +3250,17 @@ int dasd_eckd_restore_device(struct dasd_device *device) | |||
3245 | dasd_eckd_read_features(device); | 3250 | dasd_eckd_read_features(device); |
3246 | 3251 | ||
3247 | /* Read Device Characteristics */ | 3252 | /* Read Device Characteristics */ |
3248 | memset(&private->rdc_data, 0, sizeof(private->rdc_data)); | ||
3249 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, | 3253 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, |
3250 | &private->rdc_data, 64); | 3254 | &temp_rdc_data, 64); |
3251 | if (rc) { | 3255 | if (rc) { |
3252 | DBF_EVENT(DBF_WARNING, | 3256 | DBF_EVENT(DBF_WARNING, |
3253 | "Read device characteristics failed, rc=%d for " | 3257 | "Read device characteristics failed, rc=%d for " |
3254 | "device: %s", rc, dev_name(&device->cdev->dev)); | 3258 | "device: %s", rc, dev_name(&device->cdev->dev)); |
3255 | goto out_err; | 3259 | goto out_err; |
3256 | } | 3260 | } |
3261 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | ||
3262 | memcpy(&private->rdc_data, &temp_rdc_data, sizeof(temp_rdc_data)); | ||
3263 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); | ||
3257 | 3264 | ||
3258 | /* add device to alias management */ | 3265 | /* add device to alias management */ |
3259 | dasd_alias_add_device(device); | 3266 | dasd_alias_add_device(device); |