/* The events are mnemonically described in sas_dump.c * so when updating/adding events here, please also * update the other file too.
*/ enum port_event {
PORTE_BYTES_DMAED = 0U,
PORTE_BROADCAST_RCVD,
PORTE_LINK_RESET_ERR,
PORTE_TIMER_EVENT,
PORTE_HARD_RESET,
PORT_NUM_EVENTS,
};
enum phy_event {
PHYE_LOSS_OF_SIGNAL = 0U,
PHYE_OOB_DONE,
PHYE_OOB_ERROR,
PHYE_SPINUP_HOLD, /* hot plug SATA, no COMWAKE sent */
PHYE_RESUME_TIMEOUT,
PHYE_SHUTDOWN,
PHY_NUM_EVENTS,
};
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;
/* The phy pretty much is controlled by the LLDD. * The class only reads those fields.
*/ struct asd_sas_phy { /* private: */
atomic_t event_nr; int in_shutdown; int error; int suspended;
struct sas_phy *phy;
/* public: */ /* The following are class:RO, driver:R/W */ int enabled; /* must be set */
int id; /* must be set */ enum sas_protocol iproto; enum sas_protocol tproto;
u8 *sas_addr; /* must be set */
u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE];
spinlock_t phy_port_lock; struct asd_sas_phy **sas_phy; /* array of valid pointers, must be set */ struct asd_sas_port **sas_port; /* array of valid pointers, must be set */ int num_phys; /* must be set, gt 0, static */
int strict_wide_ports; /* both sas_addr and attached_sas_addr must match
* their siblings when forming wide ports */
void *lldd_ha; /* not touched by sas class code */
struct list_head eh_done_q; /* complete via scsi_eh_flush_done_q */ struct list_head eh_ata_q; /* scmds to promote from sas to ata eh */
/* Before calling a notify event, LLDD should use this function * when the link is severed (possibly from its tasklet). * The idea is that the Class only reads those, while the LLDD, * can R/W these (thus avoiding a race).
*/ staticinlinevoid sas_phy_disconnected(struct asd_sas_phy *phy)
{
phy->oob_mode = OOB_NOT_CONNECTED;
phy->linkrate = SAS_LINK_RATE_UNKNOWN;
}
enum exec_status { /* * Values 0..0x7f are used to return the SAM_STAT_* codes. To avoid * 'case value not in enumerated type' compiler warnings every value * returned through the exec_status enum needs an alias with the SAS_ * prefix here.
*/
SAS_SAM_STAT_GOOD = SAM_STAT_GOOD,
SAS_SAM_STAT_BUSY = SAM_STAT_BUSY,
SAS_SAM_STAT_TASK_ABORTED = SAM_STAT_TASK_ABORTED,
SAS_SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION,
/* When a task finishes with a response, the LLDD examines the * response: * - For an ATA task task_status_struct::stat is set to * SAS_PROTO_RESPONSE, and the task_status_struct::buf is set to the * contents of struct ata_task_resp. * - For SSP tasks, if no data is present or status/TMF response * is valid, task_status_struct::stat is set. If data is present * (SENSE data), the LLDD copies up to SAS_STATUS_BUF_SIZE, sets * task_status_struct::buf_valid_size, and task_status_struct::stat is * set to SAM_CHECK_COND. * * "buf" has format SCSI Sense for SSP task, or struct ata_task_resp * for ATA task. * * "frame_len" is the total frame length, which could be more or less * than actually copied. * * Tasks ending with response, always set the residual field.
*/ struct ata_task_resp {
u16 frame_len;
u8 ending_fis[ATA_RESP_FIS_SIZE]; /* dev to host or data-in */
};
struct sas_domain_function_template { /* The class calls these to notify the LLDD of an event. */ void (*lldd_port_formed)(struct asd_sas_phy *); void (*lldd_port_deformed)(struct asd_sas_phy *);
/* The class calls these when a device is found or gone. */ int (*lldd_dev_found)(struct domain_device *); void (*lldd_dev_gone)(struct domain_device *);
int (*lldd_execute_task)(struct sas_task *, gfp_t gfp_flags);
/* Task Management Functions. Must be called from process context. */ int (*lldd_abort_task)(struct sas_task *); int (*lldd_abort_task_set)(struct domain_device *, u8 *lun); int (*lldd_clear_task_set)(struct domain_device *, u8 *lun); int (*lldd_I_T_nexus_reset)(struct domain_device *); int (*lldd_ata_check_ready)(struct domain_device *); void (*lldd_ata_set_dmamode)(struct domain_device *); int (*lldd_lu_reset)(struct domain_device *, u8 *lun); int (*lldd_query_task)(struct sas_task *);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.18Bemerkung:
(vorverarbeitet am 2026-04-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.