dwc2_hsotg_unmap_dma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dwc2_hsotg_unmap_dma(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so you found yourself in the kernel API manual, section 9, staring at dwc2_hsotg_unmap_dma. Don't panic. This is genuinely just the cleanup step, and honestly? She's iconic for it. Let's get into it ✨


🌸 NAME 🌸

dwc2_hsotg_unmap_dma β€” unmap the DMA memory being used for the request

like yes that's the whole name, she tells you exactly what she is, we love a transparent queen 🫢


✨ SYNOPSIS ✨

void dwc2_hsotg_unmap_dma (struct dwc2_hsotg *hsotg , struct
dwc2_hsotg_ep *hs_ep , struct dwc2_hsotg_req *hs_req );

note the void β€” she returns nothing, she does not owe you a status code, she simply does the thing and leaves πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

Three (3) besties walk into a function:

  • hsotg β€” The device state. this is the big picture, the main character, the whole device's vibe check 🌈
  • hs_ep β€” The endpoint for the request. okay so this is which endpoint we're talking about, periodt ✨
  • hs_req β€” The request being processed. the actual request in question, the one getting unmapped πŸŽ€

πŸ’– DESCRIPTION πŸ’–

This is the reverse of dwc2_hsotg_map_dma. literally the undo button, the "jk bestie" of DMA mapping 😭

She's called for the completion of a request, and her whole job is to make sure the buffer is ready for access by the caller. That's it. That's the arc. no cap πŸ’œ

think of dwc2_hsotg_map_dma as the "get ready" and this one as the "you're done, come back to the group chat" β€” they are a matched set and you should never invoke one without the other, iykyk 🧚

πŸ”₯ SEE ALSO πŸ”₯

okay this list is long and I need you to know I did not skip a single one, we do not leave people on read in this house πŸ’€ first up, the kernel file where all this lives:

  • Kernel file ./drivers/usb/dwc2/gadget.c

and then, in order, the whole squad:

eighty-two references and a kernel file, and every single one made the cut πŸ”₯ that's the whole friend group, no one got left out of the photo 🌸


and that's the page, bestie 🫢 this one lives in ./drivers/usb/dwc2, and the manual itself is dated October 2026 β€” so go forth, unmap that DMA, and remember: the buffer's gotta be ready for the caller. slay πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from