sas_port_add_phy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sas_port_add_phy(9) β€” the kernel API manual, bestie edition πŸŽ€

Okay so we're in the Kernel API Manual today and the star of the show is sas_port_add_phy β€” the little function that's like "hey bestie, come join this port" for phys. Let's get into it ✨


🌸 NAME 🌸

sas_port_add_phy β€” add another phy to a port to form a wide port πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

void sas_port_add_phy (struct sas_port *port , struct sas_phy *phy );

Like, it returns void. No drama, no return value, it just does the thing πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • port β€” the port you're adding the phy to, iykyk
  • phy β€” the phy itself, the one being added 🫢

⭐ DESCRIPTION ⭐

So here's the lore, bestie: when a port is initially created, it is empty β€” literally has no phys. Zero. None. A whole empty vibe 😭

And that's a problem, because all ports must have at least one phy to operated (yes, that's exactly what the original says, we're keeping it fr fr), and all wide ports must have at least two. So one phy minimum for a port, two minimum for a wide port β€” those are the rules, no cap ✨

Now, the current code makes no difference between ports and wide ports πŸ™ˆ but here's the important bit: the only object that can be connected to a remote device is a port. So β€” and this is the whole point β€” ports must be formed on all devices with phys if they're connected to anything πŸ”₯

Like, you can't just leave a phy hanging with no port and expect it to be social. Form the port. Connect the thing. Periodt πŸ’…

🌈 SEE ALSO 🌈

The whole friend group 🫢 β€” and heads up, the kernel file is ./drivers/scsi/scsi_transport_sas.c:


And that's the page, bestie! 🧚 This little gem comes from the Kernel API Manual, sourced from ./drivers/scsi, dated October 2026 β€” screenshot it, cite it, live by it πŸ’œπŸ“

πŸ“¦ where this page comes from