STRUCT _SAS_DEVICE(9)
π struct _sas_device(9) π
okay so real quick β this is a page from the Kernel API Manual, and it's all about struct _sas_device, aka attached device information. stick with me, it's actually iconic π
β¨ NAME β¨
struct _sas_device β attached device information π«Ά
πΈ SYNOPSIS πΈ
struct _sas_device {
struct list_head list;
struct scsi_target *starget;
u64 sas_address;
u64 device_name;
u16 handle;
u64 sas_address_parent;
u16 enclosure_handle;
u64 enclosure_logical_id;
u16 volume_handle;
u64 volume_wwid;
u32 device_info;
int id;
int channel;
u16 slot;
u8 phy;
u8 responding;
u8 fast_path;
u8 pfa_led_on;
u8 pend_sas_rphy_add;
u8 enclosure_level;
u8 chassis_slot;
u8 is_chassis_slot_valid;
u8 connector_name[5];
u8 ssd_device;
struct kref refcount;
u8 port_type;
struct hba_port *port;
struct sas_rphy *rphy;
};
like, look at that struct. she's gorgeous. every field literally copy-pasted exactly, no cap β¨
π¦ Members π¦
bestie, here's the vibe check on every single member, one by one, no skipping:
listβ sas device list πstargetβ starget objectsas_addressβ device sas addressdevice_nameβ retrieved from the SAS IDENTIFY frame.handleβ device handlesas_address_parentβ sas address of parent expander or sas host πenclosure_handleβ enclosure handleenclosure_logical_idβ enclosure logical identifiervolume_handleβ volume handle (valid when hidden raid member) πvolume_wwidβ volume unique identifierdevice_infoβ bitfield provides detailed info about the deviceidβ target idchannelβ target channelslotβ number number (not me, that's literally what it says π)phyβ phy identifier provided in sas device page 0respondingβ used in_scsih_sas_device_mark_respondingfast_pathβ fast path feature enable bit β‘pfa_led_onβ flag for PFA LED status π‘pend_sas_rphy_addβ flag to check if device is in sas_rphy_add addition routine.chassis_slotβ chassis slotis_chassis_slot_validβ chassis slot valid or notportβ hba port entry containing device's port number inforphyβ device's sas_rphy address used to identify this device structure in target_alloc callback function
fr fr, that's the whole documented member list β go off, struct π«Ά
π₯ SEE ALSO π₯
Kernel file ./drivers/scsi/mpt3sas/mpt3sas_base.h struct MPT3SAS_TARGET(9), struct MPT3SAS_DEVICE(9), struct _internal_cmd(9), pcie_device_get(9), pcie_device_free(9), pcie_device_put(9), struct _boot_device(9), struct _sas_port(9), struct _sas_phy(9), struct _sas_node(9), struct _enclosure_node(9), enum reset_type(9), struct pcie_sg_list(9), struct chain_tracker(9), struct scsiio_tracker(9), struct request_tracker(9), struct _tr_list(9), struct _sc_list(9), struct _event_ack_list(9), struct adapter_reply_queue(9), struct io_uring_poll_queue(9), struct virtual_phy(9), struct hba_port(9), struct htb_rel_query(9), struct MPT3SAS_ADAPTER(9)
likeβ¦ that's a whole friend group right there. read them all. periodt π
and that's the page!! sign-off time: this one lives in ./drivers/scsi/mpt3sas, dated October 2026 π go read the source, ily, bye ππ
π¦ 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