Patch "watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786" has been added to the 6.6-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: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786

to the 6.6-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-it87_wdt-keep-wdtctrl-bit-3-unmodified-for-.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 61ea8ddd524399b58a5dadcefaf07c92ff0b82f5
Author: Werner Fischer <devlists@xxxxxxxx>
Date:   Wed Dec 13 10:45:25 2023 +0100

    watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786
    
    [ Upstream commit d12971849d71781c1e4ffd1117d4878ce233d319 ]
    
    WDTCTRL bit 3 sets the mode choice for the clock input of IT8784/IT8786.
    Some motherboards require this bit to be set to 1 (= PCICLK mode),
    otherwise the watchdog functionality gets broken. The BIOS of those
    motherboards sets WDTCTRL bit 3 already to 1.
    
    Instead of setting all bits of WDTCTRL to 0 by writing 0x00 to it, keep
    bit 3 of it unchanged for IT8784/IT8786 chips. In this way, bit 3 keeps
    the status as set by the BIOS of the motherboard.
    
    Watchdog tests have been successful with this patch with the following
    systems:
      IT8784: Thomas-Krenn LES plus v2 (YANLING YL-KBRL2 V2)
      IT8786: Thomas-Krenn LES plus v3 (YANLING YL-CLU L2)
      IT8786: Thomas-Krenn LES network 6L v2 (YANLING YL-CLU6L)
    
    Link: https://lore.kernel.org/all/140b264d-341f-465b-8715-dacfe84b3f71@xxxxxxxxxxxx/
    
    Signed-off-by: Werner Fischer <devlists@xxxxxxxx>
    Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231213094525.11849-4-devlists@xxxxxxxx
    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/it87_wdt.c b/drivers/watchdog/it87_wdt.c
index bb1122909396..843f9f8e3917 100644
--- a/drivers/watchdog/it87_wdt.c
+++ b/drivers/watchdog/it87_wdt.c
@@ -255,6 +255,7 @@ static struct watchdog_device wdt_dev = {
 static int __init it87_wdt_init(void)
 {
 	u8  chip_rev;
+	u8 ctrl;
 	int rc;
 
 	rc = superio_enter();
@@ -313,7 +314,18 @@ static int __init it87_wdt_init(void)
 
 	superio_select(GPIO);
 	superio_outb(WDT_TOV1, WDTCFG);
-	superio_outb(0x00, WDTCTRL);
+
+	switch (chip_type) {
+	case IT8784_ID:
+	case IT8786_ID:
+		ctrl = superio_inb(WDTCTRL);
+		ctrl &= 0x08;
+		superio_outb(ctrl, WDTCTRL);
+		break;
+	default:
+		superio_outb(0x00, WDTCTRL);
+	}
+
 	superio_exit();
 
 	if (timeout < 1 || timeout > max_units * 60) {




[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