Revert "Fill in cn_name in struct consdev."
This reverts commit 82a21151cf
.
This commit was made to aid debugging before consoles are initialised so
that they can more easily be identified from a debugger. However,
various consoles (cfecons, ofwcons, mambocons and rcons) all check
whether cn_name[0] is non-zero to see they are attached or not, and so
this breaks that (perhaps misguided) approach. On RISC-V this results in
rcons (the SBI firmware console driver) racing with the real UART driver
and so input gets probabilistically lost on the real UART (around 2/3 of
the time for me on QEMU).
Moreover, the name given to CONSOLE_DRIVER isn't necessarily the same as
what eventually gets written to cn_name, such as cfecons vs cfe, rcons
vs riscv, ttyj0 vs aju, ttyv0 vs sc, ttyuN vs uart_phyp/opal and all
manner of things vs ucom, so in some cases this is in fact misleading as
the name will change after attaching.
Discussed with: cperciva
This commit is contained in:
parent
8c9aa94b42
commit
17a4a163df
@ -104,7 +104,6 @@ extern struct tty *constty; /* Temporary virtual console. */
|
||||
static struct consdev name = { \
|
||||
.cn_ops = &ops, \
|
||||
.cn_arg = (arg), \
|
||||
.cn_name = #name, \
|
||||
}; \
|
||||
DATA_SET(cons_set, name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user