]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[S390] cio: use pim to check for multipath.
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 25 Dec 2008 12:39:15 +0000 (13:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:11 +0000 (13:39 +0100)
To check if multipath is available we count the bits set in lpm,
which could change over time (via configure [on|off] of a path).

The following patch uses the pim (which is persistent) for this
decision.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device.c

index 6d714cf550644e0649d4b20459aa9ef0e072548a..23d5752349b59d0f85b3274c206eea556123e10e 100644 (file)
@@ -1174,7 +1174,8 @@ void io_subchannel_init_config(struct subchannel *sch)
 {
        memset(&sch->config, 0, sizeof(sch->config));
        sch->config.csense = 1;
-       if ((sch->lpm & (sch->lpm - 1)) != 0)
+       /* Use subchannel mp mode when there is more than 1 installed CHPID. */
+       if ((sch->schib.pmcw.pim & (sch->schib.pmcw.pim - 1)) != 0)
                sch->config.mp = 1;
 }