linux-stable/drivers/tty
John Paul Adrian Glaubitz 155656d0e3 sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg
[ Upstream commit 07a6d63eb1 ]

In d5a2aa24, 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-22 08:16:15 +02:00
..
hvc hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common() 2018-08-03 07:50:25 +02:00
ipwireless tty: ipwireless: fix missing checks for ioremap 2019-05-31 06:47:32 -07:00
serdev serdev: fix memleak on module unload 2018-07-08 15:30:47 +02:00
serial sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg 2019-06-22 08:16:15 +02:00
vt tty/vt: fix write/write race in ioctl(KDSKBSENT) handler 2019-05-21 18:50:18 +02:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set 2018-05-01 12:58:13 -07:00
n_hdlc.c tty/n_hdlc: fix __might_sleep warning 2019-01-31 08:13:44 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: wipe buffer if not echoing data 2018-12-01 09:42:59 +01:00
nozomi.c
pty.c pty: fix O_CLOEXEC for TIOCGPTPEER 2018-08-24 13:08:55 +02:00
rocket.c tty: rocket: Fix possible buffer overwrite on register_PCI 2018-09-19 22:43:40 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c termios, tty/tty_baudrate.c: fix buffer overrun 2018-11-21 09:24:10 +01:00
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-04-05 22:31:37 +02:00
tty_io.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ldsem.c tty/ldsem: Wake up readers after timed out down_write() 2019-01-23 08:09:45 +01:00
tty_mutex.c
tty_port.c tty: do not set TTY_IO_ERROR flag if console port 2018-12-13 09:18:53 +01:00
vcc.c