Commit 336c340b authored by Horst Hummel's avatar Horst Hummel Committed by Martin Schwidefsky

[S390] dasd: fix unconditional reserve handling.

The reserve/release IOCTLs sometimes do not work. If second system
does a 'steal lock' the pending unit check (Format 3 Msg F) is
delivered. Since ERP is disabled for reserve/release, the IOCTL call
fails. We have to allow basic ERP (retries) for reserve/release IOCTLs.
Signed-off-by: default avatarHorst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent db273819
...@@ -1022,8 +1022,6 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, ...@@ -1022,8 +1022,6 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
irb->scsw.cstat == 0 && irb->scsw.cstat == 0 &&
!irb->esw.esw0.erw.cons) !irb->esw.esw0.erw.cons)
era = dasd_era_none; era = dasd_era_none;
else if (!test_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags))
era = dasd_era_fatal; /* don't recover this request */
else if (irb->esw.esw0.erw.cons) else if (irb->esw.esw0.erw.cons)
era = device->discipline->examine_error(cqr, irb); era = device->discipline->examine_error(cqr, irb);
else else
...@@ -1127,7 +1125,9 @@ __dasd_process_ccw_queue(struct dasd_device * device, ...@@ -1127,7 +1125,9 @@ __dasd_process_ccw_queue(struct dasd_device * device,
cqr->status = DASD_CQR_FAILED; cqr->status = DASD_CQR_FAILED;
cqr->stopclk = get_clock(); cqr->stopclk = get_clock();
} else { } else {
if (cqr->irb.esw.esw0.erw.cons) { if (cqr->irb.esw.esw0.erw.cons &&
test_bit(DASD_CQR_FLAGS_USE_ERP,
&cqr->flags)) {
erp_fn = device->discipline-> erp_fn = device->discipline->
erp_action(cqr); erp_action(cqr);
erp_fn(cqr); erp_fn(cqr);
......
...@@ -1380,7 +1380,7 @@ dasd_eckd_release(struct dasd_device *device) ...@@ -1380,7 +1380,7 @@ dasd_eckd_release(struct dasd_device *device)
cqr->device = device; cqr->device = device;
clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->retries = 0; cqr->retries = 2; /* set retry counter to enable basic ERP */
cqr->expires = 2 * HZ; cqr->expires = 2 * HZ;
cqr->buildclk = get_clock(); cqr->buildclk = get_clock();
cqr->status = DASD_CQR_FILLED; cqr->status = DASD_CQR_FILLED;
...@@ -1420,7 +1420,7 @@ dasd_eckd_reserve(struct dasd_device *device) ...@@ -1420,7 +1420,7 @@ dasd_eckd_reserve(struct dasd_device *device)
cqr->device = device; cqr->device = device;
clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->retries = 0; cqr->retries = 2; /* set retry counter to enable basic ERP */
cqr->expires = 2 * HZ; cqr->expires = 2 * HZ;
cqr->buildclk = get_clock(); cqr->buildclk = get_clock();
cqr->status = DASD_CQR_FILLED; cqr->status = DASD_CQR_FILLED;
...@@ -1459,7 +1459,7 @@ dasd_eckd_steal_lock(struct dasd_device *device) ...@@ -1459,7 +1459,7 @@ dasd_eckd_steal_lock(struct dasd_device *device)
cqr->device = device; cqr->device = device;
clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags); set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
cqr->retries = 0; cqr->retries = 2; /* set retry counter to enable basic ERP */
cqr->expires = 2 * HZ; cqr->expires = 2 * HZ;
cqr->buildclk = get_clock(); cqr->buildclk = get_clock();
cqr->status = DASD_CQR_FILLED; cqr->status = DASD_CQR_FILLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment