[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SOLVED] Re: I2C bus can not find sensors since kernel 2.6.18



Hi Wang Xu,

On Thu, 3 May 2007 13:13:56 +0800, Wang Xu wrote:
> On Sun, Apr 29, 2007 at 12:59:33PM +0800, gnawux wrote:
> > But under 2.6.18 and 2.6.20 kernel, no sensors could be found,
> > I enable the debug option of 2.6.20 kernel, and found the following
> > error message of i2c bus:
> >  | PCI: Unable to reserve I/O region #5:20@e800 for device 0000:00:1f.3
> >  | i801_smbus 0000:00:1f.3: Failed to request SMBus region 0xe800-0xe81f
> >  | i801_smbus: probe of 0000:00:1f.3 failed with error -16
> 
> The problem has been finally resolved by modifying the ACPI DSDT.
> 
> I found that in /proc/ioports
> 
>  | e800-e81f : 0000:00:1f.3
>  |  e800-e80f : motherboard
> 
> therefore, smbus driver is trying to allocate e800-e81f (0x20) as 
> the hints from PCI bus, while the acpi driver `motherboard' had
> only requested e800-e80f (0x10), which lead to cannot request 
> successfully.

Ah, I see. Then this is caused by the following patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6dcc19dfbc84b2ea5428711b7a47146b5b1788bb
Before this patch the driver was hard-coding the I/O-region length to 8
or 16 depending on the chip version. With this patch, we get the length
from the PCI subsystem, this is cleaner. And indeed the physical
region is 32-byte long, even though the driver doesn't use the last 16
bytes.

> Thus, I dumped the dsdt table and checked it, and modify
> 
>     Name (SMBS, 0xE800)
> 	Name (SMBL, 0x10)
> 
> to
> 
>     Name (SMBS, 0xE800)
> 	Name (SMBL, 0x20)
> 
> with iasl. then integrate the DSDT with initramfs. Everything
> become well and do not need change kernel source anymore except
> for the customized dsdt patch.
> 
> I also upload the customized DSDT table for ASUS M2400Ne laptop
> to acpi.sf.net:
> 
> 	http://acpi.sourceforge.net/dsdt/view.php?id=787

Great, and thanks for reporting, it might help others with the same
problem.

You should also report the problem to Asus so that they can fix the
DSDT table in the next BIOS for your laptop.

-- 
Jean Delvare



Reply to: