linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Date: Fri, 22 Nov 2019 18:35:45 +0200	[thread overview]
Message-ID: <3449c957-ce20-baa3-ca97-63aff9ffa898@linux.intel.com> (raw)
In-Reply-To: <F6AF08A8-8532-4A58-AE33-C1B02CBDC993@canonical.com>

On 22.11.2019 17.10, Kai-Heng Feng wrote:
> 
> 
>> On Nov 22, 2019, at 20:17, Mathias Nyman <mathias.nyman@linux.intel.com> wrote:
> 
> [snipped]
> 
>>
>> The event ring is already overwritten with new events when dumped.
>>
>> Could you apply the code below, it will dump both the endpoint transfer ring
>> and the event ring at the right moment:
> 
> The log is quite large so I pasted it here:
> https://pastebin.ubuntu.com/p/wWpS8ctNrb/
> 
> Kai-Heng

Thanks, ring dumps shows xHC hardware never wrote an event to the event ring for the TRB at 0x487a0fe0.

Event ring:
[   61.114263] xhci_hcd 0000:3f:00.0: 0x000000049803a5d0: TRB 0000000487a08fd0 status 'Short Packet' len 20416 slot 4 ep 3 type 'Transfer Event' flags e:c
   we got a short packet event for TRB at 0x487a08fd0, which is one TRB before
[   61.114269] xhci_hcd 0000:3f:00.0: 0x000000049803a5e0: TRB 0000000487a07a30 status 'Success' len 0 slot 4 ep 4 type 'Transfer Event' flags e:c
[   61.114275] xhci_hcd 0000:3f:00.0: 0x000000049803a5f0: TRB 0000000487a07a40 status 'Success' len 0 slot 4 ep 4 type 'Transfer Event' flags e:c
[   61.114281] xhci_hcd 0000:3f:00.0: 0x000000049803a600: TRB 0000000487a09000 status 'Short Packet' len 20416 slot 4 ep 3 type 'Transfer Event' flags e:c
   we got a short packet event for TRB at 487a09000, which is one TRB after,
   but no event for 0x487a0fe0

The TRB at 0x487a0fe0 in the endpoint ring looks fine:
[   61.118683] xhci_hcd 0000:3f:00.0: 0x0000000487a08fc0: Buffer 000000046eef0000 length 32768 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:C
[   61.118689] xhci_hcd 0000:3f:00.0: 0x0000000487a08fd0: Buffer 000000048e740000 length 32768 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:C
[   61.118696] xhci_hcd 0000:3f:00.0: 0x0000000487a08fe0: Buffer 000000046ebe8000 length 32768 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:C
[   61.118702] xhci_hcd 0000:3f:00.0: 0x0000000487a08ff0: LINK 0000000487a09000 intr 0 type 'Link' flags i:c:T:C

The TRB with missing event is similar to all the other Normal TRBs in the ring.
It has both interrupt on completion, and interrupt on short packet bits set.
Can't see any reason why an event wasn't generated.

It seems it's always the TRB just before the LINK TRB that is missing an event.
(address ends with 0xfe0).

Best guess is that this particular xHC (ASmedia) can't correctly generate events
for the TRB right before Link  TRB

-Mathias

  reply	other threads:[~2019-11-22 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  7:38 ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13 Kai-Heng Feng
2019-11-21 11:47 ` Greg KH
2019-11-21 16:44   ` Kai-Heng Feng
2019-11-21 11:48 ` Mathias Nyman
2019-11-21 16:43   ` Kai-Heng Feng
2019-11-22 12:17     ` Mathias Nyman
2019-11-22 15:10       ` Kai-Heng Feng
2019-11-22 16:35         ` Mathias Nyman [this message]
2019-11-26  9:44           ` Kai-Heng Feng
2019-11-26 10:54             ` Mathias Nyman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3449c957-ce20-baa3-ca97-63aff9ffa898@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).