usb: host: xhci: stalled endpoint ring not cleared on empty td_list

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

 



Hi,

we observe an issue with a td_list running empty and an
endpoint being stalled at the same time on

Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 x86_64 x86_64 x86_64 GNU/Linux.

According to the logs, the halt condition of the endpoint is detected
on host side, but not cleared. Instead the "WARN Event TRB..." message
is displayed.
After that, newly submitted URBs are queued, but the host controller
does not issue any IN transactions on USB anymore.

[  103.353450] ihu-low kernel: xhci_hcd 0000:00:15.0: Stalled endpoint
[ 103.353453] ihu-low kernel: xhci_hcd 0000:00:15.0: WARN Event TRB for slot 2 ep 28 with no TDs queued? [ 103.353456] ihu-low kernel: xhci_hcd 0000:00:15.0: Event TRB with TRB type ID 32 [ 103.353459] ihu-low kernel: xhci_hcd 0000:00:15.0: Offset 0x0 = 0x74930f30
[  103.353462] ihu-low kernel: xhci_hcd 0000:00:15.0: Offset 0x4 = 0x0
[  103.353464] ihu-low kernel: xhci_hcd 0000:00:15.0: Offset 0x8 = 0x60005f2
[  103.353467] ihu-low kernel: xhci_hcd 0000:00:15.0: Offset 0xc = 0x21d8001
[ 103.353666] ihu-low kernel: xhci_hcd 0000:00:15.0: WARN halted endpoint, queueing URB anyway.


The code shows that the function handle_tx_event() of xhci-ring.c
detects the empty transfer descriptor list, throws the warning and
skips the call to process_bulk_intr_td(), which would do the
clean-up work.

In case the td_list is not running empty, the stalled endpoint ring
is perfectly cleaned up and communication on USB resumed.


[   20.310469] ihu-low kernel: xhci_hcd 0000:00:15.0: Stalled endpoint
[ 20.310473] ihu-low kernel: xhci_hcd 0000:00:15.0: Cleaning up stalled endpoint ring [ 20.310476] ihu-low kernel: xhci_hcd 0000:00:15.0: Finding endpoint context
[   20.310478] ihu-low kernel: xhci_hcd 0000:00:15.0: Cycle state = 0x0
[ 20.310481] ihu-low kernel: xhci_hcd 0000:00:15.0: New dequeue segment = ffff8800777ae000 (virtual) [ 20.310484] ihu-low kernel: xhci_hcd 0000:00:15.0: New dequeue pointer = 0x765176e0 (DMA) [ 20.310486] ihu-low kernel: xhci_hcd 0000:00:15.0: Queueing new dequeue state [ 20.310490] ihu-low kernel: xhci_hcd 0000:00:15.0: Set TR Deq Ptr cmd, new deq seg = ffff8800777ae000 (0x76517000 dma), new deq ptr = ffff8800765176e0 (0x765176e0 dma), new cycle = 0
[   20.310492] ihu-low kernel: xhci_hcd 0000:00:15.0: // Ding dong!
[ 20.310498] ihu-low kernel: xhci_hcd 0000:00:15.0: Giveback URB ffff88005c312f00, len = 0, expected = 1522, status = -32 [ 20.310502] ihu-low kernel: xhci_hcd 0000:00:15.0: Ignoring reset ep completion code of 1 [ 20.310505] ihu-low kernel: xhci_hcd 0000:00:15.0: Successful Set TR Deq Ptr cmd, deq = @765176e0 [ 21.918842] ihu-low kernel: xhci_hcd 0000:00:15.0: ep 0x8e - asked for 1522 bytes, 1472 bytes untransferred [ 22.918972] ihu-low kernel: xhci_hcd 0000:00:15.0: ep 0x8e - asked for 1522 bytes, 1456 bytes untransferred



thanks,
Chris


--
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