acpi IO资源与smbus冲突

这几天遇到一个奇怪的问题,我试着透过io的方式去读sch5027这颗SuperIO的Hardware Monitor,但发现它的Hardware Monitor只支援透过I2C/SMBus去读,不过这也不是问题,因为Linux有支援,只要挂载dme1737就行了。
奇怪的点在于,挂上dme1737后,完全找不到应该建立在/sys/class/hwmon/下的entry,追了一下code后,发现dme1737_i2c_probe根本没有被呼叫到,继续深入追了一下又发现,虽然lspci是有SMBus资讯,且i2c-i801也有挂载,但i2cdetect完全找不到有任何的device.......0rz

最后经由google大神的提示,才知道原来是ACPI和SMBus的冲突造成的。从dmesg里面会找到像是这样的讯息: 当有这讯息出现时,会完全找不到i2c的device,因为resource被ACPI占住了。解决的方式满简单的,只要在kernel的boot option里加入底下的参数即可: 节录kernel-parameters.txt里的说明:
ACPI: resource 0000:00:1f.3 [io 0xXXXX-0xYYYY] conflicts with ACPI region SMBI ......
ACPI: If an ACPI is available for this device, you should used it instead of native driver


acpi_enforce_resources=no

acpi_enforce_resources= [ACPI] 
{ strict | lax | no } 
Check for resource conflicts between native drivers 
and ACPI OperationRegions (SystemIO and SystemMemory 
only). IO ports and memory declared in ACPI might be 
used by the ACPI subsystem in arbitrary AML code and 
can interfere with legacy drivers. 
strict (default): access to resources claimed by ACPI 
is denied; legacy drivers trying to access reserved 
resources will fail to bind to device using them. 
lax: access to resources claimed by ACPI is allowed; 
legacy drivers trying to access reserved resources 
will bind successfully but a warning message is logged. 
no: ACPI OperationRegions are not marked as reserved, 
no further checks are performed.

正常加载i2c-dev.ko i2c-i801.ko dmesg显示如下:

[  469.840945] i2c /dev entries driver
[  474.923981] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值