cdns3_gadget_giveback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 cdns3_gadget_giveback (9) β€” Kernel API Manual ✨

okay so bestie, welcome to the cdns3_gadget_giveback page πŸ’… this is a section 9 Kernel API Manual entry, and honestly? it's a little workhorse and we're gonna appreciate her.


πŸŽ€ NAME πŸŽ€

cdns3_gadget_giveback β€” literally just: call struct usb_request's ->complete callback. that's the whole vibe. no cap 🫢


✨ SYNOPSIS ✨

void cdns3_gadget_giveback (struct cdns3_endpoint *priv_ep , struct
       cdns3_request *priv_req , int status );

three args, all passed by the caller, and she returns void β€” no return value, she just does the thing and dips πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • priv_ep β€” the endpoint that the request belongs to 🧚 like, whose request is this? hers. that's the one.
  • priv_req β€” the request we're giving back πŸ™ˆ the actual star of the show, the one getting handed over.
  • status β€” the completion code for the request. whether it slayed or flopped, this is how you say it πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

bestie, read this part twice because it's giving rules:

must be called with the controller's lock held and interrupts disabled. periodt. no exceptions, no "but Iβ€”", nothing. that's the contract 🀝

so what does she do? this function will unmap req and call its ->complete callback β€” that's the whole point of the giveback, she's notifying the upper layers that it has completed ✨ literally the "hey, it's done!!" text in the group chat 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/usb/cdns3/cdns3-gadget.c β€” that's where she lives 🏠

and the whole extended friend group, all section 9, all iconic:

cdns3_clear_register_bit(9), cdns3_set_register_bit(9), cdns3_ep_addr_to_index(9), cdns3_next_request(9), cdns3_next_align_buf(9), cdns3_next_priv_request(9), cdns3_select_ep(9), cdns3_get_tdl(9), cdns3_allocate_trb_pool(9), cdns3_ep_stall_flush(9), cdns3_hw_reset_eps_config(9), cdns3_ep_inc_trb(9), cdns3_ep_inc_enq(9), cdns3_ep_inc_deq(9), cdns3_allow_enable_l1(9), cdns3_start_all_request(9), cdns3_wa2_descmiss_copy_data(9), cdns3_wa2_descmissing_packet(9), cdns3_ep_run_transfer(9), cdns3_trb_handled(9), cdns3_check_ep_interrupt_proceed(9), cdns3_check_usb_interrupt_proceed(9), cdns3_device_irq_handler(9), cdns3_device_thread_irq_handler(9), cdns3_ep_onchip_buffer_reserve(9), cdns3_ep_config(9), cdns3_gadget_ep_alloc_request(9), cdns3_gadget_ep_free_request(9), cdns3_gadget_ep_enable(9), cdns3_gadget_ep_disable(9), __cdns3_gadget_ep_queue(9), cdns3_gadget_ep_dequeue(9), __cdns3_gadget_ep_set_halt(9), __cdns3_gadget_ep_clear_halt(9), cdns3_gadget_ep_set_halt(9), cdns3_gadget_get_frame(9), cdns3_gadget_udc_start(9), cdns3_gadget_udc_stop(9), cdns3_gadget_check_config(9), cdns3_init_eps(9), cdns3_gadget_init(9)


mwah πŸ’‹ that's the page! this one comes out of ./drivers/usb/cdns3 and she's dated October 2026 β€” so like, future icon behavior honestly 🌟 go hold that lock, disable those interrupts, and give that request back the way she deserves πŸŽ€πŸ’œ

πŸ“¦ where this page comes from