mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[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>
This commit is contained in:
parent
9513e5e3f5
commit
3863e72414
1 changed files with 11 additions and 5 deletions
|
@ -632,12 +632,9 @@ __raw3270_size_device(struct raw3270 *rp)
|
||||||
raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data);
|
raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data);
|
||||||
|
|
||||||
rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request);
|
rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request);
|
||||||
if (rc) {
|
if (rc)
|
||||||
/* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */
|
/* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */
|
||||||
if (rc == -EOPNOTSUPP && MACHINE_IS_VM)
|
|
||||||
return __raw3270_size_device_vm(rp);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
|
||||||
|
|
||||||
/* Wait for attention interrupt. */
|
/* Wait for attention interrupt. */
|
||||||
#ifdef CONFIG_TN3270_CONSOLE
|
#ifdef CONFIG_TN3270_CONSOLE
|
||||||
|
@ -695,7 +692,10 @@ raw3270_size_device(struct raw3270 *rp)
|
||||||
down(&raw3270_init_sem);
|
down(&raw3270_init_sem);
|
||||||
rp->view = &raw3270_init_view;
|
rp->view = &raw3270_init_view;
|
||||||
raw3270_init_view.dev = rp;
|
raw3270_init_view.dev = rp;
|
||||||
rc = __raw3270_size_device(rp);
|
if (MACHINE_IS_VM)
|
||||||
|
rc = __raw3270_size_device_vm(rp);
|
||||||
|
else
|
||||||
|
rc = __raw3270_size_device(rp);
|
||||||
raw3270_init_view.dev = 0;
|
raw3270_init_view.dev = 0;
|
||||||
rp->view = 0;
|
rp->view = 0;
|
||||||
up(&raw3270_init_sem);
|
up(&raw3270_init_sem);
|
||||||
|
@ -710,6 +710,12 @@ raw3270_size_device(struct raw3270 *rp)
|
||||||
rp->model = 4;
|
rp->model = 4;
|
||||||
if (rp->rows == 27 && rp->cols == 132)
|
if (rp->rows == 27 && rp->cols == 132)
|
||||||
rp->model = 5;
|
rp->model = 5;
|
||||||
|
} else {
|
||||||
|
/* Couldn't detect size. Use default model 2. */
|
||||||
|
rp->model = 2;
|
||||||
|
rp->rows = 24;
|
||||||
|
rp->cols = 80;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue