This patch adds a simple table of SuperIO chips already detected in the system. This allows superiotool to properly avoid scanning the same IO port again by another vendor-specific probe, after some device has already been found on that particular port.
The table of chips detected contains entries that, apart from the IO port known to be "inhabited", also relate the port to a particular "chip entry" (struct superio_registers*). There's no immediate use for this, but in the future it could facilitate further functionality enhancements, such as - separation of the "dump" function from the "detect" function - write support (with validity checking of the desired LDN/CR)
As suggested by Mr. Hendricks, the vendor-specific probe functions now return a result code, indicating that a particular chip was found and which one that was, or that none was detected.
The simple "framework" is headquartered in superiotool.c, with some necessary mods to superiotool.h. All the existing "vendor-specific" C files have been adapted to make use of this "framework".
Apart from this addition, the patch scraps some previous attempts at the same functionality, and moves some table definitions from superiotool.h to superiotool.c, where they seem to belong.
Signed-off-by: Frank Rysanek Frantisek.Rysanek@post.cz ---
Tested on my AEC-6811 with two Winbond SuperIO chips. Note that the Winbond probe comes last in the "sequence of vendors", so my test is not entirely significant :-)
I've tried the recommended method of deriving the patch via "svn diff". The resulting patch however fails to apply cleanly (hunk failed...). But if I try the bare "diff -Naur", the resulting patch *does* apply just fine. Go figure... Attached you'll find the manual diff that works for me.
The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.
---- File information ----------- File: device_counting.diff Date: 9 Jan 2011, 22:25 Size: 20401 bytes. Type: Unknown