diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2005-09-03 18:58:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:29 -0400 |
commit | 3863e72414fa2ebf5f3b615d1bf99de32e59980a (patch) | |
tree | fe8cdcee6d7c446621a2a254b238b3b2417bc6fc /drivers | |
parent | 9513e5e3f5a6b429da8a9fd4330f71f1e547c8e0 (diff) |
[PATCH] s390: disconnected 3270 console
Fix reboot with a disconnected 3270 console.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/char/raw3270.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index d5eefeaba50c..328d9cbc56a3 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -632,12 +632,9 @@ __raw3270_size_device(struct raw3270 *rp) | |||
632 | raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); | 632 | raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); |
633 | 633 | ||
634 | rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); | 634 | rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); |
635 | if (rc) { | 635 | if (rc) |
636 | /* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */ | 636 | /* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */ |
637 | if (rc == -EOPNOTSUPP && MACHINE_IS_VM) | ||
638 | return __raw3270_size_device_vm(rp); | ||
639 | return rc; | 637 | return rc; |
640 | } | ||
641 | 638 | ||
642 | /* Wait for attention interrupt. */ | 639 | /* Wait for attention interrupt. */ |
643 | #ifdef CONFIG_TN3270_CONSOLE | 640 | #ifdef CONFIG_TN3270_CONSOLE |
@@ -695,7 +692,10 @@ raw3270_size_device(struct raw3270 *rp) | |||
695 | down(&raw3270_init_sem); | 692 | down(&raw3270_init_sem); |
696 | rp->view = &raw3270_init_view; | 693 | rp->view = &raw3270_init_view; |
697 | raw3270_init_view.dev = rp; | 694 | raw3270_init_view.dev = rp; |
698 | rc = __raw3270_size_device(rp); | 695 | if (MACHINE_IS_VM) |
696 | rc = __raw3270_size_device_vm(rp); | ||
697 | else | ||
698 | rc = __raw3270_size_device(rp); | ||
699 | raw3270_init_view.dev = 0; | 699 | raw3270_init_view.dev = 0; |
700 | rp->view = 0; | 700 | rp->view = 0; |
701 | up(&raw3270_init_sem); | 701 | up(&raw3270_init_sem); |
@@ -710,6 +710,12 @@ raw3270_size_device(struct raw3270 *rp) | |||
710 | rp->model = 4; | 710 | rp->model = 4; |
711 | if (rp->rows == 27 && rp->cols == 132) | 711 | if (rp->rows == 27 && rp->cols == 132) |
712 | rp->model = 5; | 712 | rp->model = 5; |
713 | } else { | ||
714 | /* Couldn't detect size. Use default model 2. */ | ||
715 | rp->model = 2; | ||
716 | rp->rows = 24; | ||
717 | rp->cols = 80; | ||
718 | return 0; | ||
713 | } | 719 | } |
714 | return rc; | 720 | return rc; |
715 | } | 721 | } |