usb_disable_endpoint(9)
β¨ usb_disable_endpoint β¨
okay bestie, gather round, because today we're looking at usb_disable_endpoint(9) from the Kernel API Manual β yes it's a real function, yes it's from the kernel, and yes it's lowkey iconic π
πΈ NAME πΈ
usb_disable_endpoint β Disable an endpoint by address π
π¦ SYNOPSIS π¦
void usb_disable_endpoint (struct usb_device *dev , unsigned int epaddr
, bool reset_hardware );
like, that's the whole signature, no cap β¨
π ARGUMENTS π
devβ the device whose endpoint is being disabled. it's giving "who is this about" energy π«Άepaddrβ the endpoint's address. Endpoint number for output, endpoint number +USB_DIR_INfor input. so like, output = just the number, input = number +USB_DIR_IN, iykyk πreset_hardwareβ flag to erase any endpoint state stored in the controller hardware. yes bestie, it wipes the hardware's memory of that endpoint π§
π₯ DESCRIPTION π₯
So what does it actually do? It disables the endpoint for URB submission and nukes all pending URBs π like, not gently, nukes them.
And if reset_hardware is set, it also deallocates hcd/hardware state for the endpoint β clearing both ep_in and ep_out pointers for bidirectional non-ep0 control endpoints. that's the main character move right there π
ok fr fr, note the detail:ep_inANDep_outboth get cleared, and it's specifically for bidirectional non-ep0 control endpoints. don't forget that part, it's important π
π SEE ALSO π
Kernel file ./drivers/usb/core/message.c β plus a whole friend group of functions you should also go check out:
usb_control_msg(9)usb_control_msg_send(9)usb_control_msg_recv(9)usb_interrupt_msg(9)usb_bulk_msg(9)usb_bulk_msg_killable(9)usb_sg_init(9)usb_sg_wait(9)usb_sg_cancel(9)usb_get_descriptor(9)usb_get_string(9)usb_string(9)usb_cache_string(9)usb_get_status(9)usb_clear_halt(9)usb_reset_endpoint(9)usb_disable_interface(9)usb_disable_device(9)usb_enable_endpoint(9)usb_enable_interface(9)usb_set_interface(9)usb_reset_configuration(9)usb_set_wireless_status(9)usb_driver_set_configuration(9)cdc_parse_cdc_header(9)
like yes that's a lot of friends but they're all valid, go say hi π¦
and that's the whole page, bestie, you ate it up π
this one lives in ./drivers/usb/core, dated October 2026, and it's version-stamped usb_disable_endpoint(9) β that's the source, the version and the date, all accounted for, periodt π π
π¦ 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