usb_sg_cancel(9)
π usb_sg_cancel(9) β the Kernel API Manual tea π
okay so bestie, welcome to usb_sg_cancel(9) β straight out of the Kernel API Manual, and yes she's iconic β¨
πΈ NAME πΈ
usb_sg_cancel β no cap, this is the function that literally stops scatter/gather i/o that was issued by usb_sg_wait() π
β¨ SYNOPSIS β¨
void usb_sg_cancel (struct usb_sg_request *io );
that's it, that's the whole vibe β one clean signature, zero drama π«Ά
π¦ ARGUMENTS π¦
ioβ the request block π and like, heads up, it has to be one that was initialized withusb_sg_init. don't just hand her a random struct, she will not be amused π
π₯ DESCRIPTION π₯
So the way this works: usb_sg_cancel stops a request after it's already been started by usb_sg_wait. periodt π
She can also do the preemptive thing β if a request got initialized by usb_sg_init but hasn't started yet, usb_sg_cancel prevents it from ever starting, so that call just frees the resources that were allocated to the request π§β¨ lowkey the cleanup queen fr fr.
π SEE ALSO π
Kernel file ./drivers/usb/core/message.c β and here's the whole friend group, all of them, every single one, no one left 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_get_descriptor(9)usb_get_string(9)usb_string(9)usb_cache_string(9)usb_get_status(9)usb_clear_halt(9)usb_disable_endpoint(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)
and that's the page bestie!! π source situ is ./drivers/usb/core, dated October 2026, and it's all usb_sg_cancel(9) energy around here π mwah, go cancel some scatter/gather i/o responsibly πβ¨
π¦ 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