Commit 51370f4e authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: dasd driver changes

From: Horst Hummel <horst.hummel@de.ibm.com>

dasd device driver changes:
 - Set and check the retry counter in start_IO for all requests.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 18c9628e
...@@ -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.146 $ * $Revision: 1.147 $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -739,8 +739,16 @@ dasd_start_IO(struct dasd_ccw_req * cqr) ...@@ -739,8 +739,16 @@ dasd_start_IO(struct dasd_ccw_req * cqr)
if (rc) if (rc)
return rc; return rc;
device = (struct dasd_device *) cqr->device; device = (struct dasd_device *) cqr->device;
if (cqr->retries < 0) {
DEV_MESSAGE(KERN_DEBUG, device,
"start_IO: request %p (%02x/%i) - no retry left.",
cqr, cqr->status, cqr->retries);
cqr->status = DASD_CQR_FAILED;
return -EIO;
}
cqr->startclk = get_clock(); cqr->startclk = get_clock();
cqr->starttime = jiffies; cqr->starttime = jiffies;
cqr->retries--;
rc = ccw_device_start(device->cdev, cqr->cpaddr, (long) cqr, rc = ccw_device_start(device->cdev, cqr->cpaddr, (long) cqr,
cqr->lpm, 0); cqr->lpm, 0);
switch (rc) { switch (rc) {
...@@ -1067,7 +1075,6 @@ __dasd_process_ccw_queue(struct dasd_device * device, ...@@ -1067,7 +1075,6 @@ __dasd_process_ccw_queue(struct dasd_device * device,
break; break;
/* Process requests with DASD_CQR_ERROR */ /* Process requests with DASD_CQR_ERROR */
if (cqr->status == DASD_CQR_ERROR) { if (cqr->status == DASD_CQR_ERROR) {
cqr->retries--;
if (cqr->irb.scsw.fctl & SCSW_FCTL_HALT_FUNC) { if (cqr->irb.scsw.fctl & SCSW_FCTL_HALT_FUNC) {
cqr->status = DASD_CQR_FAILED; cqr->status = DASD_CQR_FAILED;
cqr->stopclk = get_clock(); cqr->stopclk = get_clock();
......
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