sas_phy_alloc(9)
π« 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:
sas_remove_children(9)sas_remove_host(9)sas_get_address(9)sas_tlr_supported(9)sas_disable_tlr(9)sas_enable_tlr(9)sas_ata_ncq_prio_supported(9)sas_phy_add(9)sas_phy_free(9)sas_phy_delete(9)scsi_is_sas_phy(9)sas_port_alloc(9)sas_port_alloc_num(9)sas_port_add(9)sas_port_free(9)sas_port_delete(9)scsi_is_sas_port(9)sas_port_get_phy(9)sas_port_add_phy(9)sas_port_delete_phy(9)sas_rphy_initialize(9)sas_end_device_alloc(9)sas_expander_alloc(9)sas_rphy_add(9)sas_rphy_free(9)sas_rphy_delete(9)sas_rphy_unlink(9)sas_rphy_remove(9)scsi_is_sas_rphy(9)sas_attach_transport(9)sas_release_transport(9)
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
- 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