崩溃系统 – 如何xhci_hcd卸载并且只允许在Ubuntu 12.04,13.04中使用ehci_hcd来调试一些usb硬件

我有几个使用500mA(5V)电源的USB硬件,在重新检查后发现外部电源或集线器是解决方案,但这是浪费时间,即使做外部电源问题仍然继续。

现在只有调试此问题的方法是在Ubuntu 12.04或Ubuntu 13.04中禁用Xhci_hcd并保留Ehci_hcd,因为这是99%问题开始的地方。

但在Ubuntu它不可能或任务不可能几乎现在禁用xhci_hcd我该怎么办呢?

尝试:

$ cd /etc/pm/config.d/ $ pwd /etc/pm/config.d $ ls 00sleep_module unload_modules unload_module root@e300gent:/etc/pm/config.d# cat * SUSPEND_MODULES="xhci" SUSPEND_MODULES="xhci" SUSPEND_MODULES="xhci" $ tail -f /var/log/syslog Oct 6 10:47:54 e300gent kernel: [ ] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD Oct 6 10:47:54 e300gent kernel: [ ] xhci_hcd 0000:02:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk? Oct 6 10:47:54 e300gent kernel: [ ] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD Oct 6 10:47:54 e300gent kernel: [ ] usb 3-1: USB disconnect, device number 2 Oct 6 10:48:00 e300gent kernel: [ ] usb 1-1.4: new high-speed USB device number 5 using ehci_hcd Oct 6 10:48:00 e300gent kernel: [ ] uvcvideo: Found UVC 1.00 device HD Pro Webcam C920 (046d:082d) Oct 6 10:48:00 e300gent kernel: [ ] input: HD Pro Webcam C920 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input17 Oct 6 10:48:00 e300gent mtp-probe: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4" Oct 6 10:48:01 e300gent rtkit-daemon[1470]: Successfully made thread 2583 of process 1464 (n/a) owned by '1000' RT at priority 5. Oct 6 10:48:01 e300gent rtkit-daemon[1470]: Supervising 6 threads of 1 processes of 1 users. 

ehci_hcd:也丢弃设备:

 [ ] usb 1-1.4: reset high-speed USB device number 5 using ehci_hcd [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: reset high-speed USB device number 5 using ehci_hcd [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: reset high-speed USB device number 5 using ehci_hcd [ ] usb 1-1.4: device not accepting address 5, error -110 [ ] usb 1-1.4: reset high-speed USB device number 5 using ehci_hcd [ ] usb 1-1.4: device not accepting address 5, error -110 [ ] usb 1-1.4: USB disconnect, device number 5 [ ] usb 1-1.4: new high-speed USB device number 6 using ehci_hcd [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: device descriptor read/64, error -110 [ ] usb 1-1.4: new high-speed USB device number 7 using ehci_hcd [ ] usb 1-1.4: device descriptor read/64, error -110 

并且在内核黑名单中,但是在Ubuntu中无法停用xhci

任何人都可以请说明如何禁用此xhci的一些步骤,以便我可以通过仅使用ehci调试设备找到确切的问题?

xhci_hcd至少在14.04内置于内核中。 您可以重新编译内核,使其成为一个模块(它位于内核配置菜单中的Device Drivers | USB support下,按空格键直到它为M,或者在.config文件中设置CONFIG_USB_XHCI_HCD=m )。 有了这个内置,你可以将它列入黑名单,然后使用modprobe和rmmod随意加载和卸载。

不幸的是,我认为我的主板需要xhci_hcd即使对于usb 2.0也不能只使用ehci_hcd,因此没有加载xhci_hcd模块意味着根本没有usb(或者我需要采取进一步措施才能使其工作):

 $ lsusb unable to initialize libusb: -99 

但是有一个xhci模块是有用的,我至少可以用一些hack重新编译它而不必重新编译整个内核。