Commit fe6173d9 authored by Cornelia Huck's avatar Cornelia Huck Committed by Heiko Carstens

[S390] cio: Trigger verification on device/path not operational.

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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 22806dc1
...@@ -193,8 +193,15 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, ...@@ -193,8 +193,15 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
return -EACCES; return -EACCES;
} }
ret = cio_start_key (sch, cpa, lpm, key); ret = cio_start_key (sch, cpa, lpm, key);
if (ret == 0) switch (ret) {
case 0:
cdev->private->intparm = intparm; cdev->private->intparm = intparm;
break;
case -EACCES:
case -ENODEV:
dev_fsm_event(cdev, DEV_EVENT_VERIFY);
break;
}
return ret; return ret;
} }
......
...@@ -312,6 +312,7 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) ...@@ -312,6 +312,7 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb)
{ {
struct subchannel *sch; struct subchannel *sch;
struct ccw1 *sense_ccw; struct ccw1 *sense_ccw;
int rc;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
...@@ -337,7 +338,10 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) ...@@ -337,7 +338,10 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb)
/* Reset internal retry indication. */ /* Reset internal retry indication. */
cdev->private->flags.intretry = 0; 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;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment