Re: [PATCH] ib700wdt watchdog driver for 2.6.6

From: Patrice Bouchand
Date: Tue May 11 2004 - 04:06:47 EST


> The patch certainly looks sensible, but what about ibwdt_close() and
> ibwdt_notify_sys()? They're doing
>
> outb_p(wd_times[wd_margin], WDT_STOP);
>
> which also seems peculiar.


The value written in the WDT_STOP register is not important. As soon as something is written , the watchdog timer stops.
But you are right, things will be cleaner if we use the following patch.

Thanks for the comments.

Best regards

Patrice Bouchand

-----------------------------------------------------------------------------------------------------------------------------------
--- ./ib700wdt.c.orig 2004-05-10 08:57:54.000000000 +0200
+++ ib700wdt.c 2004-05-11 10:50:54.000000000 +0200
@@ -135,7 +135,7 @@
ibwdt_ping(void)
{
/* Write a watchdog value */
- outb_p(wd_times[wd_margin], WDT_START);
+ outb_p(wd_margin, WDT_START);
}

static ssize_t
@@ -234,7 +234,7 @@
{
spin_lock(&ibwdt_lock);
if (expect_close == 42)
- outb_p(wd_times[wd_margin], WDT_STOP);
+ outb_p(wd_margin, WDT_STOP);
else
printk(KERN_CRIT PFX "WDT device closed unexpectedly. WDT will not stop!\n");

@@ -254,7 +254,7 @@
{
if (code == SYS_DOWN || code == SYS_HALT) {
/* Turn the WDT off */
- outb_p(wd_times[wd_margin], WDT_STOP);
+ outb_p(wd_margin, WDT_STOP);
}
return NOTIFY_DONE;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/