Re: "Transfer event TRB DMA ptr not part of current TD" spam after USB disconnection

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

 



CC'ing XHCI driver maintainer.

> Disconnecting a high- or super-speed UVC camera from USB 3.0 port
> during recording prints a lot of these errors.

I made progress on this issue and I know what happens, I only don't
know whose fault it is and what the proper solution should be.


The host controller, in case it's a hardware bug:
NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 03)


And this is what happens when errors appear on a running isoch EP.
I added debug code which traces execution and prints full contents of
the failing TRBs.


# errors in single TDs at offsets 3c0 and 3d0 are dealt with cleanly

[ 8350.611162] xhci_hcd 0000:02:00.0: handle_tx_event: ep_trb_dma 108b043c0 comp_code 4
[ 8350.611166] xhci_hcd 0000:02:00.0: dump first TRB: 108b043c0 -> 000000010986e6a0 0004099c 80001424
[ 8350.611168] xhci_hcd 0000:02:00.0: dump last TRB:  108b043c0 -> 000000010986e6a0 0004099c 80001424
[ 8350.611171] xhci_hcd 0000:02:00.0: process_isoc_td comp_code 4 last_in_td 1
[ 8350.611172] xhci_hcd 0000:02:00.0: finish_td: comp_code 4

[ 8350.611287] xhci_hcd 0000:02:00.0: handle_tx_event: ep_trb_dma 108b043d0 comp_code 4
[ 8350.611291] xhci_hcd 0000:02:00.0: dump first TRB: 108b043d0 -> 000000010986f03c 0004099c 80001424
[ 8350.611293] xhci_hcd 0000:02:00.0: dump last TRB:  108b043d0 -> 000000010986f03c 0004099c 80001424
[ 8350.611295] xhci_hcd 0000:02:00.0: process_isoc_td comp_code 4 last_in_td 1
[ 8350.611297] xhci_hcd 0000:02:00.0: finish_td: comp_code 4

# then a chained TD appears at 3e0 and 3f0 and signals an error at 3e0

[ 8350.611412] xhci_hcd 0000:02:00.0: handle_tx_event: ep_trb_dma 108b043e0 comp_code 4
[ 8350.611416] xhci_hcd 0000:02:00.0: dump first TRB: 108b043e0 -> 000000010986f9d8 00040628 80001414
[ 8350.611418] xhci_hcd 0000:02:00.0: dump last TRB:  108b043f0 -> 0000000109870000 00000374 00000424
[ 8350.611421] xhci_hcd 0000:02:00.0: process_isoc_td comp_code 4 last_in_td 0

# process_isoc_td found that it isn't the last TRB in this TD and didn't call finish_td
# the driver still waits for 3f0 completion, but 400 arrives instead

[ 8350.611536] xhci_hcd 0000:02:00.0: handle_tx_event: ep_trb_dma 108b04400 comp_code 4
[ 8350.611540] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 4

# now everything is out of sync and the last message repeats ad nauseam


To my layman eye the chained TD looks OK (and has the right total size
of 0x99c). So the question is if the hardware is right to signal failure
on the first TRD only, and how the driver should handle it?


Thanks,
Michal




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

  Powered by Linux