9e13ae109a
commit fa103d2599e11e802c818684cff821baefe7f206 upstream. The receiver is supposed to be enabled in the startup() callback and not in set_termios() which is called also during console setup. This specifically avoids accepting input before the port has been opened (and interrupts enabled), something which can also break the GENI firmware (cancel fails and after abort, the "stale" counter handling appears to be broken so that later input is not processed until twelve chars have been received). There also does not appear to be any need to keep the receiver disabled while updating the port settings. Since commit 6f3c3cafb115 ("serial: qcom-geni: disable interrupts during console writes") the calls to manipulate the secondary interrupts, which were done without holding the port lock, can also lead to the receiver being left disabled when set_termios() races with the console code (e.g. when init opens the tty during boot). This can manifest itself as a serial getty not accepting input. The calls to stop and start rx in set_termios() can similarly race with DMA completion and, for example, cause the DMA buffer to be unmapped twice or the mapping to be leaked. Fix this by only enabling the receiver during startup and while holding the port lock to avoid racing with the console code. Fixes: 6f3c3cafb115 ("serial: qcom-geni: disable interrupts during console writes") Fixes: |
||
---|---|---|
.. | ||
hvc | ||
ipwireless | ||
serdev | ||
serial | ||
vt | ||
amiserial.c | ||
ehv_bytechan.c | ||
goldfish.c | ||
Kconfig | ||
Makefile | ||
mips_ejtag_fdc.c | ||
moxa.c | ||
mxser.c | ||
n_gsm.c | ||
n_hdlc.c | ||
n_null.c | ||
n_tty.c | ||
nozomi.c | ||
pty.c | ||
rpmsg_tty.c | ||
synclink_gt.c | ||
sysrq.c | ||
tty.h | ||
tty_audit.c | ||
tty_baudrate.c | ||
tty_buffer.c | ||
tty_io.c | ||
tty_ioctl.c | ||
tty_jobctrl.c | ||
tty_ldisc.c | ||
tty_ldsem.c | ||
tty_mutex.c | ||
tty_port.c | ||
ttynull.c | ||
vcc.c |