Loading
serial: qcom-geni: revert broken hibernation support
stable inclusion from stable-v6.6.58 commit 7176aee5a1b20ae4da1082d6fc59a3b58383f079 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB3BSC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7176aee5a1b20ae4da1082d6fc59a3b58383f079 -------------------------------- commit 19df76662a33d2f2fc41a66607cb8285fc02d6ec upstream. This reverts commit 35781d83. Hibernation is not supported on Qualcomm platforms with mainline kernels yet a broken vendor implementation for the GENI serial driver made it upstream. This is effectively dead code that cannot be tested and should just be removed, but if these paths were ever hit for an open non-console port they would crash the machine as the driver would fail to enable clocks during restore() (i.e. all ports would have to be closed by drivers and user space before hibernating the system to avoid this as a comment in the code hinted at). The broken implementation also added a random call to enable the receiver in the port setup code where it does not belong and which enables the receiver prematurely for console ports. Fixes: 35781d83 ("tty: serial: qcom-geni-serial: Add support for Hibernation feature") Cc: stable@vger.kernel.org # 6.2 Cc: Aniket Randive <quic_arandive@quicinc.com> Signed-off-by:Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241009145110.16847-3-johan+linaro@kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Wen Zhiwei <wenzhiwei@kylinos.cn>