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.
Note: The IDE adapter device driver performs normal error-recovery procedures during execution of this command.
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:
/dev/ide0, /dev/ide1,..., /dev/iden | Provide an interface to allow IDE device drivers to access IDE devices or adapters. |
idedisk IDE device driver or idecdrom IDE device driver.