[PATCH] s390: re-activated path detection
authorCornelia Huck <cohuck@de.ibm.com>
Fri, 6 Jan 2006 08:19:13 +0000 (00:19 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:49 +0000 (08:33 -0800)
If we receive path not operational indications (pnom in pmcw nonzero), we
switch off those paths.  To catch them becoming available again, we have to
recalculate the lpm from the pmcw each time we start path verification.

Signed-off-by: Cornelia Huck <cohuck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/cio/device_pgid.c

index 0adac8a67331ecef5486c14c930c8d449f4f2174..757b2706d5a947ab3f7a67656156e9e255fcdc31 100644 (file)
@@ -22,6 +22,7 @@
 #include "cio_debug.h"
 #include "css.h"
 #include "device.h"
+#include "ioasm.h"
 
 /*
  * Start Sense Path Group ID helper function. Used in ccw_device_recog
@@ -364,8 +365,22 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
 void
 ccw_device_verify_start(struct ccw_device *cdev)
 {
+       struct subchannel *sch = to_subchannel(cdev->dev.parent);
+
        cdev->private->flags.pgid_single = 0;
        cdev->private->iretry = 5;
+       /*
+        * Update sch->lpm with current values to catch paths becoming
+        * available again.
+        */
+       if (stsch(sch->irq, &sch->schib)) {
+               ccw_device_verify_done(cdev, -ENODEV);
+               return;
+       }
+       sch->lpm = sch->schib.pmcw.pim &
+               sch->schib.pmcw.pam &
+               sch->schib.pmcw.pom &
+               sch->opm;
        __ccw_device_verify_start(cdev);
 }