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.

Dependency Surface

Detected Declarations

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

Implementation Notes