Re: USB-C storage device not detected on USB 3.1 Gen 2 host when plugged in after boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 14.01.19 um 11:48 schrieb Oliver Neukum:
> On Fr, 2019-01-11 at 19:49 +0100, Jan-Marek Glogowski wrote:
>>
>> Yup, but the device is just detected if its plugged in on boot / module load.
>> I now have recompiled 5.0-rc1 with xhci as a module.
> 
> First of all, is this a regression? Did earlier kernels work?

No.
I tried 4.4.169, 4.15.0-43, 4.20.0 and finally 5.0.0-rc1.

The device actually manages to show up very, very seldomly after plugging in late.
I saw it twice when rebooting and re-plugging it a few times, during all my test with different
hardware and different Linux versions.

>> If I plug the device after the module is loaded, I get no messages in dmesg.
>> No devices shows up
>> If I rmmod xhci_pci + modprobe xhci_pci the device is correctly enumerated and works.
>> If I re-plug the device again it also doesn't show up again until module "reload".
>>
>> The attached dmesg is from a boot with the device plugged in.
>>
>> I had some talk with Greg on #kernelnewbies and he suspected a broken port.
>>
>> I have no idea if a port can enumerate but not hotplug.
>>
>> I meanwhile switched to some other HW (Acer n4660g), which shows the same problem.

So as the ultimate test I had Windows 10 installed on my previous test machine and both USB-C ports
worked as expected.

> OK, then we need logs of the failure case. A usbmon trace and dmesg
> with debugging enabled
> 
> echo "module xhci_hcd +mfp" > /sys/kernel/debug/dynamic_debug/control
> echo "module xhci_pci +mfp" > /sys/kernel/debug/dynamic_debug/control
> echo "module usbcore +mfp" > /sys/kernel/debug/dynamic_debug/control

I realized that the USB bus logging is actually calm after boot with my device plugged, the huge
amount of traffic on the USB bus isn't normal and it's somehow started by my device.

So I actually booted with

"log_buf_len=8M xhci_hcd.dyndbg=+mfp xhci_pci.dyndbg=+mfp usbcore.dyndbg=+mfp"

What I did was:

* boot with device plugged in - everything is "calm"
* modprobe usbmon
* cat /sys/kernel/debug/usb/usbmon/0u > /tmp/usbmon-boot.log
* unplug the device - wait a bit
* re-plug the device - wait a bit (bus goes crazy)
* unplug-the device - bus keeps crazy
* Ctrl+C cat
* dmesg > /tmp/dmesg-boot.log

Regards,
Jan-Marek

Attachment: dmesg-boot.log.xz
Description: application/xz

Attachment: usbmon-boot.log.xz
Description: application/xz


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux