On 24.9.2019 17.45, alex zheng wrote:
Hi Mathias, I try to ignore the DMA errors, then the transfer continues but it complete with data lost, it seems like these ERROR Transfer event should be right and must not be ignore. test app show: "did not get enough data, received size:14410176/15000000" kernel log show: (you can see more detail info in the attached log files)
Logs show your transfer ring has four segments, but hardware fails to jump from the last segment back to first) Last TRB (LINK TRB) of each segment points to the next segment, last segments link trb points back to first segment. In your case: 0x1d117000 -> 0x1eb09000 -> 0x1eb0a000 -> 0x1dbda000 -> (back to 0x1d117000) For some reason your hardware doesn't treat the last TRB at the last segment as a LINK TRB, instead it just issues a transfer event for it, and continues to the next address instead of jumping back to first segment: Transfer event for last TRB at last segment: 0x1dbda000 (TRB: 0x1dbdaff0): This is a link TRB and should not generate transfer event: xhci-hcd.0.auto: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16 comp_code 1 xhci-hcd xhci-hcd.0.auto: Looking for event-dma 000000001dbdaff0 trb-start 000000001d117000 trb-end 000000001d117000 seg-start 000000001d117000 seg-end 000000001d10 xhci-hcd xhci-hcd.0.auto: Ignoring error Next transfer event should be for TRB at fisrt segment (0x1d117000) but event shows its trying to handle a event from TRB at 000000001dbdb000, which isn't even part of the ring. xhci-hcd xhci-hcd.0.auto: process trans event : ep_index = 16, event_dma = 1dbdb000 xhci-hcd xhci-hcd.0.auto: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16 comp_code 1 xhci-hcd xhci-hcd.0.auto: Looking for event-dma 000000001dbdb000 trb-start 000000001d117000 trb-end 000000001d117000 seg-start 000000001d117000 seg-end 000000001d10 xhci-hcd xhci-hcd.0.auto: Ignoring error -Mathias