On 12/30/10 12:13 PM, Stefan Reinauer wrote:
On 12/28/10 11:51 PM, David Hendricks wrote:
On Tue, Dec 28, 2010 at 4:13 AM, Frantisek Rysanek <Frantisek.Rysanek@post.cz> wrote:
Dear maintainers of the superiotool,

I have the following "feature request" (maybe not a bug report):
I have this idea that superiotool should be able to detect more than
one SuperIO chip in the system. Such detection of multiple chips may
work in some cases, but may fail in others.

The primary cause seems to be that
 winbond.c :: probe_idregs_winbond()
and
  ite.c :: probe_idregs_ite()
call
  if (chip_found) return;   // this is a global variable!
after every "init sequence" tried.

Therefore, after the first chip detected (of any kind),
only the first init sequence is ever tried, in any subsequent calls
to the aforementioned probe_* functions.

That function is called with a port address. There can only be one chip at one port address. So leaving the function after a chip has been found at that address seems like the right thing to do. The bug is that chip_found is a global variable and not a local variable.

Attached patch should fix the issue.
And an equivalent change is needed for winbond.c I guess.