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 satadev_rev; /* structure version */ sata_address_t satadev_addr; /* sata port/device address */ uint32_t satadev_state; /* Port or dev config state */ uint32_t satadev_type; /* Attached device type */ struct sata_port_scr 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 satadev_add_info; /* function-specific additional information value returned by SATA HBA driver */ satadev_rev Version of the sata_device structure. satadev_addr SATA port or SATA device address - see sata_address structure description satadev_state SATA port or SATA device configuration states. Configuration state field is set by SATA HBA Framework. Common flags specifying current state of a port or an attached drive. These states are mutually exclusive, except except SATA_STATE_PROBED and SATA_STATE_READY that may be set at the same time. SATA_STATE_UNKNOWN Device/port not initialized, state unknown SATA_STATE_PROBING Device/port in state of being probed SATA_STATE_PROBED Device/port probing completed SATA_STATE_READY Device/port is ready Attached drive specific states. 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 power states. These flags may be used only if the address qualifier (satadev_addr.qual) is set to SATA_ADDR_DCPORT or SATA_ADDR_DPMPORT value. 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 SATA Port specific states SATA_PSTATE_PWRON and SATA_PSTATE_PWROFF are mutually exclusive. All other states may be combined with each other and with one of the power level state. These flags may be used only if the address qualifier (satadev_addr.qual) is set to SATA_ADDR_CPORT or SATA_ADDR_PMPORT value. 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. satadev_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_ATAPINONCD 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. satadev_scr.sstatus, satadev_scr.serror, satadev_scr.scontrol, satadev_scr.sactive, satadev_scr.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). satadev_num_info Function-specific informational value, for example: For sata_tran_probe_port() this field may contain the 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)