USBD_STATUS(9)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’… USBD_STATUS(9) β€” the kernel dev manual, bestie edition ✨

Okay so this is a page from the Kernel Developer's Manual, and it's literally all about usbd_status β€” the USB device drivers interface return status values 🫢. Think of it as the master list of every mood a USB operation can be in. Iconic, honestly.

🌸 SYNOPSIS 🌸

#include <dev/usb/usbdi.h>

✨ DESCRIPTION ✨

So this page documents the full list of return values used by the generic USB code. Like, all of them, no gatekeeping πŸ’–.

Heads up bestie: interface-specific definitions get given with the interface itself, so don't come looking for those here πŸŽ€

πŸ‘‘ RETURN VALUES πŸ‘‘

The return values are split into two main groups: expected values and error values. Two whole vibes, fr fr.

πŸ’– The expected values (there are literally only two)

  • USBD_NORMAL_COMPLETION β€” the operation completed successfully. Slay, it worked, no notes πŸ’…
  • USBD_IN_PROGRESS β€” the operation was successfully submitted, usually part of an asynchronous operation. It's giving "we're so back, just wait" ⏳

😭 The error values

  • USBD_PENDING_REQUESTS β€” the requested operation could not be completed due to pending requests, usually from a pipe close operation. Not me trying to close the pipe while stuff is still queued πŸ™ˆ
  • USBD_NOT_STARTED β€” the initial status of a USB transfer. Peep usbdi(9) for more details about USB transfers πŸ’œ
  • USBD_INVAL β€” invalid arguments were supplied for the requested operation. Bestie, what did you even pass in 😭
  • USBD_NOMEM β€” no memory could be allocated. The malloc said no ma'am πŸ’€
  • USBD_CANCELLED β€” the USB transfer has been cancelled, and not completed. It's over, it never finished, we don't talk about it πŸ¦‹
  • USBD_BAD_ADDRESS β€” the requested USB pipe could not be found. Peep usbdi(9) for more details about USB pipes 🌈
  • USBD_IN_USE β€” the requested operation could not be performed due to the device having active connections, such as a USB audio device currently playing. Main character energy: it's busy being iconic, try again later 🎡
  • USBD_NO_ADDR β€” the USB bus has reached its maximum limit of devices. Full house, no more seats 🌸
  • USBD_SET_ADDR_FAILED β€” the call to usbd_set_address() failed during new USB device discovery. The address moment did NOT go to plan 😀
  • USBD_NO_POWER β€” the new device has requested more power than is available. She asked for too much, honestly relatable πŸ’€
  • USBD_TOO_DEEP β€” the new USB Hub is too deep from the root. The nesting got out of hand, it's giving inception πŸŒ€
  • USBD_IOERROR β€” a non-specific error happened during IO. Something went wrong, nobody knows what, we move 🫠
  • USBD_NOT_CONFIGURED β€” the USB device is not configured; it has no configuration descriptor. No config, no descriptor, no vibe check passed πŸ™ˆ
  • USBD_TIMEOUT β€” the operation timed out. It literally ran out of time ⏰
  • USBD_SHORT_XFER β€” the USB transfer succeeded but not all requested data was returned. Partial slay β€” it ate, but only some of the plate πŸ“
  • USBD_STALLED β€” the USB controller has stalled (controller specific). Note the parenthetical bestie: this one's controller specific πŸ’…
  • USBD_INTERRUPTED β€” the process was interrupted by external means (such as a signal) while waiting for a transfer to complete. Something outside came in and said "not today" ⚑

πŸ¦‹ SEE ALSO πŸ¦‹

usb(4), usbdi(9) β€” go read those next, iykyk πŸ’–

⭐ HISTORY ⭐

This usbd_status interface first appeared in NetBSD 1.4. A classic, a legend, an icon πŸ‘‘


Okay that's the whole page bestie, no cap β€” every single value, every single cross-reference, all of it πŸ’œ This little gem shipped on Debian, dated May 12, 2012, and that's the vibe check, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from