asd_ascb_alloc_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– asd_ascb_alloc_list(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for asd_ascb_alloc_list β€” yes that's a (9) section page, we're in the deep kernel lore now and honestly? iconic behavior. πŸŽ€


✨ NAME ✨

asd_ascb_alloc_list β€” allocate a list of aSCBs πŸ¦‹


✨ SYNOPSIS ✨

struct asd_ascb * asd_ascb_alloc_list (struct asd_ha_struct *asd_ha ,
int *num , gfp_t gfp_flags );

like, that's the whole signature. no cap. 🌸


✨ ARGUMENTS ✨

  • asd_ha β€” pointer to the host adapter structure 🫢 (the main-character struct, obviously)
  • num β€” pointer to an integer number of aSCBs πŸ”’
  • gfp_flags β€” GFP_ flags ⭐ (yes, with the underscore, we're being precise)

✨ DESCRIPTION ✨

okay so listen πŸ’… this is the only function which is used to allocate aSCBs. the only one. main character energy fr fr. and like, it's flexible too β€” it can allocate one, or it can allocate many. lowkey overachiever.

if it's more than one, then they form a linked list in two ways:

  • by their list field of the ascb struct πŸŽ€
  • and by the next_scb field of the scb_header 🌈

double-linked-list realness. the way that it threads itself twice?? obsessed. ✨

So what does it return?? It returns NULL if no memory was available 😭 β€” that's the sad path, no memory, nothing for you. Else, it returns a pointer to a list of ascbs. πŸ’–

and here's the lil plot twist you gotta know: when this function returns, num would be the number of SCBs which were not able to be allocated β€” so 0 if all requested were able to be allocated. 🫢 yes bestie, it's the failure count, not the success count. read it twice. iykyk. πŸ”₯

⚠️ heads up: num is a pointer to an integer, and it gets written to on return. that's the vibe check you need to pass before calling. πŸ’€

✨ SEE ALSO ✨

Kernel file ./drivers/scsi/aic94xx/aic94xx_hwi.c β€” and the whole friend group:

go read them, they're all baddies. πŸ‘‘


and that's the page!! πŸŽ‰ it lives over in ./drivers/scsi/aic94xx, and the version vibe stamped on it is October 2026 β€” so like, future-dated, we love a forward-thinking era. πŸ’œ slay, bye!! πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from