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