* [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2
@ 2018-08-31 13:06 Jean Delvare
2018-08-31 13:07 ` [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks Jean Delvare
2018-08-31 13:14 ` [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Guenter Roeck
0 siblings, 2 replies; 4+ messages in thread
From: Jean Delvare @ 2018-08-31 13:06 UTC (permalink / raw)
To: linux-watchdog; +Cc: Martin Wilck, Wim Van Sebroeck, Guenter Roeck
iTCO_vendor_support's option vendorsupport=2 is a gross hack. It
claims to extend the existing iTCO_wdt driver, but in fact programs
a watchdog on a completely different device (Super-I/O) without
requesting its I/O ports and without checking the device ID. This is
an utterly dangerous thing to do.
It also turns out to be unnecessary, because as far as I can tell, the
code in question is basically duplicating what the clean w83627hf_wdt
driver is doing.
My guess is that on these SuperMicro boards which sparkled the
implementation of vendorsupport=2, the watchdog functionality of the
Intel south bridge is not used, and the watchdog feature of some
W83627HF-like Super-I/O chip is used instead. So we should point the
users to the w83627hf_wdt driver.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/iTCO_vendor_support.c | 158 +--------------------------------
1 file changed, 8 insertions(+), 150 deletions(-)
--- linux-4.18.orig/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:05.313880214 +0200
+++ linux-4.18/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:06.438895718 +0200
@@ -38,7 +38,7 @@
/* List of vendor support modes */
/* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */
#define SUPERMICRO_OLD_BOARD 1
-/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems */
+/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems - no longer supported */
#define SUPERMICRO_NEW_BOARD 2
/* Broken BIOS */
#define BROKEN_BIOS 911
@@ -46,8 +46,7 @@
static int vendorsupport;
module_param(vendorsupport, int, 0);
MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
- "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+, "
- "911=Broken SMI BIOS");
+ "0 (none), 1=SuperMicro Pent3, 911=Broken SMI BIOS");
/*
* Vendor Specific Support
@@ -98,143 +97,6 @@ static void supermicro_old_pre_stop(stru
}
/*
- * Vendor Support: 2
- * Board: Super Micro Computer Inc. P4SBx, P4DPx
- * iTCO chipset: ICH4
- *
- * Code contributed by: R. Seretny <lkpatches@paypc.com>
- * Documentation obtained by R. Seretny from SuperMicro Technical Support
- *
- * To enable Watchdog function:
- * 1. BIOS
- * For P4SBx:
- * BIOS setup -> Advanced -> Integrated Peripherals -> Watch Dog Feature
- * For P4DPx:
- * BIOS setup -> Advanced -> I/O Device Configuration -> Watch Dog
- * This setting enables or disables Watchdog function. When enabled, the
- * default watchdog timer is set to be 5 minutes (about 4m35s). It is
- * enough to load and run the OS. The application (service or driver) has
- * to take over the control once OS is running up and before watchdog
- * expires.
- *
- * 2. JUMPER
- * For P4SBx: JP39
- * For P4DPx: JP37
- * This jumper is used for safety. Closed is enabled. This jumper
- * prevents user enables watchdog in BIOS by accident.
- *
- * To enable Watch Dog function, both BIOS and JUMPER must be enabled.
- *
- * The documentation lists motherboards P4SBx and P4DPx series as of
- * 20-March-2002. However, this code works flawlessly with much newer
- * motherboards, such as my X6DHR-8G2 (SuperServer 6014H-82).
- *
- * The original iTCO driver as written does not actually reset the
- * watchdog timer on these machines, as a result they reboot after five
- * minutes.
- *
- * NOTE: You may leave the Watchdog function disabled in the SuperMicro
- * BIOS to avoid a "boot-race"... This driver will enable watchdog
- * functionality even if it's disabled in the BIOS once the /dev/watchdog
- * file is opened.
- */
-
-/* I/O Port's */
-#define SM_REGINDEX 0x2e /* SuperMicro ICH4+ Register Index */
-#define SM_DATAIO 0x2f /* SuperMicro ICH4+ Register Data I/O */
-
-/* Control Register's */
-#define SM_CTLPAGESW 0x07 /* SuperMicro ICH4+ Control Page Switch */
-#define SM_CTLPAGE 0x08 /* SuperMicro ICH4+ Control Page Num */
-
-#define SM_WATCHENABLE 0x30 /* Watchdog enable: Bit 0: 0=off, 1=on */
-
-#define SM_WATCHPAGE 0x87 /* Watchdog unlock control page */
-
-#define SM_ENDWATCH 0xAA /* Watchdog lock control page */
-
-#define SM_COUNTMODE 0xf5 /* Watchdog count mode select */
- /* (Bit 3: 0 = seconds, 1 = minutes */
-
-#define SM_WATCHTIMER 0xf6 /* 8-bits, Watchdog timer counter (RW) */
-
-#define SM_RESETCONTROL 0xf7 /* Watchdog reset control */
- /* Bit 6: timer is reset by kbd interrupt */
- /* Bit 7: timer is reset by mouse interrupt */
-
-static void supermicro_new_unlock_watchdog(void)
-{
- /* Write 0x87 to port 0x2e twice */
- outb(SM_WATCHPAGE, SM_REGINDEX);
- outb(SM_WATCHPAGE, SM_REGINDEX);
- /* Switch to watchdog control page */
- outb(SM_CTLPAGESW, SM_REGINDEX);
- outb(SM_CTLPAGE, SM_DATAIO);
-}
-
-static void supermicro_new_lock_watchdog(void)
-{
- outb(SM_ENDWATCH, SM_REGINDEX);
-}
-
-static void supermicro_new_pre_start(unsigned int heartbeat)
-{
- unsigned int val;
-
- supermicro_new_unlock_watchdog();
-
- /* Watchdog timer setting needs to be in seconds*/
- outb(SM_COUNTMODE, SM_REGINDEX);
- val = inb(SM_DATAIO);
- val &= 0xF7;
- outb(val, SM_DATAIO);
-
- /* Write heartbeat interval to WDOG */
- outb(SM_WATCHTIMER, SM_REGINDEX);
- outb((heartbeat & 255), SM_DATAIO);
-
- /* Make sure keyboard/mouse interrupts don't interfere */
- outb(SM_RESETCONTROL, SM_REGINDEX);
- val = inb(SM_DATAIO);
- val &= 0x3f;
- outb(val, SM_DATAIO);
-
- /* enable watchdog by setting bit 0 of Watchdog Enable to 1 */
- outb(SM_WATCHENABLE, SM_REGINDEX);
- val = inb(SM_DATAIO);
- val |= 0x01;
- outb(val, SM_DATAIO);
-
- supermicro_new_lock_watchdog();
-}
-
-static void supermicro_new_pre_stop(void)
-{
- unsigned int val;
-
- supermicro_new_unlock_watchdog();
-
- /* disable watchdog by setting bit 0 of Watchdog Enable to 0 */
- outb(SM_WATCHENABLE, SM_REGINDEX);
- val = inb(SM_DATAIO);
- val &= 0xFE;
- outb(val, SM_DATAIO);
-
- supermicro_new_lock_watchdog();
-}
-
-static void supermicro_new_pre_set_heartbeat(unsigned int heartbeat)
-{
- supermicro_new_unlock_watchdog();
-
- /* reset watchdog timeout to heartveat value */
- outb(SM_WATCHTIMER, SM_REGINDEX);
- outb((heartbeat & 255), SM_DATAIO);
-
- supermicro_new_lock_watchdog();
-}
-
-/*
* Vendor Support: 911
* Board: Some Intel ICHx based motherboards
* iTCO chipset: ICH7+
@@ -298,9 +160,6 @@ void iTCO_vendor_pre_start(struct resour
case SUPERMICRO_OLD_BOARD:
supermicro_old_pre_start(smires);
break;
- case SUPERMICRO_NEW_BOARD:
- supermicro_new_pre_start(heartbeat);
- break;
case BROKEN_BIOS:
broken_bios_start(smires);
break;
@@ -314,9 +173,6 @@ void iTCO_vendor_pre_stop(struct resourc
case SUPERMICRO_OLD_BOARD:
supermicro_old_pre_stop(smires);
break;
- case SUPERMICRO_NEW_BOARD:
- supermicro_new_pre_stop();
- break;
case BROKEN_BIOS:
broken_bios_stop(smires);
break;
@@ -326,15 +182,11 @@ EXPORT_SYMBOL(iTCO_vendor_pre_stop);
void iTCO_vendor_pre_keepalive(struct resource *smires, unsigned int heartbeat)
{
- if (vendorsupport == SUPERMICRO_NEW_BOARD)
- supermicro_new_pre_set_heartbeat(heartbeat);
}
EXPORT_SYMBOL(iTCO_vendor_pre_keepalive);
void iTCO_vendor_pre_set_heartbeat(unsigned int heartbeat)
{
- if (vendorsupport == SUPERMICRO_NEW_BOARD)
- supermicro_new_pre_set_heartbeat(heartbeat);
}
EXPORT_SYMBOL(iTCO_vendor_pre_set_heartbeat);
@@ -351,6 +203,12 @@ EXPORT_SYMBOL(iTCO_vendor_check_noreboot
static int __init iTCO_vendor_init_module(void)
{
+ if (vendorsupport == SUPERMICRO_NEW_BOARD) {
+ pr_warn("Option vendorsupport=%d is no longer supported, "
+ "please use the w83627hf_wdt driver instead\n",
+ SUPERMICRO_NEW_BOARD);
+ return -EINVAL;
+ }
pr_info("vendor-support=%d\n", vendorsupport);
return 0;
}
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks
2018-08-31 13:06 [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Jean Delvare
@ 2018-08-31 13:07 ` Jean Delvare
2018-08-31 13:15 ` Guenter Roeck
2018-08-31 13:14 ` [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Guenter Roeck
1 sibling, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2018-08-31 13:07 UTC (permalink / raw)
To: linux-watchdog; +Cc: Martin Wilck, Wim Van Sebroeck, Guenter Roeck
As the only user of iTCO_vendor_pre_keepalive and
iTCO_vendor_pre_set_heartbeat has just been removed, we can delete
these 2 hooks.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/iTCO_vendor.h | 4 ----
drivers/watchdog/iTCO_vendor_support.c | 10 ----------
drivers/watchdog/iTCO_wdt.c | 4 ----
3 files changed, 18 deletions(-)
--- linux-4.18.orig/drivers/watchdog/iTCO_vendor.h 2018-08-31 13:36:44.969460371 +0200
+++ linux-4.18/drivers/watchdog/iTCO_vendor.h 2018-08-31 14:37:19.197296115 +0200
@@ -3,14 +3,10 @@
#ifdef CONFIG_ITCO_VENDOR_SUPPORT
extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
extern void iTCO_vendor_pre_stop(struct resource *);
-extern void iTCO_vendor_pre_keepalive(struct resource *, unsigned int);
-extern void iTCO_vendor_pre_set_heartbeat(unsigned int);
extern int iTCO_vendor_check_noreboot_on(void);
#else
#define iTCO_vendor_pre_start(acpibase, heartbeat) {}
#define iTCO_vendor_pre_stop(acpibase) {}
-#define iTCO_vendor_pre_keepalive(acpibase, heartbeat) {}
-#define iTCO_vendor_pre_set_heartbeat(heartbeat) {}
#define iTCO_vendor_check_noreboot_on() 1
/* 1=check noreboot; 0=don't check */
#endif
--- linux-4.18.orig/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:06.438895718 +0200
+++ linux-4.18/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:37:10.693180108 +0200
@@ -180,16 +180,6 @@ void iTCO_vendor_pre_stop(struct resourc
}
EXPORT_SYMBOL(iTCO_vendor_pre_stop);
-void iTCO_vendor_pre_keepalive(struct resource *smires, unsigned int heartbeat)
-{
-}
-EXPORT_SYMBOL(iTCO_vendor_pre_keepalive);
-
-void iTCO_vendor_pre_set_heartbeat(unsigned int heartbeat)
-{
-}
-EXPORT_SYMBOL(iTCO_vendor_pre_set_heartbeat);
-
int iTCO_vendor_check_noreboot_on(void)
{
switch (vendorsupport) {
--- linux-4.18.orig/drivers/watchdog/iTCO_wdt.c 2018-08-12 22:41:04.000000000 +0200
+++ linux-4.18/drivers/watchdog/iTCO_wdt.c 2018-08-31 14:38:19.295115483 +0200
@@ -304,8 +304,6 @@ static int iTCO_wdt_ping(struct watchdog
spin_lock(&p->io_lock);
- iTCO_vendor_pre_keepalive(p->smi_res, wd_dev->timeout);
-
/* Reload the timer by writing to the TCO Timer Counter register */
if (p->iTCO_version >= 2) {
outw(0x01, TCO_RLD(p));
@@ -342,8 +340,6 @@ static int iTCO_wdt_set_timeout(struct w
(p->iTCO_version == 1 && tmrval > 0x03f))
return -EINVAL;
- iTCO_vendor_pre_set_heartbeat(tmrval);
-
/* Write new heartbeat to watchdog */
if (p->iTCO_version >= 2) {
spin_lock(&p->io_lock);
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2
2018-08-31 13:06 [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Jean Delvare
2018-08-31 13:07 ` [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks Jean Delvare
@ 2018-08-31 13:14 ` Guenter Roeck
1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2018-08-31 13:14 UTC (permalink / raw)
To: Jean Delvare, linux-watchdog; +Cc: Martin Wilck, Wim Van Sebroeck
On 08/31/2018 06:06 AM, Jean Delvare wrote:
> iTCO_vendor_support's option vendorsupport=2 is a gross hack. It
> claims to extend the existing iTCO_wdt driver, but in fact programs
> a watchdog on a completely different device (Super-I/O) without
> requesting its I/O ports and without checking the device ID. This is
> an utterly dangerous thing to do.
>
> It also turns out to be unnecessary, because as far as I can tell, the
> code in question is basically duplicating what the clean w83627hf_wdt
> driver is doing.
>
> My guess is that on these SuperMicro boards which sparkled the
> implementation of vendorsupport=2, the watchdog functionality of the
> Intel south bridge is not used, and the watchdog feature of some
> W83627HF-like Super-I/O chip is used instead. So we should point the
> users to the w83627hf_wdt driver.
>
Makes sense, and more than happy to get rid of that code.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Martin Wilck <mwilck@suse.com>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/iTCO_vendor_support.c | 158 +--------------------------------
> 1 file changed, 8 insertions(+), 150 deletions(-)
>
> --- linux-4.18.orig/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:05.313880214 +0200
> +++ linux-4.18/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:06.438895718 +0200
> @@ -38,7 +38,7 @@
> /* List of vendor support modes */
> /* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */
> #define SUPERMICRO_OLD_BOARD 1
> -/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems */
> +/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems - no longer supported */
> #define SUPERMICRO_NEW_BOARD 2
> /* Broken BIOS */
> #define BROKEN_BIOS 911
> @@ -46,8 +46,7 @@
> static int vendorsupport;
> module_param(vendorsupport, int, 0);
> MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
> - "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+, "
> - "911=Broken SMI BIOS");
> + "0 (none), 1=SuperMicro Pent3, 911=Broken SMI BIOS");
>
> /*
> * Vendor Specific Support
> @@ -98,143 +97,6 @@ static void supermicro_old_pre_stop(stru
> }
>
> /*
> - * Vendor Support: 2
> - * Board: Super Micro Computer Inc. P4SBx, P4DPx
> - * iTCO chipset: ICH4
> - *
> - * Code contributed by: R. Seretny <lkpatches@paypc.com>
> - * Documentation obtained by R. Seretny from SuperMicro Technical Support
> - *
> - * To enable Watchdog function:
> - * 1. BIOS
> - * For P4SBx:
> - * BIOS setup -> Advanced -> Integrated Peripherals -> Watch Dog Feature
> - * For P4DPx:
> - * BIOS setup -> Advanced -> I/O Device Configuration -> Watch Dog
> - * This setting enables or disables Watchdog function. When enabled, the
> - * default watchdog timer is set to be 5 minutes (about 4m35s). It is
> - * enough to load and run the OS. The application (service or driver) has
> - * to take over the control once OS is running up and before watchdog
> - * expires.
> - *
> - * 2. JUMPER
> - * For P4SBx: JP39
> - * For P4DPx: JP37
> - * This jumper is used for safety. Closed is enabled. This jumper
> - * prevents user enables watchdog in BIOS by accident.
> - *
> - * To enable Watch Dog function, both BIOS and JUMPER must be enabled.
> - *
> - * The documentation lists motherboards P4SBx and P4DPx series as of
> - * 20-March-2002. However, this code works flawlessly with much newer
> - * motherboards, such as my X6DHR-8G2 (SuperServer 6014H-82).
> - *
> - * The original iTCO driver as written does not actually reset the
> - * watchdog timer on these machines, as a result they reboot after five
> - * minutes.
> - *
> - * NOTE: You may leave the Watchdog function disabled in the SuperMicro
> - * BIOS to avoid a "boot-race"... This driver will enable watchdog
> - * functionality even if it's disabled in the BIOS once the /dev/watchdog
> - * file is opened.
> - */
> -
> -/* I/O Port's */
> -#define SM_REGINDEX 0x2e /* SuperMicro ICH4+ Register Index */
> -#define SM_DATAIO 0x2f /* SuperMicro ICH4+ Register Data I/O */
> -
> -/* Control Register's */
> -#define SM_CTLPAGESW 0x07 /* SuperMicro ICH4+ Control Page Switch */
> -#define SM_CTLPAGE 0x08 /* SuperMicro ICH4+ Control Page Num */
> -
> -#define SM_WATCHENABLE 0x30 /* Watchdog enable: Bit 0: 0=off, 1=on */
> -
> -#define SM_WATCHPAGE 0x87 /* Watchdog unlock control page */
> -
> -#define SM_ENDWATCH 0xAA /* Watchdog lock control page */
> -
> -#define SM_COUNTMODE 0xf5 /* Watchdog count mode select */
> - /* (Bit 3: 0 = seconds, 1 = minutes */
> -
> -#define SM_WATCHTIMER 0xf6 /* 8-bits, Watchdog timer counter (RW) */
> -
> -#define SM_RESETCONTROL 0xf7 /* Watchdog reset control */
> - /* Bit 6: timer is reset by kbd interrupt */
> - /* Bit 7: timer is reset by mouse interrupt */
> -
> -static void supermicro_new_unlock_watchdog(void)
> -{
> - /* Write 0x87 to port 0x2e twice */
> - outb(SM_WATCHPAGE, SM_REGINDEX);
> - outb(SM_WATCHPAGE, SM_REGINDEX);
> - /* Switch to watchdog control page */
> - outb(SM_CTLPAGESW, SM_REGINDEX);
> - outb(SM_CTLPAGE, SM_DATAIO);
> -}
> -
> -static void supermicro_new_lock_watchdog(void)
> -{
> - outb(SM_ENDWATCH, SM_REGINDEX);
> -}
> -
> -static void supermicro_new_pre_start(unsigned int heartbeat)
> -{
> - unsigned int val;
> -
> - supermicro_new_unlock_watchdog();
> -
> - /* Watchdog timer setting needs to be in seconds*/
> - outb(SM_COUNTMODE, SM_REGINDEX);
> - val = inb(SM_DATAIO);
> - val &= 0xF7;
> - outb(val, SM_DATAIO);
> -
> - /* Write heartbeat interval to WDOG */
> - outb(SM_WATCHTIMER, SM_REGINDEX);
> - outb((heartbeat & 255), SM_DATAIO);
> -
> - /* Make sure keyboard/mouse interrupts don't interfere */
> - outb(SM_RESETCONTROL, SM_REGINDEX);
> - val = inb(SM_DATAIO);
> - val &= 0x3f;
> - outb(val, SM_DATAIO);
> -
> - /* enable watchdog by setting bit 0 of Watchdog Enable to 1 */
> - outb(SM_WATCHENABLE, SM_REGINDEX);
> - val = inb(SM_DATAIO);
> - val |= 0x01;
> - outb(val, SM_DATAIO);
> -
> - supermicro_new_lock_watchdog();
> -}
> -
> -static void supermicro_new_pre_stop(void)
> -{
> - unsigned int val;
> -
> - supermicro_new_unlock_watchdog();
> -
> - /* disable watchdog by setting bit 0 of Watchdog Enable to 0 */
> - outb(SM_WATCHENABLE, SM_REGINDEX);
> - val = inb(SM_DATAIO);
> - val &= 0xFE;
> - outb(val, SM_DATAIO);
> -
> - supermicro_new_lock_watchdog();
> -}
> -
> -static void supermicro_new_pre_set_heartbeat(unsigned int heartbeat)
> -{
> - supermicro_new_unlock_watchdog();
> -
> - /* reset watchdog timeout to heartveat value */
> - outb(SM_WATCHTIMER, SM_REGINDEX);
> - outb((heartbeat & 255), SM_DATAIO);
> -
> - supermicro_new_lock_watchdog();
> -}
> -
> -/*
> * Vendor Support: 911
> * Board: Some Intel ICHx based motherboards
> * iTCO chipset: ICH7+
> @@ -298,9 +160,6 @@ void iTCO_vendor_pre_start(struct resour
> case SUPERMICRO_OLD_BOARD:
> supermicro_old_pre_start(smires);
> break;
> - case SUPERMICRO_NEW_BOARD:
> - supermicro_new_pre_start(heartbeat);
> - break;
> case BROKEN_BIOS:
> broken_bios_start(smires);
> break;
> @@ -314,9 +173,6 @@ void iTCO_vendor_pre_stop(struct resourc
> case SUPERMICRO_OLD_BOARD:
> supermicro_old_pre_stop(smires);
> break;
> - case SUPERMICRO_NEW_BOARD:
> - supermicro_new_pre_stop();
> - break;
> case BROKEN_BIOS:
> broken_bios_stop(smires);
> break;
> @@ -326,15 +182,11 @@ EXPORT_SYMBOL(iTCO_vendor_pre_stop);
>
> void iTCO_vendor_pre_keepalive(struct resource *smires, unsigned int heartbeat)
> {
> - if (vendorsupport == SUPERMICRO_NEW_BOARD)
> - supermicro_new_pre_set_heartbeat(heartbeat);
> }
> EXPORT_SYMBOL(iTCO_vendor_pre_keepalive);
>
> void iTCO_vendor_pre_set_heartbeat(unsigned int heartbeat)
> {
> - if (vendorsupport == SUPERMICRO_NEW_BOARD)
> - supermicro_new_pre_set_heartbeat(heartbeat);
> }
> EXPORT_SYMBOL(iTCO_vendor_pre_set_heartbeat);
>
> @@ -351,6 +203,12 @@ EXPORT_SYMBOL(iTCO_vendor_check_noreboot
>
> static int __init iTCO_vendor_init_module(void)
> {
> + if (vendorsupport == SUPERMICRO_NEW_BOARD) {
> + pr_warn("Option vendorsupport=%d is no longer supported, "
> + "please use the w83627hf_wdt driver instead\n",
> + SUPERMICRO_NEW_BOARD);
> + return -EINVAL;
> + }
> pr_info("vendor-support=%d\n", vendorsupport);
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks
2018-08-31 13:07 ` [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks Jean Delvare
@ 2018-08-31 13:15 ` Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2018-08-31 13:15 UTC (permalink / raw)
To: Jean Delvare, linux-watchdog; +Cc: Martin Wilck, Wim Van Sebroeck
On 08/31/2018 06:07 AM, Jean Delvare wrote:
> As the only user of iTCO_vendor_pre_keepalive and
> iTCO_vendor_pre_set_heartbeat has just been removed, we can delete
> these 2 hooks.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Martin Wilck <mwilck@suse.com>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/iTCO_vendor.h | 4 ----
> drivers/watchdog/iTCO_vendor_support.c | 10 ----------
> drivers/watchdog/iTCO_wdt.c | 4 ----
> 3 files changed, 18 deletions(-)
>
> --- linux-4.18.orig/drivers/watchdog/iTCO_vendor.h 2018-08-31 13:36:44.969460371 +0200
> +++ linux-4.18/drivers/watchdog/iTCO_vendor.h 2018-08-31 14:37:19.197296115 +0200
> @@ -3,14 +3,10 @@
> #ifdef CONFIG_ITCO_VENDOR_SUPPORT
> extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
> extern void iTCO_vendor_pre_stop(struct resource *);
> -extern void iTCO_vendor_pre_keepalive(struct resource *, unsigned int);
> -extern void iTCO_vendor_pre_set_heartbeat(unsigned int);
> extern int iTCO_vendor_check_noreboot_on(void);
> #else
> #define iTCO_vendor_pre_start(acpibase, heartbeat) {}
> #define iTCO_vendor_pre_stop(acpibase) {}
> -#define iTCO_vendor_pre_keepalive(acpibase, heartbeat) {}
> -#define iTCO_vendor_pre_set_heartbeat(heartbeat) {}
> #define iTCO_vendor_check_noreboot_on() 1
> /* 1=check noreboot; 0=don't check */
> #endif
> --- linux-4.18.orig/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:27:06.438895718 +0200
> +++ linux-4.18/drivers/watchdog/iTCO_vendor_support.c 2018-08-31 14:37:10.693180108 +0200
> @@ -180,16 +180,6 @@ void iTCO_vendor_pre_stop(struct resourc
> }
> EXPORT_SYMBOL(iTCO_vendor_pre_stop);
>
> -void iTCO_vendor_pre_keepalive(struct resource *smires, unsigned int heartbeat)
> -{
> -}
> -EXPORT_SYMBOL(iTCO_vendor_pre_keepalive);
> -
> -void iTCO_vendor_pre_set_heartbeat(unsigned int heartbeat)
> -{
> -}
> -EXPORT_SYMBOL(iTCO_vendor_pre_set_heartbeat);
> -
> int iTCO_vendor_check_noreboot_on(void)
> {
> switch (vendorsupport) {
> --- linux-4.18.orig/drivers/watchdog/iTCO_wdt.c 2018-08-12 22:41:04.000000000 +0200
> +++ linux-4.18/drivers/watchdog/iTCO_wdt.c 2018-08-31 14:38:19.295115483 +0200
> @@ -304,8 +304,6 @@ static int iTCO_wdt_ping(struct watchdog
>
> spin_lock(&p->io_lock);
>
> - iTCO_vendor_pre_keepalive(p->smi_res, wd_dev->timeout);
> -
> /* Reload the timer by writing to the TCO Timer Counter register */
> if (p->iTCO_version >= 2) {
> outw(0x01, TCO_RLD(p));
> @@ -342,8 +340,6 @@ static int iTCO_wdt_set_timeout(struct w
> (p->iTCO_version == 1 && tmrval > 0x03f))
> return -EINVAL;
>
> - iTCO_vendor_pre_set_heartbeat(tmrval);
> -
> /* Write new heartbeat to watchdog */
> if (p->iTCO_version >= 2) {
> spin_lock(&p->io_lock);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-31 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 13:06 [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Jean Delvare
2018-08-31 13:07 ` [PATCH 2/2] watchdog: iTCO_wdt: Remove unused hooks Jean Delvare
2018-08-31 13:15 ` Guenter Roeck
2018-08-31 13:14 ` [PATCH 1/2] watchdog: iTCO_wdt: Drop option vendorsupport=2 Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.