]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
wdt_i6300esb: fix incorrect mask for interrupt type
authorShengYi Hung <aokblast@FreeBSD.org>
Mon, 15 Sep 2025 18:07:33 +0000 (14:07 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 5 Oct 2025 06:46:06 +0000 (09:46 +0300)
According to Intel 6300ESB Controller Hub Datasheet 14.4.15, the interrupt
type mask should be 0x03 (0b11) instead of 0x11. In the original
implementation, when we want to disable all interrupt by setting the
value to 0x03, we will get 0x01 which is incorrect when we want to read
the value again. However, there is no problem when considering the correct
behavior since 0x01 is reserved and unused just like 0x03. This patch is
just a fix to return the register value.

Signed-off-by: ShengYi Hung <aokblast@FreeBSD.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/watchdog/wdt_i6300esb.c

index bb8a2766b69b6de226ca97e62a7f646e53a8fb32..3aa01b8d68fe9b84c9d4ec0fb4f2031e132f59aa 100644 (file)
@@ -55,7 +55,7 @@
 /* Config register bits */
 #define ESB_WDT_REBOOT  (0x01 << 5)   /* Enable reboot on timeout          */
 #define ESB_WDT_FREQ    (0x01 << 2)   /* Decrement frequency               */
-#define ESB_WDT_INTTYPE (0x11 << 0)   /* Interrupt type on timer1 timeout  */
+#define ESB_WDT_INTTYPE (0x03 << 0)   /* Interrupt type on timer1 timeout  */
 
 /* Reload register bits */
 #define ESB_WDT_RELOAD  (0x01 << 8)    /* prevent timeout                   */