Re: xHCI problem? [was Re: Erratic USB device behavior and device loss]

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

 



On 19.08.2016 13:26, Ritesh Raj Sarraf wrote:
Hello Mathia,

On Fri, 2016-08-19 at 11:42 +0300, Mathias Nyman wrote:

It'd help to know if it really is a bug or something else.

Could you add xhci debugging?. The current logs mainly show usb core
reporting errors on urbs returned (or timeout) from xhci.

xhci debugging can be added with
echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control
Make sure debugfs is mounted before.


There's a lot of debugging output. I've attached the dmesg output in this email.

There is a scattergather fix in 4.8-rc1, but it has another regression, so
waiting for 4.8-rc3 and retrying with it could make sense.
Not sure if that fix is related, but should be fairly easy to try before
digging too
deep into this


Okay! I'll try out rc3 when it is out. Meanwhile, if there is anything
interesting in the logs, please let me know.


* A few disconnects, were these real disconnects done by you?:
 Aug 18 23:55:57 learner kernel: usb 1-4: USB disconnect, device number 27
 Aug 18 23:55:58 learner kernel: usb 1-4: new high-speed USB device number 28 using xhci_hcd
 ..
 Aug 18 23:56:18 learner kernel: usb 1-4: USB disconnect, device number 28
 Aug 18 23:56:20 learner kernel: usb 1-4: new high-speed USB device number 32 using xhci_hcd
 ..
 Aug 18 23:56:21 learner kernel: usb 1-4: USB disconnect, device number 32
 Aug 18 23:56:21 learner kernel: usb 1-4: new high-speed USB device number 34 using xhci_hcd

* A bit unclean resume for some of the devices:

 Aug 19 14:22:32 learner kernel: xhci_hcd 0000:00:14.0: port 7 resume PLC timeout
 Aug 19 14:22:32 learner kernel: xhci_hcd 0000:00:14.0: port 4 resume PLC timeout
 Aug 19 14:22:32 learner kernel: xhci_hcd 0000:00:14.0: port 3 resume PLC timeout
 Aug 19 14:22:32 learner kernel: rtc_cmos 00:01: System wakeup disabled by ACPI

* Problems in reading device descriptors and addressing the device:

Aug 19 14:22:37 learner kernel: usb 1-4: device descriptor read/64, error -71
Aug 19 14:22:37 learner kernel: usb 1-4: device descriptor read/64, error -71
Aug 19 14:22:37 learner kernel: usb 1-4: new high-speed USB device number 48 using xhci_hcd
Aug 19 14:22:37 learner kernel: usb 1-4: device descriptor read/64, error -71
Aug 19 14:22:38 learner kernel: usb 1-4: device descriptor read/64, error -71
Aug 19 14:22:38 learner kernel: usb 1-4: new high-speed USB device number 49 using xhci_hcd
Aug 19 14:22:38 learner kernel: usb 1-4: Device not responding to setup address.
Aug 19 14:22:38 learner kernel: usb 1-4: Device not responding to setup address.
Aug 19 14:22:38 learner kernel: usb 1-4: device not accepting address 49, error -71
Aug 19 14:22:38 learner kernel: usb 1-4: new high-speed USB device number 50 using xhci_hcd
Aug 19 14:22:38 learner kernel: usb 1-4: Device not responding to setup address.
Aug 19 14:22:39 learner kernel: usb 1-4: Device not responding to setup address.
Aug 19 14:22:39 learner kernel: usb 1-4: device not accepting address 50, error -71
Aug 19 14:22:39 learner kernel: usb usb1-port4: unable to enumerate USB device

* And at the end we it looks like we get stuck at a halted endpoint. Every URB to that endpoint
  is canceled. Either we fail at noticing and clearing the halt, or then the endpoint halts again
  at every transfer.

Aug 19 15:46:11 learner kernel: xhci_hcd 0000:00:14.0: Cancel URB ffff88020bb4b000, dev 4, ep 0x1, starting at offset 0x9a2b2830
Aug 19 15:46:11 learner kernel: xhci_hcd 0000:00:14.0: // Ding dong!
Aug 19 15:46:11 learner kernel: xhci_hcd 0000:00:14.0: Removing canceled TD starting at 0x9a2b2830 (dma).
Aug 19 15:46:11 learner kernel: xhci_hcd 0000:00:14.0: TRB to noop at offset 0x9a2b2830
Aug 19 15:46:12 learner kernel: xhci_hcd 0000:00:14.0: WARN halted endpoint, queueing URB anyway.
Aug 19 15:46:12 learner kernel: xhci_hcd 0000:00:14.0: ep 0x81 - asked for 37 bytes, 27 bytes untransferred
Aug 19 15:46:12 learner kernel: xhci_hcd 0000:00:14.0: Cancel URB ffff880182e41180, dev 4, ep 0x1, starting at offset 0x9a2b2840
Aug 19 15:46:12 learner kernel: xhci_hcd 0000:00:14.0: // Ding dong!
Aug 19 15:46:12 learner kernel: xhci_hcd 0000:00:14.0: Removing canceled TD starting at 0x9a2b2840 (dma).

A usbmon log (together with a dmesg) could give some more clues
see Documentation/usb/usbmon.txt

-Mathias


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux