linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted
@ 2019-09-22  8:34 alex zheng
  2019-09-23  5:36 ` Felipe Balbi
  0 siblings, 1 reply; 14+ messages in thread
From: alex zheng @ 2019-09-22  8:34 UTC (permalink / raw)
  To: linux-usb

Hi all,

I am a user of dwc3 USB host controller, I found there are some
confused behavior of trb event on this controller.
When I run a raw USB data transfer(run bulk in&out transfer with
libusb) and iperf3(over rndis) at the same time,
there are some strange interrupts occurs and make the driver report
error(ERROR DMA transfer).
And:
1. this problem only hapened in USB SS mode
2. this problem seems not hapen when I run same test case with other
xhci controller(such as asmedia/intel pcie xhci controller) on PC.
3. the kernel version is 4.9.130

I think this may be a hw bug of DWC3 USB controller, could anyone
please give me some help to debug this problem?

The detail log see as below:
[  131.074102] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto: xHCI
handle event, 8000
27630 [  131.074109] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
process trans event : ep_index = 11, event_dma = 1eb13e90
27631 [  131.074117] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
inc_deq, start trb dma = 1eb13e90, dequeue_p = e482ce90, trb_free num
= 1871, ring type = 2
27632 [  131.074123] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
inc_deq 111, start trb dma = 1eb13ea0, dequeue_p = e482cea0, trb_free
num = 1872, ring type = 2
27633 [  131.074130] c0 3 (ksoftirqd/0) xhci-hcd xh[  133.057617] c0 3
(ksoftirqd/0) xhci-hcd xhci-hcd.0.auto: ERROR Transfer event TRB DMA
ptr not part of current TD ep_index 16 comp_code 1
27634 [  133.059312] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb0fff0 trb-start 000000001eb10000
trb-end 000000001eb10000 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27635 [  133.066215] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1
27636 [  133.067908] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb10000 trb-start 000000001eb10230
trb-end 000000001eb10230 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27637 [  133.070572] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1
27638 [  133.072260] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb10010 trb-start 000000001eb10230
trb-end 000000001eb10230 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27639 [  133.075052] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1
27640 [  133.076739] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb10020 trb-start 000000001eb10230
trb-end 000000001eb10230 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27641 [  133.079472] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1
27642 [  133.081159] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb10030 trb-start 000000001eb10230
trb-end 000000001eb10230 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27643 [  133.083896] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1
27644 [  133.085584] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
Looking for event-dma 000000001eb10040 trb-start 000000001eb10230
trb-end 000000001eb10230 seg-start 000000001eb10000 seg-end
000000001eb10ff0
27645 [  133.088328] c0 3 (ksoftirqd/0) xhci-hcd xhci-hcd.0.auto:
ERROR Transfer event TRB DMA ptr not part of current TD ep_index 16
comp_code 1

1. According these logs above the link trb whose address is 0x1eb0fff0
occurs a transfer event, but this DMA address is not in the trb ring,
then the driver report an error(and followed a few error logs witch
invalid DMA address).
2. I dump the data of the address(0x1eb0fff0) and find the IOC bit is
not set, see as below:
# dump_reg.sh 0x1eb0fff0 4
0x1eb0fff0:0x1EB10000 0x00000000 0x00000000 0x00001800

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-10-25  8:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-22  8:34 BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted alex zheng
2019-09-23  5:36 ` Felipe Balbi
2019-09-23  7:08   ` alex zheng
2019-09-23 10:15     ` Mathias Nyman
     [not found]       ` <CADGPSwi87a5+3mCGAgptHgpBsQk9STQrEKs-kC6Nw55nPdRtOw@mail.gmail.com>
2019-09-25 14:48         ` Mathias Nyman
2019-09-25 16:22           ` David Laight
2019-09-26  5:45             ` Felipe Balbi
2019-09-26  8:21               ` Mathias Nyman
2019-09-26 10:38                 ` alex zheng
     [not found]                   ` <CADGPSwhCPvdu=KmQP6RHMJnh292UO0uBAt+KyJqqOWY5DWDc3w@mail.gmail.com>
2019-10-23  9:52                     ` alex zheng
2019-10-23 10:01                       ` Felipe Balbi
2019-10-25  8:44                         ` alex zheng
2019-09-23 10:45     ` Felipe Balbi
2019-09-24 14:19       ` alex zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).