aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device_fsm.c
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2009-12-07 06:51:22 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:30 -0500
commit7c4d964fa4e857d6fb6b63159a898a5c63c173bf (patch)
tree97127df21a028c4be71972740dafb7c05e484af3 /drivers/s390/cio/device_fsm.c
parent736b5db895eb900c108fe9e9b1659c171481169e (diff)
[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/device_fsm.c')
-rw-r--r--drivers/s390/cio/device_fsm.c19
1 files changed, 9 insertions, 10 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)
549 sch = to_subchannel(cdev->dev.parent); 549 sch = to_subchannel(cdev->dev.parent);
550 /* Update schib - pom may have changed. */ 550 /* Update schib - pom may have changed. */
551 if (cio_update_schib(sch)) { 551 if (cio_update_schib(sch)) {
552 cdev->private->flags.donotify = 0; 552 err = -ENODEV;
553 ccw_device_done(cdev, DEV_STATE_NOT_OPER); 553 goto callback;
554 return;
555 } 554 }
556 /* Update lpm with verified path mask. */ 555 /* Update lpm with verified path mask. */
557 sch->lpm = sch->vpm; 556 sch->lpm = sch->vpm;
@@ -561,9 +560,8 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
561 ccw_device_verify_start(cdev); 560 ccw_device_verify_start(cdev);
562 return; 561 return;
563 } 562 }
563callback:
564 switch (err) { 564 switch (err) {
565 case -EOPNOTSUPP: /* path grouping not supported, just set online. */
566 cdev->private->options.pgroup = 0;
567 case 0: 565 case 0:
568 ccw_device_done(cdev, DEV_STATE_ONLINE); 566 ccw_device_done(cdev, DEV_STATE_ONLINE);
569 /* Deliver fake irb to device driver, if needed. */ 567 /* Deliver fake irb to device driver, if needed. */
@@ -586,14 +584,15 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
586 cdev->private->flags.donotify = 0; 584 cdev->private->flags.donotify = 0;
587 ccw_device_done(cdev, DEV_STATE_BOXED); 585 ccw_device_done(cdev, DEV_STATE_BOXED);
588 break; 586 break;
587 case -EACCES:
588 /* Reset oper notify indication after verify error. */
589 cdev->private->flags.donotify = 0;
590 ccw_device_done(cdev, DEV_STATE_DISCONNECTED);
591 break;
589 default: 592 default:
590 /* Reset oper notify indication after verify error. */ 593 /* Reset oper notify indication after verify error. */
591 cdev->private->flags.donotify = 0; 594 cdev->private->flags.donotify = 0;
592 if (cdev->online) { 595 ccw_device_done(cdev, DEV_STATE_NOT_OPER);
593 ccw_device_set_timeout(cdev, 0);
594 dev_fsm_event(cdev, DEV_EVENT_NOTOPER);
595 } else
596 ccw_device_done(cdev, DEV_STATE_NOT_OPER);
597 break; 596 break;
598 } 597 }
599} 598}