Bug 3049 - ACPI conflicts with i2c-viapro
ACPI conflicts with i2c-viapro
Product: ACPI
Classification: Unclassified
Component: BIOS
i386 Linux
: P2 normal
Assigned To: Shaohua
Depends on:
  Show dependency treegraph
Reported: 2004-07-11 11:31 UTC by Jean Delvare
Modified: 2004-10-17 20:15 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.7-mm3
Tree: Mainline
Regression: ---

Output of acpidmp for the Asus A7V133-C (BIOS rev. 1009) (53.47 KB, text/plain)
2004-07-16 11:59 UTC, Jean Delvare
proposed patch (1.33 KB, patch)
2004-07-18 20:43 UTC, Shaohua
Details | Diff
proposed patch (1.33 KB, patch)
2004-07-19 17:16 UTC, Shaohua
Details | Diff
proposed patch (1.87 KB, patch)
2004-08-02 22:29 UTC, Shaohua
Details | Diff
content of /proc/ioports with the patch (1.05 KB, text/plain)
2004-08-04 01:02 UTC, Eric Valette

Description Jean Delvare 2004-07-11 11:31:33 UTC
Distribution: Slackware GNU/Linux 9.1
Hardware Environment: AMD Athlon / Asus A7V133-C

Problem Description:
In 2.6.7-mm3, 2.6.7-mm5, 2.6.7-mm6 and 2.6.7-mm7, ACPI reserves an address range
needed by i2c-viapro (SMBus driver). The problem doesn't show in 2.6.7-mm4
because it didn't include bk-acpi.patch.

Steps to reproduce:
modprobe i2c-dev
modprobe i2c-viapro

i2cdetect -l will not list the VIA SMBus adapter.
Logs say: vt596 smbus 0000:00:04.4: SMBus region 0xe800 already in use!
/proc/ioports has:
e800-e80f : 0000:00:04.4
  e800-e80f : motherboard

Reverting bk-acpi.patch (tested on 2.6.7-mm6) solves the problem. SMBus is
working, and /proc/ioports has:
e800-e80f : 0000:00:04.4
  e800-e807 : viapro-smbus
Comment 1 Shaohua 2004-07-16 03:08:59 UTC
Could you please try to enable PNP and disable ACPI and tell us the result? 
And please attach your 'acpidmp' output also. thanks, shaohua.
Comment 2 Jean Delvare 2004-07-16 11:59:37 UTC
Created attachment 3379 [details]
Output of acpidmp for the Asus A7V133-C (BIOS rev. 1009)
Comment 3 Jean Delvare 2004-07-16 12:05:58 UTC
I tested with and without ACPI and PNP (2.6.8-rc1-mm1):
ACPI+PNP: i2c-viapro doesn't work
ACPI alone: i2c-viapro doesn't work
PNP alone: i2c-viapro works
neither: i2c-viapro works

With PNP and PNPBIOS enabled (and ACPI disabled) the lines in /proc/ioports are
slightly different:

e800-e83f : pnp 00:12
  e800-e80f : 0000:00:04.4
    e800-e807 : viapro-smbus

So, as a summary, it works fine when ACPI is disabled, and doesn't work when
ACPI is enabled, regardless of PNP being enabled or not.

Comment 4 Shaohua 2004-07-18 20:43:21 UTC
Created attachment 3396 [details]
proposed patch

Please check if this patch fixes your problem.
Comment 5 Jean Delvare 2004-07-19 10:40:55 UTC
Proposed patch applies but fails to compile. First gcc would complain that local
variable "res" shadows a function parameter. I renamed the local variable to
something else, but then gcc complained that structure "res" has no member
"flags". I'm stuck at this point, since I saw no obvious fix.

Comment 6 Shaohua 2004-07-19 17:16:20 UTC
Created attachment 3404 [details]
proposed patch

I'm so sorry about that. Since the patch looks sample, I didn't test it before
I sent it to you. Could you please try this one? It should resolve your
problem. Thanks, Shaohua.
Comment 7 Jean Delvare 2004-07-20 00:18:41 UTC
Second patch works for me.

I would only object to the name "tmp". It first made me think that this was
really a local variable, while it actually is a reference to a global resource

Comment 8 Jean Delvare 2004-08-02 11:18:59 UTC
I still don't see the change in 2.6.8-rc2-mm2.
Comment 9 Shaohua 2004-08-02 22:29:16 UTC
Created attachment 3460 [details]
proposed patch

Ok, changed as you said. Len will merge this one. Thanks, David
Comment 10 Eric Valette 2004-08-04 01:02:25 UTC
Created attachment 3467 [details]
content of /proc/ioports with the patch
Comment 11 Eric Valette 2004-08-04 01:04:53 UTC
I have tested the last version of this patch on an ASUS A7V KT133 and indeed it
fixes the very same problem. Thanks for responding to my post on LKML Shaohua.
Comment 12 Bartlomiej Zolnierkiewicz 2004-10-05 12:56:20 UTC
*** Bug 3420 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.