Commit c7634a3a authored by Douglas Anderson's avatar Douglas Anderson Committed by Praveen Talari
Browse files

UPSTREAM: tty: serial: qcom-geni-serial: Add a poll_init() function



On sc7180 Chromebooks, I did the following:
* Didn't enable earlycon in the kernel command line.
* Didn't enable serial console in the kernel command line.
* Didn't enable an agetty or any other client of "/dev/ttyMSM0".
* Added "kgdboc=ttyMSM0" to the kernel command line.

After I did that, I tried to enter kdb with this command over an ssh
session:
  echo g > /proc/sysrq-trigger

When I did that the system just hung.

Although I thought I'd tested this scenario before, I couldn't go back
and find a time when it was working. Previous testing must have relied
on either the UART acting as the kernel console or an agetty running.

It turns out to be pretty easy to fix: we can just use
qcom_geni_serial_port_setup() as the .poll_init() function. This,
together with the patch ("serial: uart_poll_init() should power on the
UART"), allows the debugger to work even if there are no other users
of the serial port.

Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230316132027.RESEND.2.Ie678853bb101091afe78cc8c22344bf3ff3aed74@changeid


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 370629635
Bug: 375550406
Change-Id: I9e362aeffbb0a6a4e68f516e5325451288409172
(cherry picked from commit d8851a96)
Signed-off-by: default avatarPraveen Talari <quic_ptalari@quicinc.com>
(cherry picked from commit 5eec3de3fc488db5e5492e30822b47d0b1141f4f)
parent 4ff982d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment