aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/ccwreq.c
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2009-12-07 06:51:40 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:33 -0500
commitde1b04388f63cbddf91d9f6c50c29be7232881ca (patch)
tree2a2500ab1093bb77b81e84ae56ab3aae1501c52a /drivers/s390/cio/ccwreq.c
parent7a8ad1001c51bba0507ee08cb4323d8ddcb07c70 (diff)
[S390] cio: improve error recovery for internal I/Os
Improve error recovery for internal I/Os by repeating each I/O 256 times per path to cope with long-running non-permanent error conditions. Also retry each path twice to cope with link flapping, i.e. single paths becoming unavailable in the order in which they are tried. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/ccwreq.c')
-rw-r--r--drivers/s390/cio/ccwreq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/cio/ccwreq.c b/drivers/s390/cio/ccwreq.c
index a6e205a384b2..9509e3860934 100644
--- a/drivers/s390/cio/ccwreq.c
+++ b/drivers/s390/cio/ccwreq.c
@@ -82,7 +82,7 @@ static void ccwreq_do(struct ccw_device *cdev)
82 /* Perform start function. */ 82 /* Perform start function. */
83 sch->lpm = 0xff; 83 sch->lpm = 0xff;
84 memset(&cdev->private->irb, 0, sizeof(struct irb)); 84 memset(&cdev->private->irb, 0, sizeof(struct irb));
85 rc = cio_start(sch, cp, req->mask); 85 rc = cio_start(sch, cp, (u8) req->mask);
86 if (rc == 0) { 86 if (rc == 0) {
87 /* I/O started successfully. */ 87 /* I/O started successfully. */
88 ccw_device_set_timeout(cdev, req->timeout); 88 ccw_device_set_timeout(cdev, req->timeout);
@@ -116,7 +116,8 @@ void ccw_request_start(struct ccw_device *cdev)
116{ 116{
117 struct ccw_request *req = &cdev->private->req; 117 struct ccw_request *req = &cdev->private->req;
118 118
119 req->mask = 0x80; 119 /* Try all paths twice to counter link flapping. */
120 req->mask = 0x8080;
120 req->retries = req->maxretries; 121 req->retries = req->maxretries;
121 req->mask = lpm_adjust(req->mask, req->lpm); 122 req->mask = lpm_adjust(req->mask, req->lpm);
122 req->drc = 0; 123 req->drc = 0;
@@ -212,7 +213,7 @@ static void ccwreq_log_status(struct ccw_device *cdev, enum io_status status)
212 } __attribute__ ((packed)) data; 213 } __attribute__ ((packed)) data;
213 data.dev_id = cdev->private->dev_id; 214 data.dev_id = cdev->private->dev_id;
214 data.retries = req->retries; 215 data.retries = req->retries;
215 data.lpm = req->mask; 216 data.lpm = (u8) req->mask;
216 data.status = (u8) status; 217 data.status = (u8) status;
217 CIO_TRACE_EVENT(2, "reqstat"); 218 CIO_TRACE_EVENT(2, "reqstat");
218 CIO_HEX_EVENT(2, &data, sizeof(data)); 219 CIO_HEX_EVENT(2, &data, sizeof(data));