summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_diag.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-01-30 09:26:14 +0000
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-07-01 17:31:20 +0200
commita2ace46632fb38c7a3771f2f0d235a4295e83bcf (patch)
tree3d69366b49c18967fda51cb6b0355148f91f7d6f /drivers/s390/block/dasd_diag.c
parent1fbdb8be9bfc91efd45720493c7ecae884ae22bd (diff)
downloadblackbird-obmc-linux-a2ace46632fb38c7a3771f2f0d235a4295e83bcf.tar.gz
blackbird-obmc-linux-a2ace46632fb38c7a3771f2f0d235a4295e83bcf.zip
s390/dasd: Implement block timeout handling
This patch implements generic block layer timeout handling callbacks for DASDs. When the timeout expires the respective cqr is aborted. With this timeout handler time-critical request abort is guaranteed as the abort does not depend on the internal state of the various DASD driver queues. Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_diag.c')
-rw-r--r--drivers/s390/block/dasd_diag.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 154842242c3d..feca317b33de 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -583,7 +583,10 @@ dasd_diag_free_cp(struct dasd_ccw_req *cqr, struct request *req)
static void dasd_diag_handle_terminated_request(struct dasd_ccw_req *cqr)
{
- cqr->status = DASD_CQR_FILLED;
+ if (cqr->retries < 0)
+ cqr->status = DASD_CQR_FAILED;
+ else
+ cqr->status = DASD_CQR_FILLED;
};
/* Fill in IOCTL data for device. */
OpenPOWER on IntegriCloud