dwc2_update_urb_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dwc2_update_urb_state(9) β€” like, the whole glow-up of one URB's state ✨

Okay bestie, so this is a page straight out of the Kernel API Manual, and it's about one very specific little function that does one very specific little job. No cap, it's niche, but it ate. Let's get into it 🫢


✨ NAME ✨

dwc2_update_urb_state β€” updates the state of the URB after a Transfer Complete interrupt on the host channel. πŸŽ€

So here's the vibe: it updates the actual_length field of the URB based on how many bytes actually got transferred via the host channel. And if the data transfer is finished? It sets the URB status. That's the whole main character arc, periodt. πŸ‘‘


🌸 SYNOPSIS 🌸

int dwc2_update_urb_state (struct dwc2_hsotg *hsotg , struct
       dwc2_host_chan *chan , int chnum , struct dwc2_hcd_urb *urb , struct
       dwc2_qtd *qtd );

Yup, five args, returns an int. She's giving "small function, big responsibility" energy, honestly. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

Every single one of these, because we do not skip details in this house:

  • hsotg β€” the programming view of the DWC_otg controller. Like, the big-picture controller vibes. 🌈
  • chan β€” the programming view of the host channel. This is the specific channel we're looking at, bestie. πŸ”₯
  • chnum β€” the channel number. An int, lowkey just the digits that tell you which channel. πŸ”’
  • urb β€” the URB that's being processed. The one whose state is about to get updated β€” she's the main character here. πŸ‘‘
  • qtd β€” the queue transfer descriptor. Not to be confused with the URB, okay? Different thing, different job. 🧚

⭐ RETURN ⭐

  • 1 β€” if the data transfer specified by the URB is completely finished. Done. Wrapped. Slay. πŸŽ‰
  • 0 β€” otherwise. Not finished yet, keep going, we'll get there. πŸ™ˆ

πŸ’– SEE ALSO πŸ’–

If you wanna go deeper down the rabbit hole (and you know you do), check these out:

iykyk πŸ’œ


Heads up bestie: this whole page lives in the kernel tree at ./drivers/usb/dwc2, so that's where you go to actually read the source. Don't come for me, that's just where it is. πŸ“

That's the whole page, bestie β€” no crumbs left behind πŸŽ€ Cute little sign-off: this one comes to you from the source at ./drivers/usb/dwc2, dated October 2026, and it's the dwc2_update_urb_state(9) page through and through. Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from