【问题标题】:Linux OTG port screwing up my other host portLinux OTG 端口搞砸了我的其他主机端口
【发布时间】:2016-07-12 02:25:00
【问题描述】:

我有一个 Variscite VAR-SOM-MX6,运行 Linux 3.0.35 内核,有两个 USB 端口。第一个端口是连接到外部 mini-OTG 插孔的 OTG 端口。第二个是内部主机端口连接到集线器芯片,然后连接到其他一些设备。 如果我将 OTG 电缆插入第一个端口,告诉它是主机,那么一切正常。如果我插入了普通电缆或根本没有电缆,则第二个主机端口无法正确枚举。电缆的另一端不必有任何东西,因此这是一个仅与 OTG 尝试成为主机还是设备有关的错误。 例如,如果我插入 OTG 电缆并重新启动,内核日志包含以下几行。

usb 2-1: new high speed USB device number 2 using fsl-ehci
usb 2-1: New USB device found, idVendor=0424, idProduct=2534
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
usb 2-1.1: new high speed USB device number 3 using fsl-ehci
usb 2-1.1: New USB device found, idVendor=0424, idProduct=9e00
usb 2-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1.2: new high speed USB device number 4 using fsl-ehci
usb 2-1.2: New USB device found, idVendor=0403, idProduct=6011
usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.2: Product: Quad RS232-HS
usb 2-1.2: Manufacturer: FTDI

如果我从端口 1 拉出 OTG 电缆,它会断开端口 2 上的所有连接:

usb 2-1: USB disconnect, device number 2
usb 2-1.1: USB disconnect, device number 3
usb 2-1.2: USB disconnect, device number 4

然后尝试重新枚举所有内容,但惨败:

usb 2-1: new high speed USB device number 5 using fsl-ehci
usb 2-1: new high speed USB device number 6 using fsl-ehci
usb 2-1: new high speed USB device number 7 using fsl-ehci
usb 2-1: device not accepting address 7, error -71
usb 2-1: new high speed USB device number 8 using fsl-ehci
usb 2-1: device not accepting address 8, error -71
hub 2-0:1.0: unable to enumerate USB device on port 1

我怀疑某些代码使用物理端口号 1 和 2,无论端口是主机还是设备,而其他代码只查看实际主机端口,并在内部混淆端口号。有没有人见过这个错误?谷歌搜索没有任何结果。或者有没有更专业的论坛让我可以发布这个问题?

【问题讨论】:

    标签: linux usb driver usb-otg


    【解决方案1】:

    如果有人感兴趣,这原来是硬件设计问题。两个 USB PHY 均由内部稳压器供电,该内部稳压器由主机 VBUS 或 OTG VBUS 的 +5V 供电,以较高者为准。设计人员认为这些是电压感应输入,并通过 10K 电阻以 5V 驱动主机 VBUS。因此,当未连接 OTG 端口时,便便用完了。将 10K 更改为 0 欧姆即可解决此问题。

    【讨论】:

      猜你喜欢
      • 2013-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-27
      • 1970-01-01
      • 2014-10-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多