dwc3_gadget_set_link_state(9)
π NAME π
dwc3_gadget_set_link_state β sets usb link to a particular state. periodt.
okay so this page β dwc3_gadget_set_link_state(9) β lives in the Kernel API Manual, and it's here to explain one tiny USB-link moment, bestie. iconic behavior.
β¨ SYNOPSIS β¨
the signature is literally:
int dwc3_gadget_set_link_state (struct dwc3 *dwc , enum dwc3_link_state
state );
that's the whole call, no cap.
π ARGUMENTS π
dwcβ pointer to our context structure. yes bestie, our context structure.stateβ the state to put link into. put the link in the state. slay.
π DESCRIPTION π
two things to know, and I'm gonna say them with my whole chest:
- Locking is on you. The caller should take care of locking. this function is not doing that for you, bestie β no cap.
- Return value: this function will return
0on success or-ETIMEDOUT. that's it. simple, clean, lowkey iconic.
π SEE ALSO π
the Kernel file is ./drivers/usb/dwc3/gadget.c β and the whole friend group shows up here, iykyk:
dwc3_gadget_set_test_mode(9)dwc3_gadget_get_link_state(9)dwc3_ep_inc_trb(9)dwc3_ep_inc_enq(9)dwc3_ep_inc_deq(9)dwc3_gadget_giveback(9)dwc3_send_gadget_generic_command(9)dwc3_send_gadget_ep_cmd(9)dwc3_gadget_start_config(9)dwc3_gadget_calc_tx_fifo_size(9)dwc3_gadget_calc_ram_depth(9)dwc3_gadget_clear_tx_fifos(9)__dwc3_gadget_ep_enable(9)__dwc3_gadget_ep_disable(9)dwc3_ep_prev_trb(9)dwc3_prepare_one_trb(9)dwc3_prepare_last_sg(9)__dwc3_stop_active_transfer(9)dwc3_gadget_start_isoc_quirk(9)dwc3_gadget_setup_nump(9)dwc3_gadget_check_config(9)dwc3_gadget_init(9)
mwah π this page's footer says source/version ./drivers/usb/dwc3, dated October 2026 β and that's the tea, bestie.
π¦ 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