asd_ascb_alloc_list(9)
π 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
listfield of theascbstruct π - and by the
next_scbfield of thescb_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:
asd_init_scbs(9)asd_init_escbs(9)asd_chip_hardrst(9)asd_init_chip(9)asd_init_ctxmem(9)asd_chip_reset(9)asd_process_donelist_isr(9)asd_com_sas_isr(9)asd_dch_sas_isr(9)asd_rbi_exsi_isr(9)asd_hst_pcix_isr(9)asd_hw_isr(9)asd_swap_head_scb(9)asd_start_scb_timers(9)asd_post_ascb_list(9)asd_post_escb_list(9)asd_turn_led(9)asd_control_led(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms