]> www.infradead.org Git - users/dwmw2/linux.git/commit
tty: n_gsm: wait until channel 0 is ready
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Sat, 28 Dec 2024 15:00:59 +0000 (17:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2025 10:50:07 +0000 (11:50 +0100)
commite2e4025bc5461258a48cb331107c5b55b3c787d3
tree426ea28d2aaeced67124c66bed5cf1f8f2fd45f4
parentd78a89990986a4d7d34313d3f58f8596b8ae1222
tty: n_gsm: wait until channel 0 is ready

Currently code does not wait for channel 0 open sequence to complete before
pushing data to the other channels. Also, if userland opens tty, it will
receive EL2NSYNC. Both issues result in hard to predict initialization
sequence and possible userland failures.

Fix that by waiting channel 0 open sequence to complete before attempting
opening of the other channels. Also, if tty open() is attempted while
channel 0 is opening, wait until sequence is complete before returning to
userland.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20241228150100.100354-2-ivo.g.dimitrov.75@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c