From: "Michał Pecio" <michal.pecio@gmail.com>
To: niklas.neronin@linux.intel.com
Cc: linux-usb@vger.kernel.org, mathias.nyman@linux.intel.com
Subject: Re: [PATCH 2/4] usb: xhci: move debug capabilities from trb_in_td() to handle_tx_event()
Date: Wed, 5 Mar 2025 09:46:00 +0100 [thread overview]
Message-ID: <20250305094600.1630ef54@foxbook> (raw)
In-Reply-To: <20250206103428.1034784-3-niklas.neronin@linux.intel.com>
> +debug_finding_td:
> + xhci_err(xhci, "Transfer event %u ep %d dma %016llx not part of current TD start %016llx end %016llx\n",
> + trb_comp_code, ep_index, (unsigned long long)ep_trb_dma,
> + (unsigned long long)xhci_trb_virt_to_dma(td->start_seg, td->start_trb),
> + (unsigned long long)xhci_trb_virt_to_dma(td->end_seg, td->end_trb)); +
> + xhci_for_each_ring_seg(ep_ring->first_seg, ep_seg) {
> + xhci_warn(xhci, "Ring seg %u trb start %016llx end %016llx\n", ep_seg->num,
> + (unsigned long long)ep_seg->dma,
> + (unsigned long long)(ep_seg->dma + TRB_SEGMENT_SIZE));
> + }
> + return -ESHUTDOWN;
Cleaning up trb_in_td() is obviously the right thing to do, but one
thing I always disliked about this message is how long and verbose it
is. Not sure if dumping all ring segments is useful here, seg->dma can
generally be deduced by looking at the DMA pointers involved.
As far as improvements go, IMO it would be much more useful to decode
those pointers into seg-number/trb-index pairs. I wrote a PoC and the
result is quite encouraging, I may submit it if there is interest.
Regards,
Michal
next prev parent reply other threads:[~2025-03-05 8:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 10:34 [PATCH 0/4] usb: xhci: improve trb_in_td() Niklas Neronin
2025-02-06 10:34 ` [PATCH 1/4] usb: xhci: refactor trb_in_td() to be static Niklas Neronin
2025-02-06 10:34 ` [PATCH 2/4] usb: xhci: move debug capabilities from trb_in_td() to handle_tx_event() Niklas Neronin
2025-03-05 8:46 ` Michał Pecio [this message]
2025-03-05 9:17 ` Neronin, Niklas
2025-02-06 10:34 ` [PATCH 3/4] usb: xhci: rework and simplify trb_in_td() Niklas Neronin
2025-02-19 8:56 ` Michał Pecio
2025-02-19 14:25 ` Mathias Nyman
2025-02-20 12:14 ` [PATCH 5/4 RFC] An alternative dma_in_range() implementation Michał Pecio
2025-02-20 13:18 ` Neronin, Niklas
2025-02-20 12:25 ` [PATCH 3/4] usb: xhci: rework and simplify trb_in_td() Neronin, Niklas
2025-02-06 10:34 ` [PATCH 4/4] usb: xhci: modify trb_in_td() to be more modular Niklas Neronin
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=20250305094600.1630ef54@foxbook \
--to=michal.pecio@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=niklas.neronin@linux.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