diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index e728ce447f6e..3db3847ee137 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -387,19 +387,33 @@ ccw_device_done(struct ccw_device *cdev, int state) | |||
387 | 387 | ||
388 | cdev->private->state = state; | 388 | cdev->private->state = state; |
389 | 389 | ||
390 | if (state == DEV_STATE_BOXED) { | 390 | switch (state) { |
391 | case DEV_STATE_BOXED: | ||
391 | CIO_MSG_EVENT(0, "Boxed device %04x on subchannel %04x\n", | 392 | CIO_MSG_EVENT(0, "Boxed device %04x on subchannel %04x\n", |
392 | cdev->private->dev_id.devno, sch->schid.sch_no); | 393 | cdev->private->dev_id.devno, sch->schid.sch_no); |
393 | if (cdev->online && !ccw_device_notify(cdev, CIO_BOXED)) | 394 | if (cdev->online && !ccw_device_notify(cdev, CIO_BOXED)) |
394 | ccw_device_schedule_sch_unregister(cdev); | 395 | ccw_device_schedule_sch_unregister(cdev); |
395 | cdev->private->flags.donotify = 0; | 396 | cdev->private->flags.donotify = 0; |
396 | } | 397 | break; |
397 | if (state == DEV_STATE_NOT_OPER) { | 398 | case DEV_STATE_NOT_OPER: |
398 | CIO_MSG_EVENT(0, "Device %04x gone on subchannel %04x\n", | 399 | CIO_MSG_EVENT(0, "Device %04x gone on subchannel %04x\n", |
399 | cdev->private->dev_id.devno, sch->schid.sch_no); | 400 | cdev->private->dev_id.devno, sch->schid.sch_no); |
400 | if (!ccw_device_notify(cdev, CIO_GONE)) | 401 | if (!ccw_device_notify(cdev, CIO_GONE)) |
401 | ccw_device_schedule_sch_unregister(cdev); | 402 | ccw_device_schedule_sch_unregister(cdev); |
402 | cdev->private->flags.donotify = 0; | 403 | cdev->private->flags.donotify = 0; |
404 | break; | ||
405 | case DEV_STATE_DISCONNECTED: | ||
406 | CIO_MSG_EVENT(0, "Disconnected device %04x on subchannel " | ||
407 | "%04x\n", cdev->private->dev_id.devno, | ||
408 | sch->schid.sch_no); | ||
409 | if (!ccw_device_notify(cdev, CIO_NO_PATH)) | ||
410 | ccw_device_schedule_sch_unregister(cdev); | ||
411 | else | ||
412 | ccw_device_set_disconnected(cdev); | ||
413 | cdev->private->flags.donotify = 0; | ||
414 | break; | ||
415 | default: | ||
416 | break; | ||
403 | } | 417 | } |
404 | 418 | ||
405 | if (cdev->private->flags.donotify) { | 419 | if (cdev->private->flags.donotify) { |