asd_swap_head_scb(9)
π asd_swap_head_scb(9) β like, the Kernel API Manual, bestie β¨
okay so you're here for asd_swap_head_scb(9) and honestly? same. this is the Kernel API Manual page for it, and we're gonna get you comfy with it, no cap π«Ά
πΈ NAME πΈ
asd_swap_head_scb - - swap the head scb
periodt, that's the whole name. it does exactly what it says on the tin π
β¨ SYNOPSIS β¨
void asd_swap_head_scb (struct asd_ha_struct *asd_ha , struct asd_ascb
*ascb );
look at that signature, iconic. returns void, takes two pointers, done π
π¦ ARGUMENTS π¦
asd_haβ pointer to host adapter structure β¨ (this is the homie you're actually talking to)ascbβ pointer to the head of an ascb list π
π DESCRIPTION π
okay so here's the lore π₯ The sequencer knows the DMA address of the next SCB to be DMAed to the host adapter, from initialization or from the last list DMAed. seq->next_scb keeps the address of this SCB. so the sequencer is like, fully caught up on that one address, iykyk.
The sequencer will DMA to the host adapter this list of SCBs. But β and this is the plot twist π β the head (first element) of this list is not known to the sequencer.
Here we swap the head of the list with the known SCB (memcpy). literally just a memcpy, it's giving main character energy for one very small operation π
Only one memcpy is required per list so it is in our interest to keep the list of SCB as long as possible so that the ratio of number of memcpy calls to the number of SCB DMA-ed is as small as possible. yes bestie, that's the math β long list = tiny lil ratio = slay πβ¨
LOCKING: called with the pending list lock held. π do not skip this, fr fr, hold that lock or it's gonna be a whole mess π
π SEE ALSO π
Kernel file ./drivers/scsi/aic94xx/aic94xx_hwi.c β go read the source, it's right there and it's kinda iconic:
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_ascb_alloc_list(9)asd_start_scb_timers(9)asd_post_ascb_list(9)asd_post_escb_list(9)asd_turn_led(9)asd_control_led(9)
π that's the whole page, bestie! it lives in ./drivers/scsi/aic94xx and dated October 2026 β so like, remember it's from the future πβ¨ hope this helped, mwah ππ«Ά
π¦ 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