Re: [WATCHDOG] v2.5.25-rc patches

From: Oliver Schuster
Date: Tue Mar 11 2008 - 09:41:49 EST


Hi,

WARNING

this patch can cause serious problems in the case, that someone use it with an it8712 rev. 8 and above.

You patch it8712f_wdt.c in function it8712f_wdt_update_margin(void):
...
+ if (revision >= 0x08)
+ superio_outw(units, WDT_TIMEOUT);
+ else
+ superio_outb(units, WDT_TIMEOUT);

but here you can't use superio_outw, because the bytes are swaped -- historical reason.
I suggest to substitute superio_outw(units, WDT_TIMEOUT);
with
superio_outb(units >> 8, WDT_TIMEOUT + 1);
superio_outb(units, WDT_TIMEOUT);

or to change the patch with (only the referenced position above)

+ if (revision >= 0x08)
+ superio_outb(units >> 8, WDT_TIMEOUT + 1);
+
+ superio_outb(units, WDT_TIMEOUT);

Regards,
Oliver

--
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/