aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-14 18:31:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-14 18:31:15 -0400
commite7d688ec86c9c6aa94b58eeb266f833a76407018 (patch)
treedb7ce6fe6fc9b8c69287d2e8ee11f8724d171682 /drivers/s390/block/dasd_eckd.c
parentd470c05bedc27dbd2df9d0bb6fd82336e4ff43db (diff)
parentac522b638dcb549f9d33085c6fadea88a5f826ae (diff)
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] sclp_vt220 build fix [S390] cio: change misleading console logic [S390] call home support: fix proc handler [S390] dasd: use idal for device characteristics [S390] Add highgprs facility to /proc/cpuinfo [S390] dasd: fix locking bug [S390] tape390: Fix request queue handling in block driver [S390] hypfs: Use subcode 6 if subcode 7 is not available
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 0be7c15f45c5..417b97cd3f94 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -3216,6 +3216,7 @@ int dasd_eckd_restore_device(struct dasd_device *device)
3216 struct dasd_eckd_characteristics temp_rdc_data; 3216 struct dasd_eckd_characteristics temp_rdc_data;
3217 int is_known, rc; 3217 int is_known, rc;
3218 struct dasd_uid temp_uid; 3218 struct dasd_uid temp_uid;
3219 unsigned long flags;
3219 3220
3220 private = (struct dasd_eckd_private *) device->private; 3221 private = (struct dasd_eckd_private *) device->private;
3221 3222
@@ -3228,7 +3229,8 @@ int dasd_eckd_restore_device(struct dasd_device *device)
3228 rc = dasd_eckd_generate_uid(device, &private->uid); 3229 rc = dasd_eckd_generate_uid(device, &private->uid);
3229 dasd_get_uid(device->cdev, &temp_uid); 3230 dasd_get_uid(device->cdev, &temp_uid);
3230 if (memcmp(&private->uid, &temp_uid, sizeof(struct dasd_uid)) != 0) 3231 if (memcmp(&private->uid, &temp_uid, sizeof(struct dasd_uid)) != 0)
3231 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");
3232 if (rc) 3234 if (rc)
3233 goto out_err; 3235 goto out_err;
3234 dasd_set_uid(device->cdev, &private->uid); 3236 dasd_set_uid(device->cdev, &private->uid);
@@ -3256,9 +3258,9 @@ int dasd_eckd_restore_device(struct dasd_device *device)
3256 "device: %s", rc, dev_name(&device->cdev->dev)); 3258 "device: %s", rc, dev_name(&device->cdev->dev));
3257 goto out_err; 3259 goto out_err;
3258 } 3260 }
3259 spin_lock(get_ccwdev_lock(device->cdev)); 3261 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
3260 memcpy(&private->rdc_data, &temp_rdc_data, sizeof(temp_rdc_data)); 3262 memcpy(&private->rdc_data, &temp_rdc_data, sizeof(temp_rdc_data));
3261 spin_unlock(get_ccwdev_lock(device->cdev)); 3263 spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
3262 3264
3263 /* add device to alias management */ 3265 /* add device to alias management */
3264 dasd_alias_add_device(device); 3266 dasd_alias_add_device(device);