Patch "watchdog: imx7ulp: Fix reboot hang" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    watchdog: imx7ulp: Fix reboot hang

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     watchdog-imx7ulp-fix-reboot-hang.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 64ccba2b2bf5ec7bd5336f1dcef5fb45d1acea06
Author: Fabio Estevam <festevam@xxxxxxxxx>
Date:   Tue Oct 29 14:40:33 2019 -0300

    watchdog: imx7ulp: Fix reboot hang
    
    [ Upstream commit 6083ab7b2f3f25022e2e8f4c42f14a8521f47873 ]
    
    The following hang is observed when a 'reboot' command is issued:
    
    # reboot
    # Stopping network: OK
    Stopping klogd: OK
    Stopping syslogd: OK
    umount: devtmpfs busy - remounted read-only
    [    8.612079] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    The system is going down NOW!
    Sent SIGTERM to all processes
    Sent SIGKILL to all processes
    Requesting system reboot
    [   10.694753] reboot: Restarting system
    [   11.699008] Reboot failed -- System halted
    
    Fix this problem by adding a .restart ops member.
    
    Fixes: 41b630f41bf7 ("watchdog: Add i.MX7ULP watchdog support")
    Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>
    Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20191029174037.25381-1-festevam@xxxxxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
index 5ce51026989a..ba5d535a6db2 100644
--- a/drivers/watchdog/imx7ulp_wdt.c
+++ b/drivers/watchdog/imx7ulp_wdt.c
@@ -106,12 +106,28 @@ static int imx7ulp_wdt_set_timeout(struct watchdog_device *wdog,
 	return 0;
 }
 
+static int imx7ulp_wdt_restart(struct watchdog_device *wdog,
+			       unsigned long action, void *data)
+{
+	struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog);
+
+	imx7ulp_wdt_enable(wdt->base, true);
+	imx7ulp_wdt_set_timeout(&wdt->wdd, 1);
+
+	/* wait for wdog to fire */
+	while (true)
+		;
+
+	return NOTIFY_DONE;
+}
+
 static const struct watchdog_ops imx7ulp_wdt_ops = {
 	.owner = THIS_MODULE,
 	.start = imx7ulp_wdt_start,
 	.stop  = imx7ulp_wdt_stop,
 	.ping  = imx7ulp_wdt_ping,
 	.set_timeout = imx7ulp_wdt_set_timeout,
+	.restart = imx7ulp_wdt_restart,
 };
 
 static const struct watchdog_info imx7ulp_wdt_info = {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux