diff options
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index c4d2f667a2f6..9f016fef6101 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -482,17 +482,21 @@ static int online_store_recog_and_online(struct ccw_device *cdev) | |||
482 | } | 482 | } |
483 | wait_event(cdev->private->wait_q, | 483 | wait_event(cdev->private->wait_q, |
484 | cdev->private->flags.recog_done); | 484 | cdev->private->flags.recog_done); |
485 | if (cdev->private->state != DEV_STATE_OFFLINE) | ||
486 | /* recognition failed */ | ||
487 | return -EAGAIN; | ||
485 | } | 488 | } |
486 | if (cdev->drv && cdev->drv->set_online) | 489 | if (cdev->drv && cdev->drv->set_online) |
487 | ccw_device_set_online(cdev); | 490 | ccw_device_set_online(cdev); |
488 | return 0; | 491 | return 0; |
489 | } | 492 | } |
493 | |||
490 | static int online_store_handle_online(struct ccw_device *cdev, int force) | 494 | static int online_store_handle_online(struct ccw_device *cdev, int force) |
491 | { | 495 | { |
492 | int ret; | 496 | int ret; |
493 | 497 | ||
494 | ret = online_store_recog_and_online(cdev); | 498 | ret = online_store_recog_and_online(cdev); |
495 | if (ret) | 499 | if (ret && !force) |
496 | return ret; | 500 | return ret; |
497 | if (force && cdev->private->state == DEV_STATE_BOXED) { | 501 | if (force && cdev->private->state == DEV_STATE_BOXED) { |
498 | ret = ccw_device_stlck(cdev); | 502 | ret = ccw_device_stlck(cdev); |
@@ -500,7 +504,9 @@ static int online_store_handle_online(struct ccw_device *cdev, int force) | |||
500 | return ret; | 504 | return ret; |
501 | if (cdev->id.cu_type == 0) | 505 | if (cdev->id.cu_type == 0) |
502 | cdev->private->state = DEV_STATE_NOT_OPER; | 506 | cdev->private->state = DEV_STATE_NOT_OPER; |
503 | online_store_recog_and_online(cdev); | 507 | ret = online_store_recog_and_online(cdev); |
508 | if (ret) | ||
509 | return ret; | ||
504 | } | 510 | } |
505 | return 0; | 511 | return 0; |
506 | } | 512 | } |