关于kernel2.6中USB host controller driver 的问题

2.6在s3c2410上usb host不工作的直接结果就是提示110错误:
usb 1-1: device descriptor read/64, error -110

追踪错误代码,我们来看看能不能找到导致这个错误的线索。

include/asm-generic/errno.h
#define EPROTO 71 /* Protocol error */
#define EILSEQ 84 /* Illegal byte sequence */
#define ETIMEDOUT 110 /* Connection timed out */

Documentation/usb/error-codes.txt
-EPROTO (*, **) a) bitstuff error
b) no response packet received within the
prescribed bus turn-around time
c) unknown USB error

-EILSEQ (*, **) a) CRC mismatch
b) no response packet received within the
prescribed bus turn-around time
c) unknown USB error

-ETIMEDOUT (**) No response packet received within the prescribed
bus turn-around time. This error may instead be
reported as -EPROTO or -EILSEQ.

由此我们可以判断,这个错误与 usb 设备的超时有关。报告这个错误的地方在drivers/usb/core/hub.c中的hub_port_init部分,由于 usb_get_device_descriptor获取 usb 设备信息的时候产生了超时。这样基本可以确定三种情况,1、usb 设备及接口有问题;2、usb core有问题;3、usb driver有问题。
我们可以很容易地排除1和2的可能性,问题应该在usb driver implement部分造成的。2.6的usb driver把usb规范中对usb接口的操作集中到了core里面,针对不同设备的implement分别归为host、gadget、storage 等。基本确定问题就在ohci-s3c2410.c里。

跟踪进入ohci-s3c2410.c,这里面主要完成s3c2410 usb host设备的初始化工作,包括电源、时钟、寄存器等。

其实很多问题在互联网上已经被遇到和解决,我们要做的就是多参考别人的成功经验,这样可以节省时间,同时能够帮助我们找到一些思路。借助google这双强大的翅膀,我们来看看能找到什么:

http://www.linux-usb.org/FAQ.html#ts6

Q: Why doesn’t USB work at all? I get “device not accepting address”.

A: You may have some problem with your PCI setup that’s preventing your USB host controller from getting hardware interrupts. When Linux submits a request, but never hears back from the controller, this is the diagnostic you’ll see. To see if this is the problem, look at /proc/interrupts to see if the interrupt count for your host controller driver ever goes up. If it doesn’t, this is the problem: either your BIOS isn’t telling the truth to Linux (ACPI sometimes confuses these things, or setting the expected OS to windows in your BIOS), or Linux doesn’t understand what it’s saying.

Sometimes a BIOS fix will b

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
针对CentOS 7出现"SMBus Host Controller not enabled"无法启动的问题,可以尝试以下解决方法: 1. 确认硬件支持:首先,确保你的硬件支持SMBus控制器。可以查看主板的规格说明书或者联系硬件厂商确认。 2. 更新BIOS:如果你的硬件支持SMBus控制器,但仍然出现该错误,尝试更新主板的BIOS版本。BIOS更新可能会修复一些硬件兼容性问题。 3. 检查内核模块:检查是否已加载了正确的内核模块。可以使用以下命令检查是否加载了piix4_smbus模块: ```shell lsmod | grep piix4_smbus ``` 如果没有输出结果,说明该模块未加载。可以尝试手动加载该模块: ```shell modprobe piix4_smbus ``` 如果加载成功,重新启动系统并检查问题是否解决。 4. 更新内核:如果上述方法仍然无法解决问题,尝试更新内核版本。新的内核版本可能会修复一些硬件兼容性问题。可以使用以下命令更新内核: ```shell yum update kernel ``` 更新完成后,重新启动系统并检查问题是否解决。 5. 禁用SMBus控制器:如果以上方法都无效,你可以尝试禁用SMBus控制器。编辑GRUB配置文件并添加"acpi_enforce_resources=lax"参数: ```shell sudo vi /etc/default/grub ``` 找到GRUB_CMDLINE_LINUX行,并在引号内添加"acpi_enforce_resources=lax"参数,保存并退出。然后更新GRUB配置: ```shell sudo grub2-mkconfig -o /boot/grub2/grub.cfg ``` 最后,重新启动系统并检查问题是否解决。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值