aarch64-laptops / build

Build an Linux OS based image
221 stars 47 forks source link

Unstable USB devices detection on Lenovo Yoga C630 WOS #17

Closed RussianNeuroMancer closed 5 years ago

RussianNeuroMancer commented 5 years ago

Hello!

I find that at least in case of branchy USB hub topology USB devices detection is unstable.

Topology: Lenovo Yoga C630 WOS is connected to Belkin USB-C 3.1 Express Dock HD F4U093 via front host USB-C port StarTech.com USB-C Hub HB30C5A2CSC and Dell UP3017 USB Hub is connected Belkin USB-C dock Type-A ports on the back.

Below is example of Kingston Digital 128GB Data Traveler Micro Duo USB 3C Flash Drive (DTDUO3C/128GB) connect attempt via Type-C port on StarTech.com USB-C Hub:

[17294.014401] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 17 using xhci-hcd
[17299.078299] usb 4-1.3.4.4: device descriptor read/8, error -110
[17299.186159] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 17 using xhci-hcd
[17304.454327] usb 4-1.3.4.4: device descriptor read/8, error -110
[17304.766292] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 18 using xhci-hcd
[17309.830210] usb 4-1.3.4.4: device descriptor read/8, error -110
[17309.938033] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 18 using xhci-hcd
[17315.206215] usb 4-1.3.4.4: device descriptor read/8, error -110
[17315.315568] usb 4-1.3.4-port4: attempt power cycle

Same issue is reproducible with Transcend JetFlash 850 Silver 64GB (TS64GJF850S). Both flash drives works fine via same ports of same hub on same laptop, on Windows.

Below is example of Sony 64GB USB Flash Drive (USM64CA1/S) connect attempt via Type-C port on StarTech.com USB-C Hub:

[18555.400071] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 22 using xhci-hcd
[18555.429835] usb 4-1.3.4.4: New USB device found, idVendor=054c, idProduct=09c3, bcdDevice= 1.00
[18555.429866] usb 4-1.3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[18555.429883] usb 4-1.3.4.4: Product: Storage Media
[18555.429899] usb 4-1.3.4.4: Manufacturer: Sony
[18555.429914] usb 4-1.3.4.4: SerialNumber: 9C6211812173600009
[18555.432636] usb-storage 4-1.3.4.4:1.0: USB Mass Storage device detected
[18555.433416] scsi host1: usb-storage 4-1.3.4.4:1.0
[18556.583379] scsi 1:0:0:0: Direct-Access     Sony     Storage Media    0100 PQ: 0 ANSI: 6
[18556.584842] scsi 1:0:0:0: alua: supports implicit and explicit TPGS
[18556.584876] scsi 1:0:0:0: alua: No target port descriptors found
[18556.586645] sd 1:0:0:0: Attached scsi generic sg2 type 0
[18556.587005] sd 1:0:0:0: [sdc] 123715584 512-byte logical blocks: (63.3 GB/59.0 GiB)
[18556.587815] sd 1:0:0:0: [sdc] Write Protect is off
[18556.587829] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00
[18556.588567] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[18556.595070]  sdc: sdc1
[18556.599782] sd 1:0:0:0: [sdc] Attached SCSI removable disk
[18557.054323] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[18595.707381] xhci-hcd xhci-hcd.0.auto: ERROR mismatched command completion event
[18595.707391] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for setup device command
[18597.723418] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for setup device command
[18597.931328] usb 4-1.3.4.4: device not accepting address 22, error -62

After that laptop reboot, this doesn't happen in Windows, as you can guess.

Unfortunately, Sony flash drive is not my, so I would not be able to reproduce "reboot after device not accepting address" in the future (that why I didn't register this reboot issue separately) but I write down logs of this behavior just in case it could be useful.

On other hand Kingston and Transcend flash drives is my, so I will be able to reproduce "device descriptor read error" or test fixes for this issue in the future.

RussianNeuroMancer commented 5 years ago

Little clarification regarding reboot log (Sony flash drive)

[18557.054323] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[18595.707381] xhci-hcd xhci-hcd.0.auto: ERROR mismatched command completion event

Second and following lines appear after my attempt to open flash drive in file manager.

lag-linaro commented 5 years ago

Have you tried with a simple USB-C => USB-A adaptor?

lag-linaro commented 5 years ago

USB support is fully upstream. Please report it there instead.

May I also suggest that @jhugo might know who is now responsible for QCom USB development.

RussianNeuroMancer commented 5 years ago

@lag-linaro

Currently I replacing Belkin USB-C 3.1 Express Dock HD F4U093 with StarTech TB3CDK2DP, and will try to reproduce issue once again when package arrive. Until then I will try to reproduce it with Dell DA300 in the next few days. When issue will be reliably reproducible on at least one of these two USB-C hubs - I will fill upstream bugreport.

RussianNeuroMancer commented 4 years ago

@lag-linaro

Arrived StarTech TB3CDK2DP doesn't communicate with C630 at all, regardless of operating system (no charging, no single line in dmesg, nothing) and StarTech wasn't able to find cause yet (however they ordered C630 and already investigate this issue with laptop on hands).

With Dell DA300 this USB issue looks a little bit different. For example file manager could report that data successfully copied to flash drive, I unmount it, put flash drive into other device only to find out nothing was written. Next time it tried to run "sync" before unmounting, but this does not help. Unfortunately, I have to return Dell DA300 to owner tomorrow, so there is no much point in reporting this variation of USB issues as I would not be able to test possible fix.

I going for vacation for a few months, so most likely I will have a chance to investigate USB issues further (this time most likely with Dell WD15) only next year.