usb_sg_cancel(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 with usb_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 πŸ’œ:


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