sas_phy_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« sas_phy_alloc β€” a kernel API manual moment (Kernel API Manual, bestie) πŸ’«

okay so picture this: you're deep in the Kernel API Manual and you need a SAS PHY structure to just exist. That's this page. Let's go πŸŽ€


✨ NAME ✨

sas_phy_alloc β€” allocates and initialize a SAS PHY structure

(yes, that's the original grammar, "allocates and initialize", we don't fix the kernel's copy, we love it as it is πŸ’…)


🌸 SYNOPSIS 🌸

struct sas_phy * sas_phy_alloc (struct device *parent , int number );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • parent β€” the Parent device, like the literal parent of your brand new PHY 🫢
  • number β€” the Phy index, i.e. which one this is

πŸ’– DESCRIPTION πŸ’–

So what it does: it allocates an SAS PHY structure. Simple. Iconic.

And then β€” this is the part β€” it will be added in the device tree below the device specified by parent. And heads up, parent has to be either a Scsi_Host or a sas_rphy. No other vibes accepted, that's the vibe check πŸ”₯


⭐ RETURN ⭐

You get either an SAS PHY allocated, or NULL if the allocation failed 😭 (ngl, always check it, bestie)


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/scsi/scsi_transport_sas.c, plus the whole friend group:


lowkey a whole lineup fr fr β€” tap any of those and you're set 🧚

mwah πŸ’œ that's the page. sign-off time: this lil number lives under ./drivers/scsi, dated October 2026, and it's giving sas_phy_alloc(9) main character energy, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from