Sends a Test Unit Ready command to the selected Integrated Device Electronics (IDE) ATAPI device.
The IDEIOTUR operation allows the caller to issue an IDE Test Unit Ready command to a selected IDE device. This command is used by system management routines to help configure IDE devices.
The ide_ready structure allows the caller to specify the IDE device ID of the device on the IDE adapter that is to receive the IDEIOTUR operation. The ide_ready structure provides two output fields:status_validity and ata_status. Using these two fields, the IDEIOTUR operation returns the status to the caller. The arg parameter for the IDEIOTUR operation specifies the address of the ide_ready structure, defined in the /usr/include/sys/ide.h file.
When an errno value of EIO is received, the caller should evaluate the returned status in the status_validity field. The status_validity field will have the ATA_ERROR_STATUS bit set to indicate that the ata_status field is valid. The status_validity field will also have the ATA_ERROR_VALID bit set to indicate that the ata_errval field contains a valid error code.
After one or more attempts, the IDEIOTUR operation should return a successful completion, indicating that the device was successfully started. If, after several seconds, the IDEIOTUR operation still returns an ata_status field set to a check condition status, the device should be skipped.
When completed successfully, this operation returns a value of 0. For the IDEIOTUR operation, this means the target device has been successfully started and is ready for data access. If unsuccessful, this operation returns a value of -1 and the errno global variable is set to 1 of the following values:
Value | Description |
---|---|
EFAULT | Indicates that a bad copy between kernel and user space occurred. |
EINVAL | Indicates the IDEIOSTART operation was not issued prior to this command. |
EIO | Indicates the adapter device driver was unable to complete the command due to an unrecoverable I/O error. If EIO is received, the caller should retry this command at least once, as the first command may have cleared an error condition with the device. Following an unrecovered I/O error, the adapter error status information is logged in the system error log. |
ENOCONNECT | Indicates a bus fault has occurred. In general, the IDE adapter device driver cannot determine which device caused the IDE bus fault, so this error is not logged. |
ENODEV | Indicates no IDE device responded to the requested IDE device ID. This condition is not necessarily an error and is not logged. |
ENOMEM | Indicates insufficient memory is available to complete the command. |
ETIMEDOUT | Indicates the device did not respond with a status before the internal command time-out value expired. If this return value is received, the caller should retry this command at least once, as the first command may have cleared an error condition with the device. This error is logged in the system error log. |
Item | Description |
---|---|
/dev/ide0, /dev/ide1,..., /dev/iden | Provide an interface to allow IDE device drivers to access IDE devices or adapters. |