From 983729ba919fc17f1e9725a00873aba30faf4183 Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Sun, 15 Nov 2020 10:13:04 -0700 Subject: [PATCH] msm: restart: clear the restart reason when the cmd makes no sense * This principally was identified when the R recovery started issuing reboot commands such as "userrequested,recovery" or "userrequested,fastboot". While it's not 100% clear that userrequested is supposed to be followed by a reboot *source* as opposed to a target, it illuminated the fact that our kernel gets stuck rebooting to the same target/reason when an unknown command is issued. * It seems much more logical to normal people that the kernel go ahead and reboot to the "normal" (read: Android system) target when the one passed to the kernel isn't known, as opposed to getting stuck in something like recovery forever. Change-Id: Id63a31c9855b72955b89694ecac522e6569d84ac Signed-off-by: Kevin F. Haggerty --- arch/arm/mach-msm/restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-msm/restart.c b/arch/arm/mach-msm/restart.c index 42414b40481..7d4e975f90d 100644 --- a/arch/arm/mach-msm/restart.c +++ b/arch/arm/mach-msm/restart.c @@ -408,7 +408,7 @@ static void msm_restart_prepare(const char *cmd) } else #endif - __raw_writel(0x77665501, restart_reason); + __raw_writel(0x12345678, restart_reason); } printk(KERN_NOTICE "%s : restart_reason = 0x%x\n",