diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-04-17 01:46:00 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:46:57 -0400 |
commit | fe6173d9b33dba18ec462051750fb1b9abcd796d (patch) | |
tree | 393cf3a058e880365b069915d6cb8bad96ec36aa /drivers/s390 | |
parent | 22806dc1a8ffd88a7c7bdd070879e6e323db496a (diff) |
[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: 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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device_ops.c | 9 | ||||
-rw-r--r-- | drivers/s390/cio/device_status.c | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 49b58eb0fab8..a1718a0aa539 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -193,8 +193,15 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, | |||
193 | return -EACCES; | 193 | return -EACCES; |
194 | } | 194 | } |
195 | ret = cio_start_key (sch, cpa, lpm, key); | 195 | ret = cio_start_key (sch, cpa, lpm, key); |
196 | if (ret == 0) | 196 | switch (ret) { |
197 | case 0: | ||
197 | cdev->private->intparm = intparm; | 198 | cdev->private->intparm = intparm; |
199 | break; | ||
200 | case -EACCES: | ||
201 | case -ENODEV: | ||
202 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
203 | break; | ||
204 | } | ||
198 | return ret; | 205 | return ret; |
199 | } | 206 | } |
200 | 207 | ||
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index ebe0848cfe33..4764b9e00b9e 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
@@ -312,6 +312,7 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) | |||
312 | { | 312 | { |
313 | struct subchannel *sch; | 313 | struct subchannel *sch; |
314 | struct ccw1 *sense_ccw; | 314 | struct ccw1 *sense_ccw; |
315 | int rc; | ||
315 | 316 | ||
316 | sch = to_subchannel(cdev->dev.parent); | 317 | sch = to_subchannel(cdev->dev.parent); |
317 | 318 | ||
@@ -337,7 +338,10 @@ ccw_device_do_sense(struct ccw_device *cdev, struct irb *irb) | |||
337 | /* Reset internal retry indication. */ | 338 | /* Reset internal retry indication. */ |
338 | cdev->private->flags.intretry = 0; | 339 | cdev->private->flags.intretry = 0; |
339 | 340 | ||
340 | return cio_start(sch, sense_ccw, 0xff); | 341 | rc = cio_start(sch, sense_ccw, 0xff); |
342 | if (rc == -ENODEV || rc == -EACCES) | ||
343 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); | ||
344 | return rc; | ||
341 | } | 345 | } |
342 | 346 | ||
343 | /* | 347 | /* |