summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2009-12-07 12:51:22 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 12:51:30 +0100
commit7c4d964fa4e857d6fb6b63159a898a5c63c173bf (patch)
tree97127df21a028c4be71972740dafb7c05e484af3 /drivers/s390/cio
parent736b5db895eb900c108fe9e9b1659c171481169e (diff)
downloadblackbird-op-linux-7c4d964fa4e857d6fb6b63159a898a5c63c173bf.tar.gz
blackbird-op-linux-7c4d964fa4e857d6fb6b63159a898a5c63c173bf.zip
[S390] cio: handle error during path verification consistently
Handle verification errors consistently through the existing callback ccw_device_done to reduce cleanup code duplication. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/device_fsm.c19
-rw-r--r--drivers/s390/cio/device_pgid.c2
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 83adb919648f..a70c46c8b4bc 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -549,9 +549,8 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
sch = to_subchannel(cdev->dev.parent);
/* Update schib - pom may have changed. */
if (cio_update_schib(sch)) {
- cdev->private->flags.donotify = 0;
- ccw_device_done(cdev, DEV_STATE_NOT_OPER);
- return;
+ err = -ENODEV;
+ goto callback;
}
/* Update lpm with verified path mask. */
sch->lpm = sch->vpm;
@@ -561,9 +560,8 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
ccw_device_verify_start(cdev);
return;
}
+callback:
switch (err) {
- case -EOPNOTSUPP: /* path grouping not supported, just set online. */
- cdev->private->options.pgroup = 0;
case 0:
ccw_device_done(cdev, DEV_STATE_ONLINE);
/* Deliver fake irb to device driver, if needed. */
@@ -586,14 +584,15 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
cdev->private->flags.donotify = 0;
ccw_device_done(cdev, DEV_STATE_BOXED);
break;
+ case -EACCES:
+ /* Reset oper notify indication after verify error. */
+ cdev->private->flags.donotify = 0;
+ ccw_device_done(cdev, DEV_STATE_DISCONNECTED);
+ break;
default:
/* Reset oper notify indication after verify error. */
cdev->private->flags.donotify = 0;
- if (cdev->online) {
- ccw_device_set_timeout(cdev, 0);
- dev_fsm_event(cdev, DEV_EVENT_NOTOPER);
- } else
- ccw_device_done(cdev, DEV_STATE_NOT_OPER);
+ ccw_device_done(cdev, DEV_STATE_NOT_OPER);
break;
}
}
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c
index fc5ca1dd52b3..cb27bd4cc231 100644
--- a/drivers/s390/cio/device_pgid.c
+++ b/drivers/s390/cio/device_pgid.c
@@ -423,7 +423,7 @@ __ccw_device_verify_start(struct ccw_device *cdev)
/* Permanent path failure, try next. */
}
/* Done with all paths. */
- ccw_device_verify_done(cdev, (sch->vpm != 0) ? 0 : -ENODEV);
+ ccw_device_verify_done(cdev, (sch->vpm != 0) ? 0 : -EACCES);
}
/*
OpenPOWER on IntegriCloud