Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=475ef85512900dcb87435e13656c1f5e724de379
Commit:     475ef85512900dcb87435e13656c1f5e724de379
Parent:     1ea6dd3840e5a22924d78299fee018c82e425d80
Author:     David Hubbard <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 24 11:17:09 2007 +0200
Committer:  Mark M. Hoffman <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 14:22:17 2007 -0400

    hwmon/w83627ehf: Add error messages for two error cases
    
    If the Super-I/O device is disabled, it is likely the BIOS has a good
    reason for leaving it disabled, so give a warning when enabling it --
    it's not likely to be wired correctly or be able to give good data.
    
    Also, if the Super-I/O device is configured with an address of 0, the
    driver refuses to initialize it.
    
    Signed-off-by: David Hubbard <[EMAIL PROTECTED]>
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Mark M. Hoffman <[EMAIL PROTECTED]>
---
 drivers/hwmon/w83627ehf.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 2157c34..e615b83 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -1387,14 +1387,19 @@ static int __init w83627ehf_find(int sioaddr, unsigned 
short *addr,
            | superio_inb(sioaddr, SIO_REG_ADDR + 1);
        *addr = val & IOREGION_ALIGNMENT;
        if (*addr == 0) {
+               printk(KERN_ERR DRVNAME ": Refusing to enable a Super-I/O "
+                      "device with a base I/O port 0.\n");
                superio_exit(sioaddr);
                return -ENODEV;
        }
 
        /* Activate logical device if needed */
        val = superio_inb(sioaddr, SIO_REG_ENABLE);
-       if (!(val & 0x01))
+       if (!(val & 0x01)) {
+               printk(KERN_WARNING DRVNAME ": Forcibly enabling Super-I/O. "
+                      "Sensor is probably unusable.\n");
                superio_outb(sioaddr, SIO_REG_ENABLE, val | 0x01);
+       }
 
        superio_exit(sioaddr);
        pr_info(DRVNAME ": Found %s chip at %#x\n", sio_name, *addr);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to