STRUCT DWC3_REQUEST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct dwc3_request(9) β€” Kernel API Manual πŸ’–

🌸 NAME 🌸

struct dwc3_request β€” bestie, this is literally the representation of a transfer request. That’s the whole vibe. πŸ’…


✨ SYNOPSIS ✨

okay so here’s the struct in all its glory, no cap:

struct dwc3_request {
    struct usb_request      request;
    struct list_head        list;
    struct dwc3_ep          *dep;
    struct scatterlist      *start_sg;
    unsigned int            num_pending_sgs;
    unsigned int            remaining;
    unsigned int            status;
  #define DWC3_REQUEST_STATUS_QUEUED              0;
  #define DWC3_REQUEST_STATUS_STARTED             1;
  #define DWC3_REQUEST_STATUS_DISCONNECTED        2;
  #define DWC3_REQUEST_STATUS_DEQUEUED            3;
  #define DWC3_REQUEST_STATUS_STALLED             4;
  #define DWC3_REQUEST_STATUS_COMPLETED           5;
  #define DWC3_REQUEST_STATUS_UNKNOWN             -1;
    u8 epnum;
    struct dwc3_trb         *trb;
    dma_addr_t trb_dma;
    unsigned int            num_trbs;
    unsigned int            direction:1;
    unsigned int            mapped:1;
};

πŸŽ€ Members πŸŽ€

every field has a job, and none of them are doing too much:

  • request β€” the struct usb_request that’s actually getting transferred 🫢
  • list β€” a list_head used for request queueing
  • dep β€” the struct dwc3_ep that owns this request
  • start_sg β€” pointer to the sg which should be queued next
  • num_pending_sgs β€” counter to pending sgs
  • remaining β€” amount of data remaining
  • status β€” internal dwc3 request status tracking; the DWC3_REQUEST_STATUS_* defines up in the synopsis are its whole personality
  • epnum β€” endpoint number to which this request refers
  • trb β€” pointer to struct dwc3_trb
  • trb_dma β€” DMA address of trb
  • num_trbs β€” number of TRBs used by this request
  • direction β€” IN or OUT direction flag
  • mapped β€” true when the request has been dma-mapped

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie β€” same kernel-file energy:

  • Kernel file ./drivers/usb/dwc3/core.h
  • struct dwc3_event_buffer(9)
  • struct dwc3_ep(9)
  • struct dwc3_trb(9)
  • struct dwc3_hwparams(9)
  • struct dwc3_glue_ops(9)
  • struct dwc3(9)
  • struct dwc3_event_depevt(9)
  • struct dwc3_event_devt(9)
  • struct dwc3_event_gevt(9)
  • union dwc3_event(9)
  • struct dwc3_gadget_ep_cmd_params(9)
  • dwc3_mdwidth(9)

okay bye bestie 🫢 β€” this page came from ./drivers/usb/dwc3, dated October 2026, and it’s struct dwc3_request(9). periodt. πŸ’…

πŸ“¦ where this page comes from