From 135f9958c2496caebc1ed1e26edbd9e838f29f0c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 26 May 2023 15:05:44 +0100 Subject: [PATCH] 5.10-stable patches added patches: watchdog-sp5100_tco-immediately-trigger-upon-starting.patch --- queue-5.10/series | 1 + ...co-immediately-trigger-upon-starting.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 queue-5.10/watchdog-sp5100_tco-immediately-trigger-upon-starting.patch diff --git a/queue-5.10/series b/queue-5.10/series index 6b2ac89c929..0ddd2a4fa8c 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -156,3 +156,4 @@ serial-exar-add-support-for-sealevel-7xxxc-serial-ca.patch serial-8250_exar-add-support-for-usr298x-pci-modems.patch s390-qdio-get-rid-of-register-asm.patch s390-qdio-fix-do_sqbs-inline-assembly-constraint.patch +watchdog-sp5100_tco-immediately-trigger-upon-starting.patch diff --git a/queue-5.10/watchdog-sp5100_tco-immediately-trigger-upon-starting.patch b/queue-5.10/watchdog-sp5100_tco-immediately-trigger-upon-starting.patch new file mode 100644 index 00000000000..38b4ff004e1 --- /dev/null +++ b/queue-5.10/watchdog-sp5100_tco-immediately-trigger-upon-starting.patch @@ -0,0 +1,41 @@ +From 4eda19cc8a29cde3580ed73bf11dc73b4e757697 Mon Sep 17 00:00:00 2001 +From: Gregory Oakes +Date: Thu, 16 Mar 2023 15:13:12 -0500 +Subject: watchdog: sp5100_tco: Immediately trigger upon starting. + +From: Gregory Oakes + +commit 4eda19cc8a29cde3580ed73bf11dc73b4e757697 upstream. + +The watchdog countdown is supposed to begin when the device file is +opened. Instead, it would begin countdown upon the first write to or +close of the device file. Now, the ping operation is called within the +start operation which ensures the countdown begins. From experimenation, +it does not appear possible to do this with a single write including +both the start bit and the trigger bit. So, it is done as two distinct +writes. + +Signed-off-by: Gregory Oakes +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20230316201312.17538-1-gregory.oakes@amd.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Cc: Mario Limonciello +Signed-off-by: Greg Kroah-Hartman +--- + drivers/watchdog/sp5100_tco.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/watchdog/sp5100_tco.c ++++ b/drivers/watchdog/sp5100_tco.c +@@ -104,6 +104,10 @@ static int tco_timer_start(struct watchd + val |= SP5100_WDT_START_STOP_BIT; + writel(val, SP5100_WDT_CONTROL(tco->tcobase)); + ++ /* This must be a distinct write. */ ++ val |= SP5100_WDT_TRIGGER_BIT; ++ writel(val, SP5100_WDT_CONTROL(tco->tcobase)); ++ + return 0; + } + -- 2.47.3