USB批量写入在VM linux(win7上)中有效,但在本机linux(ubuntu 4.19)中无效?

USB批量写入在VM linux(win7上)中有效,但在本机linux(ubuntu 4.19)中无效?

我在通过 USB 集线器闪存的定制板上遇到了奇怪的行为,我正在尝试确定根本原因。

当尝试从本机刷新时(Linux XPS-15-9560 4.19.0-041900-generic #201810221809 SMP 星期一 10 月 22 日 22:11:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux),失败并显示:

 open("/dev/bus/usb/001/039", O_RDWR)    = 5
 read(5, "\22\1\0\2\0\0\0@U\t\30x\0\0\1\2\0\1\t\2 \0\1\1\0\300\20\t\4\0\0\2\377\377\377\0\7\5\201\2@\0\0\7\5\1\2@\0\0", 1024) = 50
 close(4)                                = 0
 close(3)                                = 0
 ioctl(5, USBDEVFS_CLAIMINTERFACE, 0x9f346b0) = 0
 ioctl(5, USBDEVFS_BULK, 0xffbc1d30)     = -1 ETIMEDOUT (Connection timed out)

以及对应的usbmon:

 ffff90732cdbbcc0 2090024900 S Ci:1:014:0 s a3 00 0000 0001 0004 4 <
 ffff90732cdbbcc0 2090024932 C Ci:1:014:0 0 4 = 03050000
 ffff90732cdbb6c0 2116444706 S Bi:1:015:1 -115 96 <
 ffff90732cdbb6c0 2116444759 C Bi:1:015:1 0 16 = 40800101 00000024 02575064 01108081
 ffff90732cdbb900 2116716579 S Bo:1:015:1 -115 1472 = c0050000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 ffff90732cdbb900 2121948281 C Bo:1:015:1 -2 

结构是:

 /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
    |__ Port 1: Dev 5, If 0, Class=Hub, Driver=hub/2p, 5000M                                      # USB 3 part of 8020
 /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 14, If 0, Class=Hub, Driver=hub/2p, 480M                                      # USB 2 part of 8020
        |__ Port 1: Dev 15, If 0, Class=Vendor Specific Class, Driver=, 480M                      # target board
        |__ Port 2: Dev 16, If 3, Class=Vendor Specific Class, Driver=ftdi_sio, 480M              # FTDI
        |__ Port 2: Dev 16, If 1, Class=Vendor Specific Class, Driver=ftdi_sio, 480M              # FTDI
        |__ Port 2: Dev 16, If 2, Class=Vendor Specific Class, Driver=ftdi_sio, 480M              # FTDI
        |__ Port 2: Dev 16, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 480M              # FTDI

消息报告:

 [ 7718.687335] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
 [ 7718.687339] usb 1-1.1: SerialNumber: 800508593070
 [ 7718.688754] hub 1-1.1:1.0: USB hub found
 [ 7718.688798] hub 1-1.1:1.0: 2 ports detected
 [ 7718.975225] usb 1-1.1.1: new high-speed USB device number 17 using xhci_hcd
 [ 7719.075855] usb 1-1.1.1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
 [ 7719.075862] usb 1-1.1.1: config 1 interface 0 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
 [ 7719.076290] usb 1-1.1.1: New USB device found, idVendor=0955, idProduct=7818, bcdDevice= 0.00
 [ 7719.076296] usb 1-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 [ 7719.076300] usb 1-1.1.1: Product: APX
 [ 7719.076304] usb 1-1.1.1: Manufacturer: NVIDIA Corp.
 [ 7719.159230] usb 1-1.1.2: new high-speed USB device number 18 using xhci_hcd
 [ 7719.259916] usb 1-1.1.2: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
 [ 7719.259923] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 [ 7719.259927] usb 1-1.1.2: Product: Quad RS232-HS
 [ 7719.259931] usb 1-1.1.2: Manufacturer: FTDI
 [ 7719.266889] ftdi_sio 1-1.1.2:1.0: FTDI USB Serial Device converter detected
 [ 7719.267021] usb 1-1.1.2: Detected FT4232H
 [ 7719.267229] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB0
 [ 7719.267580] ftdi_sio 1-1.1.2:1.1: FTDI USB Serial Device converter detected
 [ 7719.267653] usb 1-1.1.2: Detected FT4232H
 [ 7719.267944] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB1
 [ 7719.268278] ftdi_sio 1-1.1.2:1.2: FTDI USB Serial Device converter detected
 [ 7719.268355] usb 1-1.1.2: Detected FT4232H
 [ 7719.268681] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB2
 [ 7719.269021] ftdi_sio 1-1.1.2:1.3: FTDI USB Serial Device converter detected 
 [ 7719.269100] usb 1-1.1.2: Detected FT4232H
 [ 7719.269333] usb 1-1.1.2: FTDI USB Serial Device converter now attached to ttyUSB3

指向错误的硬件配置。

但是,当在 Win7 上的 VirtualBox ubuntu 16.04 上运行相同的操作时,相同的操作成功完成。 (在所有 USB 驱动程序上:ohci、ehci、xhci)

Dmesg 仍然抱怨相同的 maxpacket 设置是错误的,并且根据当前驱动程序(即 ehci、ohci、xhci)而具有不同的值。

我对可能的根本原因感到困惑,因为相同的配置在 VM 中工作,恕我直言,排除了任何硬件配置或驱动程序问题。

我需要将此情况报告给 USB 驱动程序维护人员吗?

对于进一步调试有什么建议吗?

相关内容