Estou com um comportamento estranho em uma placa personalizada que passa por hub USB e estou tentando determinar a causa raiz.
Quando o flash é tentado de forma nativa (Linux XPS-15-9560 4.19.0-041900-genérico # 201810221809 SMP seg 22 de outubro 22:11:45 UTC 2018 x86_64 x86_64 x86_64 GNU / Linux) , falha com:
open("/dev/bus/usb/001/039", O_RDWR) = 5
read(5, " 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
open("/dev/bus/usb/001/039", O_RDWR) = 5
read(5, " 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
%pre%@U\tx%pre%%pre%%pre%\t %pre%%pre%0\t%pre%%pre%777%pre%1@%pre%%pre%@%pre%%pre%", 1024) = 50
close(4) = 0
close(3) = 0
ioctl(5, USBDEVFS_CLAIMINTERFACE, 0x9f346b0) = 0
ioctl(5, USBDEVFS_BULK, 0xffbc1d30) = -1 ETIMEDOUT (Connection timed out)
@U\tx%pre%%pre%%pre%\t %pre%%pre%0\t%pre%%pre%777%pre%1@%pre%%pre%@%pre%%pre%", 1024) = 50
close(4) = 0
close(3) = 0
ioctl(5, USBDEVFS_CLAIMINTERFACE, 0x9f346b0) = 0
ioctl(5, USBDEVFS_BULK, 0xffbc1d30) = -1 ETIMEDOUT (Connection timed out)
E o usbmon correspondente:
%pre%A estrutura é:
%pre%Dmesg relatórios:
%pre%apontando para a configuração incorreta do HW.
No entanto, ao executar o mesmo no VirtualBox ubuntu 16.04 no Win7, a mesma operação é concluída com êxito. (em todos os drivers USB: ohci, ehci, xhci)
O Dmesg ainda se queixa da mesma configuração do maxpacket estar errada com um valor diferente, dependendo do driver atual (ou seja, ehci, ohci, xhci).
Estou confuso sobre a provável causa raiz desde a mesma configuração trabalhando, VM IMHO exclui qualquer problema de configuração ou driver HW.
Preciso relatar isso ao mantenedor do driver USB?
Alguma dica para mais depuração?