dwc2_hsotg_unmap_dma(9)
π 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:
using_dma(9)dwc2_gadget_incr_frame_num(9)dwc2_gadget_dec_frame_num_by_one(9)dwc2_hsotg_en_gsint(9)dwc2_hsotg_disable_gsint(9)dwc2_hsotg_ctrl_epint(9)dwc2_hsotg_tx_fifo_count(9)dwc2_hsotg_tx_fifo_total_depth(9)dwc2_gadget_wkup_alert_handler(9)dwc2_hsotg_tx_fifo_average_depth(9)dwc2_hsotg_init_fifo(9)dwc2_hsotg_ep_alloc_request(9)is_ep_periodic(9)dwc2_hsotg_write_fifo(9)get_ep_limit(9)dwc2_hsotg_read_frameno(9)dwc2_gadget_get_chain_limit(9)dwc2_hsotg_start_req(9)dwc2_hsotg_map_dma(9)dwc2_gadget_target_frame_elapsed(9)dwc2_hsotg_complete_oursetup(9)ep_from_windex(9)dwc2_hsotg_set_test_mode(9)dwc2_hsotg_send_reply(9)dwc2_hsotg_process_req_status(9)get_ep_head(9)dwc2_gadget_start_next_request(9)dwc2_hsotg_process_req_feature(9)dwc2_hsotg_stall_ep0(9)dwc2_hsotg_process_control(9)dwc2_hsotg_complete_setup(9)dwc2_hsotg_enqueue_setup(9)dwc2_hsotg_complete_request(9)dwc2_hsotg_rx_data(9)dwc2_hsotg_ep0_zlp(9)dwc2_hsotg_handle_outdone(9)dwc2_hsotg_handle_rx(9)dwc2_hsotg_ep0_mps(9)dwc2_hsotg_set_ep_maxpacket(9)dwc2_hsotg_txfifo_flush(9)dwc2_hsotg_trytx(9)dwc2_hsotg_complete_in(9)dwc2_gadget_read_ep_interrupts(9)dwc2_gadget_handle_ep_disabled(9)dwc2_gadget_handle_out_token_ep_disabled(9)dwc2_gadget_handle_nak(9)dwc2_hsotg_epint(9)dwc2_hsotg_irq_enumdone(9)kill_all_requests(9)dwc2_hsotg_disconnect(9)dwc2_hsotg_irq_fifoempty(9)dwc2_hsotg_core_init_disconnected(9)dwc2_gadget_handle_incomplete_isoc_in(9)dwc2_gadget_handle_incomplete_isoc_out(9)dwc2_hsotg_irq(9)dwc2_hsotg_ep_enable(9)dwc2_hsotg_ep_disable(9)on_list(9)dwc2_hsotg_ep_dequeue(9)dwc2_gadget_ep_set_wedge(9)dwc2_hsotg_ep_sethalt(9)dwc2_hsotg_ep_sethalt_lock(9)dwc2_hsotg_init(9)dwc2_hsotg_udc_start(9)dwc2_hsotg_udc_stop(9)dwc2_hsotg_gadget_getframe(9)dwc2_hsotg_set_selfpowered(9)dwc2_hsotg_pullup(9)dwc2_hsotg_vbus_draw(9)dwc2_hsotg_initep(9)dwc2_hsotg_hw_cfg(9)dwc2_hsotg_dump(9)dwc2_gadget_init(9)dwc2_hsotg_remove(9)dwc2_backup_device_registers(9)dwc2_restore_device_registers(9)dwc2_gadget_init_lpm(9)dwc2_gadget_program_ref_clk(9)dwc2_gadget_enter_hibernation(9)dwc2_gadget_exit_hibernation(9)dwc2_gadget_enter_partial_power_down(9)dwc2_gadget_enter_clock_gating(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms