aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_eer.c')
-rw-r--r--drivers/s390/block/dasd_eer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index 0c081a664ee8..6e53ab606e97 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -336,7 +336,7 @@ static void dasd_eer_write_snss_trigger(struct dasd_device *device,
336 unsigned long flags; 336 unsigned long flags;
337 struct eerbuffer *eerb; 337 struct eerbuffer *eerb;
338 338
339 snss_rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; 339 snss_rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO;
340 if (snss_rc) 340 if (snss_rc)
341 data_size = 0; 341 data_size = 0;
342 else 342 else
@@ -404,10 +404,11 @@ void dasd_eer_snss(struct dasd_device *device)
404 set_bit(DASD_FLAG_EER_SNSS, &device->flags); 404 set_bit(DASD_FLAG_EER_SNSS, &device->flags);
405 return; 405 return;
406 } 406 }
407 /* cdev is already locked, can't use dasd_add_request_head */
407 clear_bit(DASD_FLAG_EER_SNSS, &device->flags); 408 clear_bit(DASD_FLAG_EER_SNSS, &device->flags);
408 cqr->status = DASD_CQR_QUEUED; 409 cqr->status = DASD_CQR_QUEUED;
409 list_add(&cqr->list, &device->ccw_queue); 410 list_add(&cqr->devlist, &device->ccw_queue);
410 dasd_schedule_bh(device); 411 dasd_schedule_device_bh(device);
411} 412}
412 413
413/* 414/*
@@ -415,7 +416,7 @@ void dasd_eer_snss(struct dasd_device *device)
415 */ 416 */
416static void dasd_eer_snss_cb(struct dasd_ccw_req *cqr, void *data) 417static void dasd_eer_snss_cb(struct dasd_ccw_req *cqr, void *data)
417{ 418{
418 struct dasd_device *device = cqr->device; 419 struct dasd_device *device = cqr->startdev;
419 unsigned long flags; 420 unsigned long flags;
420 421
421 dasd_eer_write(device, cqr, DASD_EER_STATECHANGE); 422 dasd_eer_write(device, cqr, DASD_EER_STATECHANGE);
@@ -458,7 +459,7 @@ int dasd_eer_enable(struct dasd_device *device)
458 if (!cqr) 459 if (!cqr)
459 return -ENOMEM; 460 return -ENOMEM;
460 461
461 cqr->device = device; 462 cqr->startdev = device;
462 cqr->retries = 255; 463 cqr->retries = 255;
463 cqr->expires = 10 * HZ; 464 cqr->expires = 10 * HZ;
464 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); 465 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);