usb_disable_endpoint(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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_IN for 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_in AND ep_out both 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:

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