include/scsi/libsas.h
Source file repositories/reference/linux-study-clean/include/scsi/libsas.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/libsas.h- Extension
.h- Size
- 19781 bytes
- Lines
- 764
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/timer.hlinux/pci.hscsi/sas.hlinux/libata.hlinux/list.hscsi/scsi_device.hscsi/scsi_cmnd.hscsi/scsi_transport_sas.hlinux/scatterlist.hlinux/slab.h
Detected Declarations
struct block_devicestruct ex_phystruct expander_devicestruct sata_devicestruct ssp_devicestruct domain_devicestruct sas_workstruct sas_discovery_eventstruct sas_discoverystruct asd_sas_portstruct asd_sas_eventstruct asd_sas_phystruct sas_ha_structstruct ata_task_respstruct task_status_structstruct sas_ata_taskstruct sas_internal_abort_taskstruct sas_smp_taskstruct sas_ssp_taskstruct sas_tmf_taskstruct sas_taskstruct sas_task_slowstruct sas_domain_function_templateenum sas_phy_roleenum port_eventenum phy_eventenum discover_eventenum routing_attributeenum ex_phy_stateenum sas_ha_stateenum service_responseenum exec_statusenum sas_internal_abortenum task_attributefunction dev_is_expanderfunction dev_parent_is_expanderfunction INIT_SAS_WORKfunction INIT_SAS_EVENTfunction starget_to_domain_devfunction sdev_to_domain_devfunction cmd_to_domain_devfunction severedfunction to_sas_gpio_odfunction sas_put_local_phyfunction try_test_sas_gpio_gp_bitfunction sas_is_internal_abort
Annotated Snippet
struct ex_phy {
int phy_id;
enum ex_phy_state phy_state;
enum sas_device_type attached_dev_type;
enum sas_linkrate linkrate;
u8 attached_sata_host:1;
u8 attached_sata_dev:1;
u8 attached_sata_ps:1;
enum sas_protocol attached_tproto;
enum sas_protocol attached_iproto;
u8 attached_sas_addr[SAS_ADDR_SIZE];
u8 attached_phy_id;
int phy_change_count;
enum routing_attribute routing_attr;
u8 virtual:1;
int last_da_index;
struct sas_phy *phy;
struct sas_port *port;
};
struct expander_device {
struct list_head children;
int ex_change_count;
u16 max_route_indexes;
u8 num_phys;
u8 t2t_supp:1;
u8 configuring:1;
u8 conf_route_table:1;
u8 enclosure_logical_id[8];
struct ex_phy *ex_phy;
struct sas_port *parent_port;
struct mutex cmd_mutex;
};
/* ---------- SATA device ---------- */
#define ATA_RESP_FIS_SIZE 24
struct sata_device {
unsigned int class;
u8 port_no; /* port number, if this is a PM (Port) */
struct ata_port *ap;
struct ata_host *ata_host;
struct smp_rps_resp rps_resp ____cacheline_aligned; /* report_phy_sata_resp */
u8 fis[ATA_RESP_FIS_SIZE];
};
struct ssp_device {
struct list_head eh_list_node; /* pending a user requested eh action */
struct scsi_lun reset_lun;
};
enum {
SAS_DEV_GONE,
SAS_DEV_FOUND, /* device notified to lldd */
SAS_DEV_DESTROY,
SAS_DEV_EH_PENDING,
SAS_DEV_LU_RESET,
SAS_DEV_RESET,
};
struct domain_device {
spinlock_t done_lock;
enum sas_device_type dev_type;
enum sas_linkrate linkrate;
enum sas_linkrate min_linkrate;
enum sas_linkrate max_linkrate;
int pathways;
struct domain_device *parent;
struct list_head siblings; /* devices on the same level */
struct asd_sas_port *port; /* shortcut to root of the tree */
struct sas_phy *phy;
struct list_head dev_list_node;
Annotation
- Immediate include surface: `linux/timer.h`, `linux/pci.h`, `scsi/sas.h`, `linux/libata.h`, `linux/list.h`, `scsi/scsi_device.h`, `scsi/scsi_cmnd.h`, `scsi/scsi_transport_sas.h`.
- Detected declarations: `struct block_device`, `struct ex_phy`, `struct expander_device`, `struct sata_device`, `struct ssp_device`, `struct domain_device`, `struct sas_work`, `struct sas_discovery_event`, `struct sas_discovery`, `struct asd_sas_port`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.