4.0及更高版本的Linux内核中的USB驱动程序有什么变化?

内核高达3.19,我的所有USB设备都能正常工作.

升级到4.0或更高版本时,我的一些USB设备停止工作,内核产生如下错误:

[    3.369436] usb 9-1: device descriptor read/64, error -62
[    3.593543] usb 9-1: new full-speed USB device number 4 using ohci-pci
[    3.997572] usb 9-1: device not accepting address 4, error -62
[    4.120602] usb 9-1: new full-speed USB device number 5 using ohci-pci
[    4.524792] usb 9-1: device not accepting address 5, error -62
[    4.524911] usb usb9-port1: unable to enumerate USB device
[   15.402105] usb 9-1: new full-speed USB device number 6 using ohci-pci
[   15.530135] usb 9-1: device descriptor read/64, error -62
[   15.759224] usb 9-1: device descriptor read/64, error -62
[   15.983312] usb 9-1: new full-speed USB device number 7 using ohci-pci
[   16.111309] usb 9-1: device descriptor read/64, error -62
[   16.340398] usb 9-1: device descriptor read/64, error -62
[   16.564378] usb 9-1: new full-speed USB device number 8 using ohci-pci
[   16.968454] usb 9-1: device not accepting address 8, error -62
[   17.091555] usb 9-1: new full-speed USB device number 9 using ohci-pci
[   17.495570] usb 9-1: device not accepting address 9, error -62
[   17.495603] usb usb9-port1: unable to enumerate USB device
[   17.673702] usb 9-1: new full-speed USB device number 10 using ohci-pci
[   17.801758] usb 9-1: device descriptor read/64, error -62
[   18.030814] usb 9-1: device descriptor read/64, error -62
[   18.254834] usb 9-1: new full-speed USB device number 11 using ohci-pci
[   18.382858] usb 9-1: device descriptor read/64, error -62
[   18.611902] usb 9-1: device descriptor read/64, error -62
[   18.835977] usb 9-1: new full-speed USB device number 12 using ohci-pci
[   19.240034] usb 9-1: device not accepting address 12, error -62
[   19.363101] usb 9-1: new full-speed USB device number 13 using ohci-pci
[   19.767182] usb 9-1: device not accepting address 13, error -62
[   19.767226] usb usb9-port1: unable to enumerate USB device

那个特殊的例子只是一个便宜的USB存储卡读卡器….我真的不关心它.

对我来说更重要的问题是我的mythtv后端盒上的Quad DVB-T接收器也会遇到同样的问题,所以我现在无法将该机器升级到3.19.这是一张PCI-e卡,看起来像是usb桥的某种pci-e,以及通过usb连接的DVB调谐器.我不完全确定,但我认为它实际上可能是PCIe – > PCI – > USB卡.

以下是有关工作3.19内核的卡的详细信息:

# lsusb | grep Leadtek
Bus 010 Device 005: ID 0413:6680 Leadtek Research, Inc. 
Bus 010 Device 004: ID 0413:6680 Leadtek Research, Inc. 
Bus 010 Device 003: ID 0413:6680 Leadtek Research, Inc. 
Bus 010 Device 002: ID 0413:6680 Leadtek Research, Inc. 

# dmesg | grep -i DigitalNow| grep pci
[    9.405568] input: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-1/rc/rc1/input17
[    9.405687] rc1: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-1/rc/rc1
[    9.475939] input: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-2/rc/rc2/input22
[    9.476049] rc2: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-2/rc/rc2
[    9.542441] input: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-3/rc/rc3/input24
[    9.542617] rc3: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-3/rc/rc3
[    9.609134] input: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-4/rc/rc4/input26
[    9.609289] rc4: DigitalNow Quad DVB-T Receiver as /devices/pci0000:00/0000:00:0a.0/0000:04:00.0/0000:05:00.2/usb10/10-4/rc/rc4

# lspci | grep '^0[45]:'
04:00.0 PCI bridge: PLX Technology, Inc. PEX8112 x1 Lane PCI Express-to-PCI Bridge (rev aa)
05:00.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62)
05:00.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62)
05:00.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65)

# lspci -vv -s 05:00
05:00.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
    Subsystem: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 32, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 26
    Region 4: I/O ports at d020 [size=32]
    Capabilities: [80] Power Management version 2
        Flags: PMEClk+ DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Kernel driver in use: uhci_hcd

    05:00.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
        Subsystem: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32, Cache Line Size: 64 bytes
        Interrupt: pin B routed to IRQ 41
        Region 4: I/O ports at d000 [size=32]
        Capabilities: [80] Power Management version 2
            Flags: PMEClk+ DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
            Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: uhci_hcd

    05:00.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65) (prog-if 20 [EHCI])
        Subsystem: VIA Technologies, Inc. USB 2.0 Controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32, Cache Line Size: 64 bytes
        Interrupt: pin C routed to IRQ 50
        Region 0: Memory at fe500000 (32-bit, non-prefetchable) [size=256]
        Capabilities: [80] Power Management version 2
            Flags: PMEClk+ DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
            Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: ehci-pci

那么,最近内核USB驱动程序发生了哪些变化?这是一个错误,还是配置问题?

几个内核版本之前(3.8),USB内容发生了变化,因此必须在ehci-pci之前加载ehci-hcd. initramfs-tools已经升级为自动处理,但我仍然在/ etc / modules文件中有已解决的变通方法残留:

