]> git.baikalelectronics.ru Git - kernel.git/commit
sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tue, 11 Jun 2019 15:38:37 +0000 (17:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Jun 2019 21:04:37 +0000 (14:04 -0700)
commit242b44b84a4e1c19e1626a8b1bf3f5134f58f88f
treea70ca9ea99ee61330fb7d5a7b5da020a895f88ba
parent18e5b0a6a0f47bae65ec670136963cd6ee522404
sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg

In 8b278858, the name in struct console sunhv_console was changed from "ttyS"
to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged.

This results in the hypervisor console device to be listed as "ttyHV0" under
/proc/consoles while the device node is still named "ttyS0":

root@osaka:~# cat /proc/consoles
ttyHV0               -W- (EC p  )    4:64
tty0                 -WU (E     )    4:1
root@osaka:~# readlink /sys/dev/char/4:64
../../devices/root/f02836f0/f0285690/tty/ttyS0
root@osaka:~#

This means that any userland code which tries to determine the name of the
device file of the hypervisor console device can not rely on the information
provided by /proc/consoles. In particular, booting current versions of debian-
installer inside a SPARC LDOM will fail with the installer unable to determine
the console device.

After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well,
the inconsistency is fixed and it is possible again to determine the name
of the device file of the hypervisor console device by reading the contents
of /proc/console:

root@osaka:~# cat /proc/consoles
ttyHV0               -W- (EC p  )    4:64
tty0                 -WU (E     )    4:1
root@osaka:~# readlink /sys/dev/char/4:64
../../devices/root/f02836f0/f0285690/tty/ttyHV0
root@osaka:~#

With this change, debian-installer works correctly when installing inside
a SPARC LDOM.

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/tty/serial/sunhv.c