cdnsp_find_next_ext_cap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ cdnsp_find_next_ext_cap(9) πŸŽ€

okay so bestie, this is a page from the Kernel API Manual and honestly it's giving "small function, big main character energy" β€” it's literally called cdnsp_find_next_ext_cap and it's about finding extended capabilities. stay with me, it slays πŸ”₯


✨ NAME ✨

cdnsp_find_next_ext_cap β€” find the offset of the extended capabilities with capability ID id. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

int cdnsp_find_next_ext_cap (void __iomem *base , u32 start , int id );

look at her go 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • base β€” the PCI MMIO registers base address. this is your starting address, the foundation of the whole operation, the moment before everything else happens ✨
  • start β€” the address at which to start looking, and yes it's (0 or HCC_PARAMS to start at beginning of list) β€” so if you wanna start from the very top of the list, that's your move, iykyk πŸ‘‘
  • id β€” the extended capability ID to search for. this is the thing you're hunting for, the whole reason you're here fr fr πŸ”

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? she returns the offset of the next matching extended capability structure. that's the whole thing. no cap ✨

and here's the part that's lowkey iconic: some capabilities can occur several times, e.g., the EXT_CAPS_PROTOCOL, and this provides a way to find them all. so instead of just grabbing the first one and calling it a day, you can keep calling this and collect the whole set like little pokΓ©mon πŸ’… literally obsessed with the reusability of it all 🌈


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/usb/cdns3/cdnsp-gadget.c cdnsp_gadget_init(9) β€” go read the neighbors, they're part of the friend group too 🫢

and that's the page bestie!! it comes to you from ./drivers/usb/cdns3, dated October 2026 β€” so mark your calendar, screenshot this, send it to the group chat, and remember: the extended capabilities were inside you all along πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from