Skip to content

Commit

Permalink
[S390] cio: Trigger verification on device/path not operational.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cornelia Huck authored and Heiko Carstens committed Apr 17, 2008
1 parent 22806dc commit fe6173d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion drivers/s390/cio/device_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 5 additions & 1 deletion drivers/s390/cio/device_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}

/*
Expand Down

0 comments on commit fe6173d

Please sign in to comment.