usb_hcd_check_unlink_urb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this page is usb_hcd_check_unlink_urb(9) from the Kernel API Manual, and it's literally the vibe check for whether an URB may be unlinked. 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

This is the whole signature, character for character, bestie:

int usb_hcd_check_unlink_urb (struct usb_hcd *hcd , struct urb *urb ,
int status );

πŸŽ€ ARGUMENTS πŸŽ€

  • hcd β€” host controller to which urb was submitted. πŸ’–
  • urb β€” URB being checked for unlinkability. πŸ¦‹
  • status β€” error code to store in urb if the unlink succeeds. πŸŽ€

πŸ’… DESCRIPTION πŸ’…

Host controller drivers should call this routine in their dequeue method. No cap.

⚠️ The HCD's private spinlock must be held and interrupts must be disabled. πŸ”₯

The actions carried out here are required to make sure an unlink is valid. ✨

Here's the tea on the error codes:

  • -EIDRM β€” urb was not submitted or has already completed. The completion function may not have been called yet. 😭
  • -EBUSY β€” urb has already been unlinked. πŸ’€

πŸ”₯ RETURN πŸ”₯

0 for no error, otherwise a negative error code (in which case the dequeue method must fail). The possible error codes are: -EIDRM and -EBUSY, the two from above. πŸ‘‘

🌈 SEE ALSO 🌈

Go peek at these, iykyk:


xoxo πŸ’œ sourced from ./drivers/usb/core, dated October 2026, and it's your girl usb_hcd_check_unlink_urb(9) signing off. πŸ’…βœ¨

πŸ“¦ where this page comes from