diff options
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 925b056dc2b3..5df05f26b7d9 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2307,17 +2307,27 @@ retry: rc = 0; list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) { - if (__dasd_sleep_on_erp(cqr)) { - if (!cqr->status == DASD_CQR_TERMINATED && - !cqr->status == DASD_CQR_NEED_ERP) - break; - rc = 1; + /* + * for alias devices simplify error recovery and + * return to upper layer + */ + if (cqr->startdev != cqr->basedev && + (cqr->status == DASD_CQR_TERMINATED || + cqr->status == DASD_CQR_NEED_ERP)) + return -EAGAIN; + else { + /* normal recovery for basedev IO */ + if (__dasd_sleep_on_erp(cqr)) { + if (!cqr->status == DASD_CQR_TERMINATED && + !cqr->status == DASD_CQR_NEED_ERP) + break; + rc = 1; + } } } if (rc) goto retry; - return 0; } |