Linux-S390 Archive on lore.kernel.org
 help / color / Atom feed
From: Valentin Vidic <vvidic@valentin-vidic.from.hr>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	Philipp Kern <pkern@debian.org>,
	Benjamin Zimmermann <dave@oss.volkswagen.com>,
	debian-s390@lists.debian.org,
	Peter Oberparleiter <oberpar@linux.ibm.com>,
	Valentin Vidic <vvidic@valentin-vidic.from.hr>
Subject: [PATCH v2] s390/sclp_vt220: Fix console name to match device
Date: Tue, 27 Apr 2021 21:40:10 +0200
Message-ID: <20210427194010.9330-1-vvidic@valentin-vidic.from.hr> (raw)
In-Reply-To: <20200519181654.16765-1-vvidic@valentin-vidic.from.hr>

Console name reported in /proc/consoles:

  ttyS1                -W- (EC p  )    4:65

does not match the char device name:

  crw--w----    1 root     root        4,  65 May 17 12:18 /dev/ttysclp0

so debian-installer inside a QEMU s390x instance gets confused and fails
to start with the following error:

  steal-ctty: No such file or directory

Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
---
 v2: also update preferred console for VT220 case

 arch/s390/kernel/setup.c       | 2 +-
 drivers/s390/char/sclp_vt220.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 72134f9f6ff5..3ec6ca9c26c0 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -165,7 +165,7 @@ static void __init set_preferred_console(void)
 	else if (CONSOLE_IS_3270)
 		add_preferred_console("tty3270", 0, NULL);
 	else if (CONSOLE_IS_VT220)
-		add_preferred_console("ttyS", 1, NULL);
+		add_preferred_console("ttysclp", 0, NULL);
 	else if (CONSOLE_IS_HVC)
 		add_preferred_console("hvc", 0, NULL);
 }
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 047f812d1a1c..71ed1bf15598 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -35,8 +35,8 @@
 #define SCLP_VT220_MINOR		65
 #define SCLP_VT220_DRIVER_NAME		"sclp_vt220"
 #define SCLP_VT220_DEVICE_NAME		"ttysclp"
-#define SCLP_VT220_CONSOLE_NAME		"ttyS"
-#define SCLP_VT220_CONSOLE_INDEX	1	/* console=ttyS1 */
+#define SCLP_VT220_CONSOLE_NAME		"ttysclp"
+#define SCLP_VT220_CONSOLE_INDEX	0	/* console=ttysclp0 */
 
 /* Representation of a single write request */
 struct sclp_vt220_request {
-- 
2.20.1


  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 18:16 [PATCH] " Valentin Vidic
2020-05-20  5:25 ` Christian Borntraeger
2020-05-20  7:07   ` Valentin Vidić
2020-05-20  7:14     ` Christian Borntraeger
2020-05-20  8:04       ` Valentin Vidić
2021-04-27 19:40 ` Valentin Vidic [this message]
2021-04-28 12:39   ` [PATCH v2] " Christian Borntraeger
2021-04-28 13:38   ` Hendrik Brueckner
2021-04-28 14:44     ` Christian Borntraeger
2021-04-28 16:13     ` Valentin Vidić

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210427194010.9330-1-vvidic@valentin-vidic.from.hr \
    --to=vvidic@valentin-vidic.from.hr \
    --cc=borntraeger@de.ibm.com \
    --cc=dave@oss.volkswagen.com \
    --cc=debian-s390@lists.debian.org \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=pkern@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-S390 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-s390/0 linux-s390/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-s390 linux-s390/ https://lore.kernel.org/linux-s390 \
		linux-s390@vger.kernel.org
	public-inbox-index linux-s390

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-s390


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git