asd_update_port_links(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so picture this: you're deep in the asd_update_port_links(9) manpage from the Kernel API Manual, and honestly? it's giving "small function, big responsibilities" and we're gonna get into it 🫢


🌸 NAME 🌸

asd_update_port_links β€” update port_map_by_links and phy_is_up ✨

like yes, that's the whole pitch, but the lore is so much juicier, keep reading πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void asd_update_port_links (struct asd_ha_struct *asd_ha , struct
       asd_phy *phy );

it returns nothing (void, periodt) and it takes exactly two things. no more, no less, no cap πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • asd_ha β€” a pointer to the host adapter structure, aka the main character of this whole operation πŸ‘‘
  • phy β€” a pointer to the phy that's been added to a port, the little guy we're doing all this for πŸ₯Ί

🌈 DESCRIPTION 🌈

so there are like, two whole situations where this function gets called, and both of them are iconic in their own way:

  1. when a link reset has completed and we got BYTES DMAED with a valid frame, we call this function for that phy, to say "hey bestie, this phy is up" β€” meaning we update the phy_is_up in DDB 0 ✨ and here's the tea: the sequencer checks phy_is_up when pending SCBs are to be sent, and also when an open address frame has been received. so yeah, it matters. a lot. πŸ”₯
  2. when we know of ports, we call this function to update the map of phys participating in that port β€” so we update the port_map_by_links in DDB 0 πŸ“‹ and when a HARD_RESET primitive has been received, the sequencer disables all phys in that port 😭 so like, respect the map, fr fr. also port_map_by_links is used as the conn_mask byte in the initiator/target port DDB. multitasking icon behavior, honestly πŸ’…
no fr, both of these are just "update the DDB 0 fields" but the why is doing so much heavy lifting here and we love that for us πŸŽ€

πŸ’œ SEE ALSO πŸ’œ

you're gonna want to peek at the kernel file ./drivers/scsi/aic94xx/aic94xx_seq.c (the source of truth, the mothership, the vibe) and then honestly just binge the whole friend group:

like that's the whole friend group, iykyk 🌸


and that's the page!! this little beauty lives in ./drivers/scsi/aic94xx and the version on deck is dated October 2026 β€” go off, you absolute icon πŸ§šβ€β™€οΈβ­ mwah πŸ’‹

πŸ“¦ where this page comes from