diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2010-08-09 18:12:53 +0200 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-08-09 18:12:54 +0200 |
commit | 982bdf814616bec77c920e16ea4108d409f144ed (patch) | |
tree | 7aee4e1dde2001ca5415103778fb95e93c3d2065 /drivers/s390/cio/ccwreq.c | |
parent | [S390] cio: ccw_device_online_store return -EINVAL in case of missing driver (diff) | |
download | linux-982bdf814616bec77c920e16ea4108d409f144ed.tar.xz linux-982bdf814616bec77c920e16ea4108d409f144ed.zip |
[S390] ccwreq: add ability to use all paths
Change the ccwrequest infrastructure to use more than one channel
path per start I/O. A flag "singlepath" is added to struct
ccw_request - if set, the old behavior is used. This flag is set
for all exploiters of the ccwrequest infrastructure - so there
is no functional change through this patch.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.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.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/s390/cio/ccwreq.c b/drivers/s390/cio/ccwreq.c index fd0368785ee0..d15f8b4d78bd 100644 --- a/drivers/s390/cio/ccwreq.c +++ b/drivers/s390/cio/ccwreq.c @@ -38,9 +38,13 @@ static u16 ccwreq_next_path(struct ccw_device *cdev) { struct ccw_request *req = &cdev->private->req; + if (!req->singlepath) { + req->mask = 0; + goto out; + } req->retries = req->maxretries; req->mask = lpm_adjust(req->mask >>= 1, req->lpm); - +out: return req->mask; } @@ -113,8 +117,12 @@ void ccw_request_start(struct ccw_device *cdev) { struct ccw_request *req = &cdev->private->req; - /* Try all paths twice to counter link flapping. */ - req->mask = 0x8080; + if (req->singlepath) { + /* Try all paths twice to counter link flapping. */ + req->mask = 0x8080; + } else + req->mask = req->lpm; + req->retries = req->maxretries; req->mask = lpm_adjust(req->mask, req->lpm); req->drc = 0; |