public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] usb: xhci: improve trb_in_td()
@ 2025-02-06 10:34 Niklas Neronin
  2025-02-06 10:34 ` [PATCH 1/4] usb: xhci: refactor trb_in_td() to be static Niklas Neronin
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Niklas Neronin @ 2025-02-06 10:34 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-usb, Niklas Neronin

Function td_in_trd() checks whether a DMA address is within the TDs
boundaries. This patch set aims to simplify and improve trb_in_td().

Additionally, the rework will enable trb_in_td() (with renaming and minor
modifications) to also check whether a DMA address is in a ring queue.
This will be utilized in the upcoming handle_tx_event() rework.

Example of a Ring Structure:
The example segment ring is composed of three segments (A, B, C), each
containing three TRBs (1, 2, 3). Any segment can serve as the start or
end segment, and any TRB within the start segment can be the start TRB,
and vice versa.

      +---+   +---+   +---+
C --> | A |-->| B |-->| C |--> A
      +---+   +---+   +---+
        |       |       |
      +---+   +---+   +---+
      | 1 |   | 1 |   | 1 |
      | 2 |   | 2 |   | 2 |
      | 3 |   | 3 |   | 3 |
      +---+   +---+   +---+

Niklas Neronin (4):
  usb: xhci: refactor trb_in_td() to be static
  usb: xhci: move debug capabilities from trb_in_td() to
    handle_tx_event()
  usb: xhci: rework and simplify trb_in_td()
  usb: xhci: modify trb_in_td() to be more modular

 drivers/usb/host/xhci-ring.c | 143 ++++++++++++++++++-----------------
 drivers/usb/host/xhci.h      |   2 -
 2 files changed, 72 insertions(+), 73 deletions(-)

-- 
2.47.2


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

end of thread, other threads:[~2025-03-05  9:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox