]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[S390] dasd: let recovery cqr inherit flags from failed cqr
authorStefan Weinhuber <wein@de.ibm.com>
Mon, 25 Oct 2010 14:10:08 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:14 +0000 (16:10 +0200)
The usual way to recover a failed DASD ECKD request (cqr) is to create
a new request with an appropriate recovery CCW program.  Certain
features, e.g. failfast, can be enabled per request and are stored in
the requests flags. These flags have to be copied from the failed to
the recovery request, to let the recovery request use the same
features as the original one.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_3990_erp.c

index e82d427ff5ebc8bf14a0e227e0ae5c32077bd797..968c76cf71276e91c8d21c5d523c3f4a214cbade 100644 (file)
@@ -221,6 +221,7 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier)
        ccw->cmd_code = CCW_CMD_DCTL;
        ccw->count = 4;
        ccw->cda = (__u32)(addr_t) DCTL_data;
        ccw->cmd_code = CCW_CMD_DCTL;
        ccw->count = 4;
        ccw->cda = (__u32)(addr_t) DCTL_data;
+       dctl_cqr->flags = erp->flags;
        dctl_cqr->function = dasd_3990_erp_DCTL;
        dctl_cqr->refers = erp;
        dctl_cqr->startdev = device;
        dctl_cqr->function = dasd_3990_erp_DCTL;
        dctl_cqr->refers = erp;
        dctl_cqr->startdev = device;
@@ -1710,6 +1711,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
        ccw->cda = cpa;
 
        /* fill erp related fields */
        ccw->cda = cpa;
 
        /* fill erp related fields */
+       erp->flags = default_erp->flags;
        erp->function = dasd_3990_erp_action_1B_32;
        erp->refers = default_erp->refers;
        erp->startdev = device;
        erp->function = dasd_3990_erp_action_1B_32;
        erp->refers = default_erp->refers;
        erp->startdev = device;
@@ -2354,6 +2356,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
                ccw->cda      = (long)(cqr->cpaddr);
        }
 
                ccw->cda      = (long)(cqr->cpaddr);
        }
 
+       erp->flags = cqr->flags;
        erp->function = dasd_3990_erp_add_erp;
        erp->refers   = cqr;
        erp->startdev = device;
        erp->function = dasd_3990_erp_add_erp;
        erp->refers   = cqr;
        erp->startdev = device;