STRUCT _SAS_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 object
  • sas_address β€” device sas address
  • device_name β€” retrieved from the SAS IDENTIFY frame.
  • handle β€” device handle
  • sas_address_parent β€” sas address of parent expander or sas host πŸ‘‘
  • enclosure_handle β€” enclosure handle
  • enclosure_logical_id β€” enclosure logical identifier
  • volume_handle β€” volume handle (valid when hidden raid member) πŸ™ˆ
  • volume_wwid β€” volume unique identifier
  • device_info β€” bitfield provides detailed info about the device
  • id β€” target id
  • channel β€” target channel
  • slot β€” number number (not me, that's literally what it says πŸ’€)
  • phy β€” phy identifier provided in sas device page 0
  • responding β€” used in _scsih_sas_device_mark_responding
  • fast_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 slot
  • is_chassis_slot_valid β€” chassis slot valid or not
  • port β€” hba port entry containing device's port number info
  • rphy β€” 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