Data Structures For Drivers sata_device(9S) NAME sata_device - structure specifying SATA device SYNOPSIS #include INTERFACE LEVEL Consolidation Private DESCRIPTION SATA device structure, specifying device or port address, sata port state, an attached device type and a configuration state. STRUCTURE MEMBERS int sata_device_rev; /* structure version */ sata_address_t addr; /* sata port/device address */ uint16_t state; /* Port or dev config state */ uint16_t dev_type; /* Attached device type */ uint32_t port_sstatus; /* Port SStatus */ uint32_t port_serror; /* Port SError */ uint32_t port_scontrol; /* Port SControl */ uint32_t port_sactive; /* Port SActive */ uint32_t port_snotific; /* Port SNotification */ uint32_t num_info; /* function-specific informative value */ sata_device_rev Version of the sata_device structure. addr SATA port or SATA device address - see sata_address structure description state SATA port or SATA device configuration states. Configuration state field is set by SATA HBA Framework. Common device/port states: SATA_STATE_UNKNOWN Device/port not initialized, state unknown SATA_STATE_PROBING Device/port in state of being probbed SATA_STATE_PROBED Device/port probing completed SATA_STATE_READY Device/port is ready Device-specific configuration states: SATA_DSTATE_PWR_ACTIVE Device is in power state ACTIVE SATA_DSTATE_PWR_IDLE Device is in power state IDLE SATA_DSTATE_PWR_STANDBY Device is in power state STANDBY SATA_DSTATE_RESET Device was reset. After setting this state, SATA HBA driver shall reject all packets directed to this device, unless SATA_CLEAR_DEV_RESET_STATE or SATA_IGNORE_DEV_RESET_STATE flags are set in sata_cmd structure embedded in sata_pkt sent to SATA HBA. The explicit request from SATA HBA Framework is needed to exit this state (SATA_CLEAR_DEV_RESET_STATE flag in sata_cmd flag field). SATA_DSTATE_FAILED Device has failed - it is in unusable state The SATA_DSTATE_PWR_ACTIVE, SATA_DSTATE_PWR_IDLE and SATA_DSTATE_PWR_STANDBY are mutually exclusive. All other states may be combined with each other and with one of the above power states. Port-specific configuration states: SATA_PSTATE_PWRON Port and/or serial link interface is powered-up SATA_PSTATE_PWROFF Port and/or serial link interface is powered-down SATA_PSTATE_SHUTDOWN Port is shut down (inactive). SATA_PSTATE_FAILED Port has failed - it is in unusable state The SATA_PSTATE_PWRON and SATA_PSTATE_PWROFF states are mutually exclusive. All other states may be combined with each other and with one of the above power level state. Either SATA_DSTATE_* or SATA_PSTATE_* states may be used, depending on the type of the device they describe, but they cannot be intermixed. dev_type Attached device type. SATA HBA driver may set only SATA_DTYPE_NONE, SATA_DTYPE_PMULT or SATA_DTYPE_UNKNOWN device type. Other types are set by SATA HBA framework. SATA_DTYPE_NONE No device is attached to the specified port SATA_DTYPE_ATADISK Hard-disk SATA device is attached to the specified port SATA_DTYPE_ATAPICD ATAPI CD/DVD SATA device is attached to the specified port SATA_DTYPE_ATAPI ATAPI non-CD/DVD SATA device is attached to the specified port SATA_DTYPE_PMULT Port Multiplier is attached to the specified port SATA_DTYPE_UNKNOWN A device presence was detected at the specified port but a type of a device could not be determined. port_sstatus, port_serror, port_scontrol, port_sactive, port_snotific These fields should be set by SATA HBA driver to the same value as their equivalent registers in the port SCR register block (see Serial ATA II specification). num_info Function-specific informational value, for example: For sata_tran_probe_port() this field may contain a number of device ports on the Port Multiplier, if an attached device dev_type returned by SATA HBA driver specifies Port Multiplier being connected. For sata_hba_event_notify() this field may contain a value specific for a reported event. SEE ALSO sata_hba_tran(9S), sata_address(9S), sata_pkt(9S), sata_cmd(9S)