s390/sclp_tty: enable line mode tty even if there is an ascii console
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 21 Feb 2018 11:54:07 +0000 (11:54 +0000)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 19 Mar 2018 06:02:00 +0000 (23:02 -0700)
commit 8f50af49f564d4e5 ("s390/console: Make preferred console handling
more consistent") created a separate console state for the ascii
console. This has the side effect that we register no tty for the line
mode interface as soon as there an ascii interface as default console.
Under KVM this results in no getty program on the line mode tty if the
guest has both types of interfaces.

As we can have multiple ttys at the same time we do not want to disable
the tty on sclp_line0 under KVM. So instead of checking for the console
mode, we now check for the presence of the sclp line mode interface. As
z/VM multiplexes the line mode interface on the 32xx screen we continue
to disable the line mode tty for the z/VM case.

CC: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Fixes: 8f50af49f564d4e5 ("s390/console: Make preferred console handling more consistent")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/sclp_tty.c

index 9f7b87d6d4349f25c07a2fe421f1a3130efe3903..5aff8b684eb21e8557f253c7ddf18d48420435c1 100644 (file)
@@ -502,7 +502,10 @@ sclp_tty_init(void)
        int i;
        int rc;
 
-       if (!CONSOLE_IS_SCLP)
+       /* z/VM multiplexes the line mode output on the 32xx screen */
+       if (MACHINE_IS_VM && !CONSOLE_IS_SCLP)
+               return 0;
+       if (!sclp.has_linemode)
                return 0;
        driver = alloc_tty_driver(1);
        if (!driver)