# make sure ehci-pci loads immediately after ehci-hcd for kernel 3.8
# (should be handled automagically by initramfs-tools 0.110 now)
#ehci-hcd
#ehci-pci

这是一种类似的情况,可以通过按特定顺序加载驱动程序或将某些过时的驱动程序列入黑名单来处理吗?

更多硬件和软件细节:

这发生在几台机器上,包括:

>采用AMD Phenom II X6 1090T处理器(工作站)的华硕M4A89TD PRO USB3主板
>采用AMD Phenom II X6 1090T处理器的华硕M5A97(神话前端)
>采用AMD Phenom II X6 1090T处理器的华硕Sabertooth 990FX(工作站和服务器)
>华硕Sabertooth 990FX搭配AMD FX(tm)-8150八核处理器(神话后端)

最后一款FX-8150(这是我以前的主板死机而我不得不重建它时所说的那个),是DigitalNow Quad DVB-T接收器的神话盒.第一个是M4A89TD Pro,它是带有廉价USB存储卡读卡器的机器.

它们都拥有至少8GB内存,并且都使用专有的nvidia驱动程序,拥有nvidia GTX-750(神话盒)或GTX-560或GTX-560Ti GPU.所有都在运行Debian sid,带有最近的内核(除了神话后端之外的所有内容都是4.2.x,因为这是除了HID之外的唯一一个USB重要的东西 – USB kbd和鼠标,甚至是wacom平板电脑工作正常,BTW,4.0内核).

所有机器都使用XFS for /和ext4 for / boot启动RAID-1中的128-256GB SSD. mythtv后端也运行zfsonlinux进行批量存储.与组合的工作站/服务器一样.

我已经尝试了debian stock kernel,liquorix内核和自定义编译的内核.所有结果都相同:最高可达3.19. 4.0及更高版本打破了我的DVB-T接收器和我的存储卡读卡器.

请注意:我不是在掌握一般知识或谷歌后五分钟内可以找到的信息.我正在了解有关4.0内核中任何已知USB(或其他可能相关的)回归的具体信息,并且幸运的是,补丁或变通方法.

解决方法:

这听起来像4.x Linux中的内核回归,至少对于您的特定硬件而言.

http://archlinuxarm.org/forum/viewtopic.php?f=53&t=8798

它可能在此提交中,但由于您未提供有关系统的任何进一步信息,因此很难说.

https://github.com/torvalds/linux/commit/a0b5cd4ac2d6542d524d8063961bf914b5df1efa

有些系统显然至少看到了USB 3的问题:
https://lists.debian.org/debian-kernel/2015/08/msg00066.html

所以真正的问题是,你的硬件是什么,以及你尝试过的最新4.x内核是什么.这可能已在最近的4.x版本中得到解决.问题是usb 2和3,还是只有3,或者与usb版本无关?这将有助于缩小范围.您的数据在您的系统上看起来只是usb2 max.

内核回归是正常的.

正如我告诉人们他们提出​​这类问题时,新的Linux内核有几种可能的结果:

>现在工作之前没有用的东西
>你的系统上的一切都保持不变
>之前有效的东西,停止工作
>有些事情变得更好,有些事情停止了

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1455376
这是一个用usb处理的Ubuntu漏洞.

通常会影响很多人使用的东西的错误会得到相对快速的修复,因此值得查看最新发布的最新稳定内核,我认为目前该版本为4.3.

如果你使用ubuntu,你可以运行wineix内核,至少如果它是当前的ubuntu,而不是LTS,对于debian,非稳定版本也是如此.

看到:inxi -bxxx将有助于显示系统的基础知识. inxi可以从大多数发行版存储库安装.

这是Greg KH的4.0 / 3.20 USB更改列表

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e29876723f7cb7728f0d6a674d23f92673e9f112

  usb: musb: fix device hotplug behind hub
  usb: dwc2: Fix a bug in reading the endpoint directions from reg.
  staging: emxx_udc: fix the build error
  usb: Retry port status check on resume to work around RH bugs
  Revert "usb: Reset USB-3 devices on USB-3 link bounce"
  uhci-hub: use HUB_CHAR_*
  usb: kconfig: replace PPC_OF with PPC
  ehci-pci: disable for Intel MID platforms (update)
  usb: gadget: Kconfig: use bool instead of boolean
  usb: musb: blackfin: remove incorrect __exit_p()
  USB: fix use-after-free bug in usb_hcd_unlink_urb()
  ehci-pci: disable for Intel MID platforms
  usb: host: pci_quirks: joing string literals
  USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
  USB: usbfs: allow URBs to be reaped after disconnection
  cdc-acm: kill unnecessary messages
  cdc-acm: add sanity checks
  usb: phy: phy-generic: Fix USB PHY gpio reset
  usb: dwc2: fix USB core dependencies
  usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()

http://kernelnewbies.org/Linux_4.0显示完整的更改集.

https://lkml.org/lkml/2015/6/26/511这是USB-4.2-rc1的变化.正如您所看到的,询问“发生了什么变化”可能不是一个正确的问题,更有用的是确定在最新版本中是否已解决了您的硬件问题.

上一篇:高标清综合接收机的主要特点,技术规格与指标参数,图片,与应用


下一篇:MT6516智能芯片