[[email protected]: i2c-sis5595.c, kernel
----- Forwarded message from Sebastian Hesselbarth <[email protected]> -----
From: Sebastian Hesselbarth <[email protected]>
To: Frodo Looijaard <[email protected]>
Subject: i2c-sis5595.c, kernel 2.6.10
X-Virus-Scanned: ClamAV 0.80/646/Thu Dec 30 20:42:35 2004
clamav-milter version 0.80j
on morannon.frodo.local
X-Virus-Scanned: amavisd-new isd-holland.nl
X-Virus-Status: Clean
X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on
morannon.frodo.local
X-Spam-Status: No, score=-2.3 required=5.0 testsºYES_00,DNS_FROM_RFC_WHOIS
autolearn=no version=3.0.2
X-Spam-Level:
Hi,
I am currently debugging your i2c-sis5595 module because my brother asked me why his sis540/5595 chipset is not recognized by this module. I figured out that your setup code _may_ contain bugs especially when reading from pci config registers. I searched the web an found out that pci_read_config_xxx() returns 0 on success and negative values on error. IMHO if you check the result like this:
if (!pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val))
goto error;
the if-clause fails on successful reads, too!
I changed this to:
myret = pci_read_config_byte(SIS5595_dev, SIS5595_ENABLE_REG, &val);
and printed myret and val to stdout. As expected myret is 0 and val contains 0xF8 which is the correct value for acpi and other stuff enabled.
Maybe you should consider to check for values lower than 0 !?
Please correct me if I am wrong, because I am not very firm at C and device driver development ;)
Regards,
Sebastian Hesselbarth
----- End forwarded message -----
Signature · 4 lines
Frodo Looijaard <[email protected]> PGP key and more: http://huizen.dds.nl/~frodol Defenestration n. (formal or joc.): The act of removing Windows from your computer in disgust, usually followed by the installation of Linux or some other Unix-like operating system.