memcg: fix behavior under memory.limit equals to memsw.limit
[safe/jmp/linux-2.6] / drivers / watchdog / iTCO_vendor_support.c
index 09e9534..d3c0f6d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     intel TCO vendor specific watchdog driver support
  *
- *     (c) Copyright 2006 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2006-2009 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -18,9 +18,8 @@
  */
 
 /* Module and version information */
-#define DRV_NAME        "iTCO_vendor_support"
-#define DRV_VERSION     "1.01"
-#define DRV_RELDATE     "11-Nov-2006"
+#define DRV_NAME       "iTCO_vendor_support"
+#define DRV_VERSION    "1.03"
 #define PFX            DRV_NAME ": "
 
 /* Includes */
 #include <linux/kernel.h>              /* For printk/panic/... */
 #include <linux/init.h>                        /* For __init/__exit/... */
 #include <linux/ioport.h>              /* For io-port access */
-
 #include <linux/io.h>                  /* For inb/outb/... */
 
 #include "iTCO_vendor.h"
 
 /* iTCO defines */
 #define        SMI_EN          acpibase + 0x30 /* SMI Control and Enable Register */
-#define        TCOBASE         acpibase + 0x60 /* TCO base address             */
-#define        TCO1_STS        TCOBASE + 0x04  /* TCO1 Status Register         */
+#define        TCOBASE         acpibase + 0x60 /* TCO base address */
+#define        TCO1_STS        TCOBASE + 0x04  /* TCO1 Status Register */
 
 /* List of vendor support modes */
 /* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */
@@ -49,7 +47,8 @@
 
 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+");
+MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
+                       "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+");
 
 /*
  *     Vendor Specific Support
@@ -83,6 +82,7 @@ static void supermicro_old_pre_start(unsigned long acpibase)
 {
        unsigned long val32;
 
+       /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */
        val32 = inl(SMI_EN);
        val32 &= 0xffffdfff;    /* Turn off SMI clearing watchdog */
        outl(val32, SMI_EN);    /* Needed to activate watchdog */
@@ -92,8 +92,9 @@ static void supermicro_old_pre_stop(unsigned long acpibase)
 {
        unsigned long val32;
 
+       /* Bit 13: TCO_EN -> 1 = Enables the TCO logic to generate SMI# */
        val32 = inl(SMI_EN);
-       val32 &= 0x00002000;    /* Turn on SMI clearing watchdog */
+       val32 |= 0x00002000;    /* Turn on SMI clearing watchdog */
        outl(val32, SMI_EN);    /* Needed to deactivate watchdog */
 }
 
@@ -305,7 +306,8 @@ static void __exit iTCO_vendor_exit_module(void)
 module_init(iTCO_vendor_init_module);
 module_exit(iTCO_vendor_exit_module);
 
-MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, R. Seretny <lkpatches@paypc.com>");
+MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, "
+               "R. Seretny <lkpatches@paypc.com>");
 MODULE_DESCRIPTION("Intel TCO Vendor Specific WatchDog Timer Driver Support");
 MODULE_VERSION(DRV_VERSION);
 MODULE_LICENSE("GPL");