kernel_samsung_a53x/drivers/tty
Hugo Villeneuve 2629b60313 serial: max310x: prevent infinite while() loop in port startup
[ Upstream commit b35f8dbbce818b02c730dc85133dc7754266e084 ]

If there is a problem after resetting a port, the do/while() loop that
checks the default value of DIVLSB register may run forever and spam the
I2C bus.

Add a delay before each read of DIVLSB, and a maximum number of tries to
prevent that situation from happening.

Also fail probe if port reset is unsuccessful.

Fixes: 10d8b34a4217 ("serial: max310x: Driver rework")
Cc: stable@vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240116213001.3691629-5-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 23:19:51 +01:00
..
hvc hvc/xen: prevent concurrent accesses to the shared ring 2024-11-18 22:25:34 +01:00
ipwireless Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serdev Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial serial: max310x: prevent infinite while() loop in port startup 2024-11-18 23:19:51 +01:00
vt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amiserial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyclades.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ehv_bytechan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
goldfish.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isicom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mips_ejtag_fdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
moxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
moxa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxser.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxser.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_gsm.c tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf() 2024-11-18 12:11:58 +01:00
n_hdlc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_null.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_r3964.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracerouter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracesink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracesink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nozomi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket_int.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclink_gt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclinkmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysrq.c tty/sysrq: replace smp_processor_id() with get_cpu() 2024-11-18 11:43:21 +01:00
tty.h tty: change tty_write_lock()'s ndelay parameter to bool 2024-11-18 12:12:49 +01:00
tty_audit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_baudrate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_io.c usb: cdc-acm: return correct error code on unsupported break 2024-11-18 12:12:50 +01:00
tty_ioctl.c tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE 2024-11-18 12:13:20 +01:00
tty_jobctrl.c tty: tty_jobctrl: fix pid memleak in disassociate_ctty() 2024-11-18 11:43:05 +01:00
tty_ldisc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_ldsem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_mutex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_port.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttynull.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vcc.c tty: vcc: Add check for kstrdup() in vcc_probe() 2024-11-18 11:43:14 +01:00