]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] cio: Trigger verification on device/path not operational.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 17 Apr 2008 05:46:00 +0000 (07:46 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 17 Apr 2008 05:46:57 +0000 (07:46 +0200)
Currently, we don't do much on no path or no device situations during
normal user I/O, since we rely on reports regarding those events by
the machine. If we trigger a path verification to bring our device
state up-to-date, we (a) may recover from path failures earlier and
(b) better handle situations where the hardware/hypervisor doesn't
give us enough notifications.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
drivers/s390/cio/device_ops.c
drivers/s390/cio/device_status.c

index 49b58eb0fab85fcca862383b551a89f3e466c86d..a1718a0aa539d07bb5f9852597b25f18ae3b3c75 100644 (file)
@@ -193,8 +193,15 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
                        return -EACCES;
        }
        ret = cio_start_key (sch, cpa, lpm, key);
-       if (ret == 0)
+       switch (ret) {
+       case 0:
                cdev->private->intparm = intparm;
+               break;
+       case -EACCES:
+       case -ENODEV:
+               dev_fsm_event(cdev, DEV_EVENT_VERIFY);
+               break;
+       }
        return ret;
 }
 
index ebe0848cfe33c14361222f33b021485cd58f67d6..4764b9e00b9e01357e78ee20375d17c5968814d7 100644 (file)
@@ -312,6 +312,7 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb)
 {
        struct subchannel *sch;
        struct ccw1 *sense_ccw;
+       int rc;
 
        sch = to_subchannel(cdev->dev.parent);
 
@@ -337,7 +338,10 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb)
        /* Reset internal retry indication. */
        cdev->private->flags.intretry = 0;
 
-       return cio_start(sch, sense_ccw, 0xff);
+       rc = cio_start(sch, sense_ccw, 0xff);
+       if (rc == -ENODEV || rc == -EACCES)
+               dev_fsm_event(cdev, DEV_EVENT_VERIFY);
+       return rc;
 }
 
 /*