summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/ccwreq.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2010-08-09 18:12:53 +0200
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-08-09 18:12:54 +0200
commit982bdf814616bec77c920e16ea4108d409f144ed (patch)
tree7aee4e1dde2001ca5415103778fb95e93c3d2065 /drivers/s390/cio/ccwreq.c
parent7cd403142d5dbffa354b7dd369b1069e01b1ae19 (diff)
downloadop-kernel-dev-982bdf814616bec77c920e16ea4108d409f144ed.zip
op-kernel-dev-982bdf814616bec77c920e16ea4108d409f144ed.tar.gz
[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.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/s390/cio/ccwreq.c b/drivers/s390/cio/ccwreq.c
index fd03687..d15f8b4 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;
OpenPOWER on IntegriCloud