Commit c6b04cd0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: dasd driver

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

dasd driver changes:
 - Do error recovery for error recovery requests.
 - Retry request if the start_IO failed because of a timeout.
parent 6019886d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com> * Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
* *
* $Revision: 1.139 $ * $Revision: 1.141 $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -751,16 +751,16 @@ dasd_start_IO(struct dasd_ccw_req * cqr) ...@@ -751,16 +751,16 @@ dasd_start_IO(struct dasd_ccw_req * cqr)
break; break;
case -EBUSY: case -EBUSY:
DBF_DEV_EVENT(DBF_ERR, device, "%s", DBF_DEV_EVENT(DBF_ERR, device, "%s",
"device busy, retry later"); "start_IO: device busy, retry later");
break; break;
case -ETIMEDOUT: case -ETIMEDOUT:
DBF_DEV_EVENT(DBF_ERR, device, "%s", DBF_DEV_EVENT(DBF_ERR, device, "%s",
"request timeout - terminated"); "start_IO: request timeout, retry later");
break;
case -ENODEV: case -ENODEV:
case -EIO: case -EIO:
cqr->status = DASD_CQR_FAILED; DBF_DEV_EVENT(DBF_ERR, device, "%s",
cqr->stopclk = cqr->startclk; "start_IO: device gone, retry");
dasd_schedule_bh(device);
break; break;
default: default:
DEV_MESSAGE(KERN_ERR, device, DEV_MESSAGE(KERN_ERR, device,
...@@ -1008,8 +1008,9 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, ...@@ -1008,8 +1008,9 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
if (device->discipline->start_IO(next) == 0) if (device->discipline->start_IO(next) == 0)
expires = next->expires; expires = next->expires;
else else
MESSAGE(KERN_WARNING, "%s", DEV_MESSAGE(KERN_DEBUG, device, "%s",
"Interrupt fastpath failed!"); "Interrupt fastpath "
"failed!");
} }
} }
} else { /* error */ } else { /* error */
...@@ -1018,7 +1019,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, ...@@ -1018,7 +1019,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
if (cqr->dstat) if (cqr->dstat)
memcpy(cqr->dstat, irb, sizeof (struct irb)); memcpy(cqr->dstat, irb, sizeof (struct irb));
else else
MESSAGE(KERN_ERR, "%s", DEV_MESSAGE(KERN_ERR, device, "%s",
"no memory for dstat...ignoring"); "no memory for dstat...ignoring");
#ifdef ERP_DEBUG #ifdef ERP_DEBUG
/* dump sense data */ /* dump sense data */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com> * Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
* *
* $Revision: 1.54 $ * $Revision: 1.55 $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -1070,7 +1070,7 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req) ...@@ -1070,7 +1070,7 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req)
cqr->device = device; cqr->device = device;
cqr->expires = 5 * 60 * HZ; /* 5 minutes */ cqr->expires = 5 * 60 * HZ; /* 5 minutes */
cqr->lpm = LPM_ANYPATH; cqr->lpm = LPM_ANYPATH;
cqr->retries = 2; cqr->retries = 256;
cqr->buildclk = get_clock(); cqr->buildclk = get_clock();
cqr->status = DASD_CQR_FILLED; cqr->status = DASD_CQR_FILLED;
return cqr; return cqr;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com> * Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -67,7 +67,8 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize, ...@@ -67,7 +67,8 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize,
} }
strncpy((char *) &cqr->magic, magic, 4); strncpy((char *) &cqr->magic, magic, 4);
ASCEBC((char *) &cqr->magic, 4); ASCEBC((char *) &cqr->magic, 4);
atomic_inc(&device->ref_count); set_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
dasd_get_device(device);
return cqr; return cqr;
} }
......
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