]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.19/sunhv-fix-device-naming-inconsistency-between-sunhv_.patch
fix up the 5.1 queue :(
[thirdparty/kernel/stable-queue.git] / queue-4.19 / sunhv-fix-device-naming-inconsistency-between-sunhv_.patch
CommitLineData
a15a8890
SL
1From 837cc34fcc298696326f1bd3d4e919d65f81e0b5 Mon Sep 17 00:00:00 2001
2From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
3Date: Tue, 11 Jun 2019 17:38:37 +0200
4Subject: sunhv: Fix device naming inconsistency between sunhv_console and
5 sunhv_reg
6
7[ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ]
8
9In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS"
10to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged.
11
12This results in the hypervisor console device to be listed as "ttyHV0" under
13/proc/consoles while the device node is still named "ttyS0":
14
15root@osaka:~# cat /proc/consoles
16ttyHV0 -W- (EC p ) 4:64
17tty0 -WU (E ) 4:1
18root@osaka:~# readlink /sys/dev/char/4:64
19../../devices/root/f02836f0/f0285690/tty/ttyS0
20root@osaka:~#
21
22This means that any userland code which tries to determine the name of the
23device file of the hypervisor console device can not rely on the information
24provided by /proc/consoles. In particular, booting current versions of debian-
25installer inside a SPARC LDOM will fail with the installer unable to determine
26the console device.
27
28After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well,
29the inconsistency is fixed and it is possible again to determine the name
30of the device file of the hypervisor console device by reading the contents
31of /proc/console:
32
33root@osaka:~# cat /proc/consoles
34ttyHV0 -W- (EC p ) 4:64
35tty0 -WU (E ) 4:1
36root@osaka:~# readlink /sys/dev/char/4:64
37../../devices/root/f02836f0/f0285690/tty/ttyHV0
38root@osaka:~#
39
40With this change, debian-installer works correctly when installing inside
41a SPARC LDOM.
42
43Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
44Signed-off-by: David S. Miller <davem@davemloft.net>
45Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
46---
47 drivers/tty/serial/sunhv.c | 2 +-
48 1 file changed, 1 insertion(+), 1 deletion(-)
49
50diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
51index 63e34d868de8..f8503f8fc44e 100644
52--- a/drivers/tty/serial/sunhv.c
53+++ b/drivers/tty/serial/sunhv.c
54@@ -397,7 +397,7 @@ static const struct uart_ops sunhv_pops = {
55 static struct uart_driver sunhv_reg = {
56 .owner = THIS_MODULE,
57 .driver_name = "sunhv",
58- .dev_name = "ttyS",
59+ .dev_name = "ttyHV",
60 .major = TTY_MAJOR,
61 };
62
63--
642.20.1
65