Re: [PATCH] serial: qcom-geni: keep registered console runtime active
Abel Vesa <[email protected]>
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <ao4dvbqk3lbjwrw4qgiwjljyi2oe7nzcx5ooqx5whukiyvet75@6kemkkgoonvi> |
On 26-08-19 18:46:47, Konrad Dybcio wrote: > From: Konrad Dybcio <[email protected]> > > Commit aee1f94dab13 ("serial: qcom-geni: remove .pm callback, use > runtime PM in startup/shutdown") moved runtime PM references from the > serial-core PM callback to the port startup and shutdown callbacks. > > The serial core used to leave the console port powered after > registration, but after the callback was removed the temporary probe > reference is always released. Console writes are not tied to an open TTY > and can run from contexts which cannot resume the device, so a > runtime-suspended console can stall. This was observed on a Qualcomm > X1E80100 CRD device, as the boot console became flakey across boots. > > Acquire a runtime PM reference when the console is set up and release it > through the console exit callback. This keeps the device active only > while the console is registered and balances the reference when the > console is disabled or re-enabled through sysfs. > > Fixes: aee1f94dab13 ("serial: qcom-geni: remove .pm callback, use runtime PM in startup/shutdown") > Assisted-by: LLM > Signed-off-by: Konrad Dybcio <[email protected]> Reviewed-by: Abel Vesa <[email protected]>