]>
Commit | Line | Data |
---|---|---|
a15a8890 SL |
1 | From 837cc34fcc298696326f1bd3d4e919d65f81e0b5 Mon Sep 17 00:00:00 2001 |
2 | From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | |
3 | Date: Tue, 11 Jun 2019 17:38:37 +0200 | |
4 | Subject: sunhv: Fix device naming inconsistency between sunhv_console and | |
5 | sunhv_reg | |
6 | ||
7 | [ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] | |
8 | ||
9 | In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" | |
10 | to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. | |
11 | ||
12 | This results in the hypervisor console device to be listed as "ttyHV0" under | |
13 | /proc/consoles while the device node is still named "ttyS0": | |
14 | ||
15 | root@osaka:~# cat /proc/consoles | |
16 | ttyHV0 -W- (EC p ) 4:64 | |
17 | tty0 -WU (E ) 4:1 | |
18 | root@osaka:~# readlink /sys/dev/char/4:64 | |
19 | ../../devices/root/f02836f0/f0285690/tty/ttyS0 | |
20 | root@osaka:~# | |
21 | ||
22 | This means that any userland code which tries to determine the name of the | |
23 | device file of the hypervisor console device can not rely on the information | |
24 | provided by /proc/consoles. In particular, booting current versions of debian- | |
25 | installer inside a SPARC LDOM will fail with the installer unable to determine | |
26 | the console device. | |
27 | ||
28 | After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well, | |
29 | the inconsistency is fixed and it is possible again to determine the name | |
30 | of the device file of the hypervisor console device by reading the contents | |
31 | of /proc/console: | |
32 | ||
33 | root@osaka:~# cat /proc/consoles | |
34 | ttyHV0 -W- (EC p ) 4:64 | |
35 | tty0 -WU (E ) 4:1 | |
36 | root@osaka:~# readlink /sys/dev/char/4:64 | |
37 | ../../devices/root/f02836f0/f0285690/tty/ttyHV0 | |
38 | root@osaka:~# | |
39 | ||
40 | With this change, debian-installer works correctly when installing inside | |
41 | a SPARC LDOM. | |
42 | ||
43 | Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | |
44 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
45 | Signed-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 | ||
50 | diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c | |
51 | index 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 | -- | |
64 | 2.20.1 | |
65 |